Configure Row-Level Security
Row-level security allows you to restrict which records users can view within a table. Instead of granting access to every row, you can define filter expressions that automatically limit the data returned for members of a team. This is useful when users should only see records relevant to their department, region, or responsibilities.
What Are Table Restrictions?
Table restrictions are filter expressions that are automatically applied whenever a team queries a table. Users do not need to apply these filters manually, they are enforced automatically by Insights.
Set Up Table Restrictions
To configure row-level security for a table:
- Open Settings → Permissions.
- Select the team you want to configure.
- Open the Access tab.
- Expand the required Data Source.
- Select the table you want the team to access.
- Click Set Filters next to the table name.
- Enter the required filter expression.
- Click Done to save the restriction.
Tip
Use row-level security when multiple teams access the same table but should only see records that belong to their region, department, customers, or business unit.
Filter Expression Syntax
Filter expressions use a Python-like syntax and reference table column names directly.
Basic Equality
column_name == 'value'
Multiple Conditions
region == 'West' AND active == 1
Comparison Operators
revenue > 100000
String Operations
customer_name.startswith('A')
NULL Checks
manager IS NOT NULL
Common Use Cases
- Restrict sales teams to customers in their assigned region.
- Allow managers to view only employees within their department.
- Show branch-specific transaction data to each branch office.
- Limit customer support teams to tickets assigned to their group.
Best Practice
Keep filter expressions as simple as possible and verify them before assigning them to production teams. Complex filters can make permission management more difficult and increase the likelihood of unintended access restrictions.