Define row filters
In Data Access, a row filter is a type of access control that restricts row visibility on specific tables (including table views) for everyone except its beneficiaries.
You define a row filter in two parts:
- Filtered tables: The tables that the row netapplies to. Rows in these tables are hidden from everyone, including users who already have access on the tables.
- Filter rules: The rules that determine who can see which rows.
Hide rows
To hide the rows in specific tables:
- On the row filter page, in the Filtered tables section, click Add.
- In the Add filtered tables dialog box, select the Data objects option, and then click Continue.
- In the Add table dialog box, select the tables, and then click Add.
Dynamically hide rows
To hide the rows in the tables that meet specific conditions:
- On the row filter page, in the Filtered tables section, click Add.
- In the Add filtered tables dialog box, select the Dynamic rule option, and then click Continue.
- In the Add dynamic rule dialog box, select the data objects (the scope) to include in the dynamic rule, and then click Save.
Create a filter rule
To create a filter rule for a row filter:
- On the row filter page, in the Filter rules section, click Add.
- On the Create row filter rule page, enter the required information.
Field Description Name A unique display name for the filter rule, for example, Active Marketing Consent.
Description A brief explanation of the filter rule's purpose, for example, Shows customer records having active marketing consent.
- In the Which rows can be accessed section, specify the criteria that determine which rows to show to the beneficiaries. Rows that meet the filter criteria are called filtered rows.
Field Description Column The column that determines if a row is shown to beneficiaries, for example, a Marketing Consent column.
If the row filter applies to multiple tables, the Column field includes a list of columns that are common to all of them. If a column is unique to one table, you can manually enter its name in the Column field.
Warning If a filter rule references a column that is missing from a filtered table, an error is reported on the Issues page. The impact on that table in the meantime depends on your data source.- BigQuery: Each filter rule is applied as its own separate policy. A missing column reference affects only the one rule with the error; other rules on the same table continue to apply normally.
- Databricks and Snowflake: All filter rules for a table are combined into a single policy. If the table had no filter applied yet, the missing column reference prevents that policy from being created at all, so it remains fully unfiltered and anyone with access can see all of its rows. If the table already had a working filter policy from a previous synchronization, that existing policy remains in place and continues to be enforced. The invalid rule blocks the update, not the previously applied filtering.
Operator The operator that defines the condition between the column and the target value.
Value The value that the column data needs to match for the row to be shown to beneficiaries.
For security reasons, Data Access does not import actual column values from your data sources, so you need to manually enter the exact value in this field (as it appears in your target table).
Tip- You can add more expressions and combine them with AND or OR logic.
- You can also use the Code tab to build expressions.
- Click one of the following buttons.
Button Description Create as inactive Creates an inactive filter rule in Data Access and does not push it to any data sources. You can activate the filter rule whenever you are ready to push it to the data source by clicking Activate on the filter rule page. Create Creates an active filter rule in Data Access and pushes it to the row filter's selected data sources during the next synchronization.
The Create button appears when you click the menu next to Create as inactive and then click Create.
You become the owner of the new filter rule.
Grant filtered access to identities or groups
To grant specific identities or groups filtered access on the tables:
- On the filter rule page, in the Beneficiaries section, click Add.
- In the Which type of beneficiary do you want to add dialog box, select the Identities or Groups option, and then click Continue.
- In the Which [entity] do you want to add dialog box, select the entities, and then click Add.
Dynamically grant filtered access to identities
Unlike a fixed selection of identities, a dynamic rule keeps a filter rule's beneficiaries up to date. With a dynamic rule, identities are granted filtered access only when they meet your conditions, and lose that access when they no longer do.
To grant the identities that meet specific conditions filtered access on the tables:
- On the filter rule page, in the Beneficiaries section, click Add.
- In the Which type of beneficiary do you want to add dialog box, select the Dynamic rule option, and then click Continue.
- In the Which conditions should apply dialog box, specify the required conditions, and then click Add.
Grant filtered access to beneficiaries of other roles
To grant the beneficiaries of specific roles filtered access on the tables:
- On the filter rule page, in the Beneficiaries section, click Add.
- In the Which type of beneficiary do you want to add dialog box, select the Roles option, and then click Continue.
- In the Which roles do you want to add dialog box, select the roles, and then click Add.
Change when beneficiary access expires
By default, a beneficiary that you add to a filter rule keeps the filter rule's filtered access indefinitely. You can give a beneficiary time-limited filtered access by setting an expiration date and time. When that date and time pass, the beneficiary is automatically removed from the filter rule and loses the filtered access that came through it.
To change the expiration date for a beneficiary:
- On the filter rule page, in the Beneficiaries section, in the Expires at column for the beneficiary, double-click the current value.
- In the Set expiration date dialog box, select the new expiration date and time, and then click Apply.
Grant unfiltered access on all rows
When you create a row filter, a default filter rule named All is automatically added. Its All Rows filter criterion matches every row in the tables that the row filter covers. This means that the beneficiaries of the All filter rule can see all of the rows in those tables. The All filter rule has no beneficiaries by default, so nobody can see all the rows through it until you add them. If you want some users to be able to see all rows, add them as the beneficiaries of the All filter rule.
To grant someone unfiltered access on all rows:
- On the row filter page, in the Filter rules section, click the All filter rule.
- Do one of the following:
- Grant unfiltered access to identities or groups.
- Dynamically grant unfiltered access to identities.
- Grant unfiltered access to beneficiaries of other roles.Tip The steps are the same as for other filter rules. The only difference is that the beneficiaries of the All filter rule can see all rows.
- Optionally, change when beneficiary access expires.