Skip to main content

Filters

A filter is a saved rule on a dataset that keeps the rows matching its conditions and hides the rest. Once you add one, it applies everywhere that dataset is read — row lists, dashboards, public pages, and the agent’s own queries — including counts and totals, not just the visible rows. The model is simple: capture everything at write time, filter on read. Nothing is ever deleted; the rows a filter excludes are just hidden from view. Because a filter keeps the rows that match, you exclude by matching the rows you want to keep. The most common use is keeping test and QA submissions out of a landing page’s real leads: if the test rows all share a value — a test email like @example.com — you keep the real ones with email not_contains @example.com. Using contains there would do the opposite, keeping only the test rows. Other uses: keep a single status (status equals won), drop an archived one (status not_equals archived), or scope to a window (created_at greater than a date). Filters apply to file datasets (uploads, lead/form capture, agent-written tables). Integration datasets enforce access through their source system, so they don’t take filters.

How a filter is shaped

Each filter has an optional name, and one or more conditions combined with AND. A condition is a column, an operator, and a value: A filter is default-on unless you say otherwise: it applies automatically to every read. A read can opt out (apply_default_filters=false on the query API) to see every row — handy for a one-off admin or debug check. Filter list and create responses may also contain metadata. This is read-only platform provenance used by managed features such as automatic lead exclusion; callers cannot set or replace it through REST, MCP, or the dataset filter API. Ordinary and older filters omit the field. Treat metadata.source as the authoritative marker for a platform-managed filter rather than inferring ownership from its name.

Default vs. named filters

A filter can also be saved not default-on (set is_default=false when you create it). A non-default filter never applies on its own — it sits on the dataset as a named view that a specific reader can opt into by name, one request at a time. This is how a consumer of a shared dataset narrows what they see without changing the dataset for everyone else: the data owner defines the filter once, the consumer opts in. Opting into a named filter is additive — it applies on top of the dataset’s default filters, narrowing the result. It can never be used to bypass a default (a default that hides test leads stays applied even when you opt into a named view).

Opting into a named filter on a read

The query and fetch read APIs take a filter_names list. Each name must match a saved filter on the dataset; an unknown name is rejected with the available names, so a typo never silently returns unfiltered data.
The MCP tools erdo_run_query and erdo_fetch_dataset_contents take the same filter_names argument. List a dataset’s filter names with erdo_list_dataset_filters (or erdo datasets filter list).

Named views in JavaScript

Jobs, refreshes and run_js scripts accept the same names in an optional third argument:
The saved filters apply before SQL aggregation, alongside the dataset’s default filters. An unknown name raises an error. Omitting the third argument keeps ordinary reads unchanged. Create the named filter before selecting it; leads and widget leads do not come with a named test-traffic view. A filter using is_test not_equals true excludes test submissions while keeping historical NULL values. Ordinary lead reads retain caller-tagged test submissions unless an owner adds a default filter. Health probes have a separate system-owned default exclusion. Page-events and widget-events datasets exclude test traffic by default. Existing saved filters keep their owner’s conditions and default setting.

In chat

The easiest way — just ask:
“Add a filter to the leads dataset to hide submissions from anyone testing — their emails all end in @example.com.”
The agent adds the filter, and you can ask it to list or remove filters too. To see everything again for a one-off check, ask it to query with filters off.

In the dataset settings

Open a dataset and find the Filters section. Add filter opens a form where you name the filter and add one or more conditions; existing filters are listed with their conditions and a remove button. Removing a filter stops it hiding rows — it never deletes data.

CLI

Each --where is a <column> <operator> <value> string. Output is JSON.

MCP tools

REST

Adding or removing a filter needs edit access to the dataset; listing needs view access.