Skip to main content

Dataset views

A view is a dataset whose rows come from a SQL query over another dataset. It has no copy of its own: the query runs each time someone reads the view, so it is always as current as the dataset underneath it. Use a view when someone should see part of a dataset and not the rest. The common case is a page. Anyone who can open a page can query every dataset the page is bound to, all columns and all rows, not only what the page displays. For a public page that means anyone with the link. Bind the page to a view instead, and visitors can read only what the view selects. For example, a public dashboard that shows how many leads each landing-page variant brought in needs a count per variant. It does not need each lead’s email address. A view of the leads dataset gives it exactly that:
Inside a view’s query, data is the dataset the view reads. When someone reads the view, data is the view’s own output, so a query against the view can only reach the columns the view selects.

What a view guarantees

  • Readers need access to the view, not to the source. A teammate, a shared thread or a page can be given the view while the source stays private.
  • The source’s filters still apply. Rows hidden by the source dataset’s filters, such as test submissions, never appear in a view of it, and a reader of the view cannot switch them off.
  • A view lasts only as long as its creator’s access. If the person who created the view can no longer see the source dataset, the view stops returning rows and says why.
  • A view is read-only. Write to its source dataset instead. A view has no refreshes, no revisions and no schema of its own to edit: its columns come from its query.
Views can read file datasets: uploads, lead and form capture, and tables Erdo writes. They cannot read another view, or a dataset synced from a connected app. The source needs at least one row before you create a view of it, because the view’s columns come from running its query. A view stays with its source. You can’t delete a dataset while views read it (Erdo names them), and you can’t move a view, or a dataset that views read, to another organization. Delete the views first, or recreate them in the other organization. You can add filters to a view like any other dataset. They apply to the view’s output.

Public pages

A public page can’t read lead data directly. Publishing a page, or binding a new dataset to a page that is already public, is refused when that dataset holds the organization’s leads or declares lead contact columns such as email and phone. The refusal names each dataset and asks for a view in its place. A view is how you choose what a public page exposes. It can keep contact columns when the page shows them, such as a lead list your client opens from a link, and drop everything else. A page that is only shared inside your organization can still read the leads dataset directly. When a page goes public, Erdo lists every dataset it reads, because anyone with the link can query each of them in full. That includes datasets the page only adds rows to, such as a form’s submissions. The same check runs the other way. A dataset that a public page already reads can’t be marked as your leads dataset until those pages read a view of it instead, or are made private. Pages that were already public before this check keep working, reading the datasets they read then. Any other public page that reaches lead data directly is refused when it reads it, so the check holds even if a page and a dataset change at the same moment.

Creating a view

In chat, ask Erdo to make a view, for example “make a view of our leads with just the count per variant, for the public dashboard”. Erdo creates it and uses it in place of the leads dataset when it builds the page.
Over MCP, call erdo_create_dataset with a view object holding source_dataset and sql. You need view access to the source dataset to create a view of it. Read a view the way you read any dataset: erdo datasets query, erdo_query_data, or POST /v1/datasets/:slug/query.
Views are being rolled out gradually. If creating one says views are not enabled for your account, contact Erdo support.