Skip to main content

Row Level Access Controls

Row level access controls allow you to restrict certain users to only access certain rows in the database.

Updated over a week ago

How It Works

BlazeSQL applies row level access in three parts:

  1. You choose a row access column for a table

  2. You add Row Access Filter IDs to a member

  3. BlazeSQL filters query results for that member when the query uses that table, by replacing the table reference in the SQL code with a filtered subquery.

BlazeSQL matches the selected column against that member's Row Access Filter IDs.

This does not apply to integrations like Slack, Teams, ChatGPT, and Claude. It also doesn't apply for the Agent Reports.


Example

Imagine you choose public.orders.customer_id as the row access column.

If a team member has these Row Access Filter IDs:

  • customer_123

  • customer_456

then BlazeSQL only returns rows where customer_id matches one of those values.


Set Up Row level Access On A Database

  1. Open the workspace page

  2. Open the relevant database

  3. In Row level access, choose the schema.table.column paths you want BlazeSQL to use

  4. BlazeSQL shows a preview of the filter it will apply

Important:

  • you can choose one column per table

  • only the tables you select are filtered


Add Row Access Filter IDs For A Member

  1. Open All members or the relevant group member list

  2. Find the member

  3. Open the action menu

  4. Click Edit row access IDs

  5. Add one or more values

  6. Click Save

These values are the IDs BlazeSQL will use when filtering rows for that person.


What Counts As A Good Filter Column

Good row access columns are usually fields like:

  • customer_id

  • account_id

  • company_id

  • region_id

  • owner_id

Pick a column whose values clearly define which rows each person should see.


Important Things To Know

  • Row level access only applies to tables you selected columns from in the Row level access section

  • If a query does not use one of those tables, row level access does not affect the result

  • A member can have more than one Row Access Filter ID

  • If a member has no Row Access Filter IDs, BlazeSQL will not apply a row-based filter for that member

  • If you add a new table later, it will not be filtered until you configure a row access column for it

Did this answer your question?