Skip to main content

Row and column-level security

Security policies decide which rows of a dataset each person can read, and which columns they can't see at all. Set them once on the dataset and they hold everywhere its data appears.

How rules work

Row-level (RLS)
A condition each row must meet to be seen, such as region = 'Europe'. Rows that fail it are left out of every result.
Column-level (CLS)
Columns to hide, such as cost or customer email. People the rule covers can't see those columns or use them.

A rule covers whoever it's applied to: one or more roles, individual members, or everyone. If several row rules cover a person on the same dataset, a row has to pass all of them.

Open it from RLS & CLS in the sidebar. The tabs at the top also lead to the audit log, AI Activity and key management.

Security Health on the right shows how many datasets have a working rule, counts of row and column rules and drafts, and warns about any active rule that can't be applied.

Create a row-level rule

  1. Start the policy

    Open RLS & CLS in the sidebar and choose Create Security Policy.

  2. Choose the dataset

    Enter a Policy Name that says what it does, keep Policy Type on Row-Level Security (RLS), and pick the Target Dataset.

  3. Choose who it applies to

    Under Applies to, add roles, members or everyone. A new policy covers nobody until you choose.

  4. Write the condition

    Under Condition a row must meet, type it, or build it from a column, an operator and a value and choose Add.

  5. Test, switch on and save

    Test it (see below), set Status from Draft — not enforced to active, and choose Save Policy.

Conditions and variables

A condition compares columns of the dataset with values:

Condition
region = 'Europe'
region IN ('Europe', 'North America') AND channel <> 'Partner'
  • Comparisons: =, <>, <, <=, >, >=, IN (...), NOT IN (...), LIKE, ILIKE, BETWEEN ... AND ..., IS NULL and IS NOT NULL, combined with AND, OR, NOT and parentheses.
  • Values are 'text in single quotes', numbers, TRUE, FALSE, NULL or a variable. LOWER(), UPPER(), TRIM() and COALESCE() may wrap a column or value.
  • A row passes only when the condition is true. A missing value is never true, so region <> 'HR' also hides rows with no region.
  • Column names are checked when you save, with a suggestion if one is mistyped.

Conditions that depend on who's looking

Variables make one rule work for everyone. Each is replaced with the value for the person reading the data; write them without quotes:

VariableIs replaced with
${user.email}Their email address
${user.id}Their user ID
${user.name}Their name
${user.roles}The names of their roles
Condition
LOWER(account_manager_email) = LOWER(${user.email})

With that one rule applied to everyone, each account manager sees only their own accounts. If a variable has no value for someone, the rule lets nothing through for them.

Hide columns

Choose Column-Level Security (CLS) as the policy type, pick the dataset and who it applies to, and choose the columns to hide. Hidden columns disappear from chart editors, previews, exports and AI answers for the people the rule covers, under any spelling of the column's name.

Test before you switch it on

In the policy dialog, under Test as a member, pick a member and choose Show what they'd see. You'll see the dataset's rows as that person would, with this rule and their other rules applied. Use Who's covered on the policies page to check which rules cover whom.

Where rules apply

Rules are added to the query itself, so they hold in:

  • Charts and dashboards, including public links and embeds, which see what their chosen role sees
  • Dataset previews and downloads, and scheduled reports
  • Insight AI answers and AI clients connected over MCP