Mandatory Filters
A mandatory filter is a SQL condition attached to a table in the Table Catalog. It scopes every question that reaches that table, so nobody has to remember the rule. It takes effect in two ways:- In components built on the table — when a metric, segment, or entity is built, the filter is written into its SQL. Every answer using that component carries it.
- In queries written against the raw table — the filter travels with the table’s definition, and the agent applies it and tells you which filters it used in that answer.
- Excluding internal accounts, test users, or staff emails.
- Restricting time ranges (for example, only the last 24 months of events).
- Enforcing tenancy on multi-tenant tables so each product team sees only its own slice.
Setting a Mandatory Filter
You set these yourself, and you need write access to the Table Catalog — Admins, Analyst Contributors, and Integration Managers have it.- On one table — open the table in the Table Catalog, go to its settings, and use the Mandatory Filters tab.
- On tables you’re adding — the Add Tables to the Context wizard has a mandatory filters step, so you can set them as you bring tables in. Filters set there apply only to the tables being added, not to tables already in the catalog.
WHERE keyword and without parameters:
Changing Mandatory Filters
Changing a table’s mandatory filters is not applied retroactively — anything already built on that table keeps the filtering it had when it was created. What that means depends on the table:- The Events table — Changing its mandatory filters only affects events synced in the future. Existing events are not updated automatically and must be reviewed manually.
- Any other table — The change is not applied automatically to existing entities, dimensions, metrics, or segments that use the table.
Question Filters
Question filters live at the workspace level and scope what the agent considers when it answers an Ask Anything question. Unlike mandatory filters, they’re visible in the chat UI when relevant — for example, picking a country or app version before the agent runs the query. People reach them through More Filters in the chat input. Question filters are set up alongside the rest of your workspace configuration. Reach out to your ClarityQ contact when you want to add or change one.When to Use Which
Mandatory filters apply everywhere and aren’t optional — use them to enforce rules everyone must follow. Question filters give analysts choices that change the scope of an answer — use them when there are several valid ways to slice the data and you want the user to pick.