RLS lets two people open the same dashboard and see different rows — the Campinas manager sees Campinas, the Sorocaba manager sees Sorocaba. This tutorial shows the practical path from the dashboard's point of view. The full conceptual reference (static × ABAC, plans, limits, troubleshooting) is in Row-level security (RLS / ABAC).
Example workspace: Comércio Aurora Ltda (aurora), dashboard "Vendas por
filial" (sales by branch).
Two forms of RLS#
- Static
{column, values}— pins the allowed values. Simple, but requires one grant per person; it doesn't scale beyond a few dozen. - By member attribute (ABAC)
{column, memberAttribute}— the grant says where the value comes from; the value lives in the member attribute. One grant serves hundreds of people. This is the recommended form.
Prerequisites#
- A plan with RLS (from Growth up — see Plans).
- An admin/owner role to configure grants and attributes.
- A dashboard published on a model with the slicing column (e.g.,
vendas.filial).
Step by step (ABAC, recommended)#
Set the attribute on the member
In Users & permissions, give the member the
filial(branch) attribute (e.g., "Campinas"). It lives in the member's profile, with no new database column. See Users, groups and permissions.Create the grant on the dashboard
In the dashboard's sharing/security panel, add the attribute grant:
{column: "filial", memberAttribute: "filial"}.Publish
RLS now applies to the dashboard's secure read and to report deliveries.
Test as each profile
Open it as the Campinas manager (sees only Campinas) and as the Sorocaba manager (sees only Sorocaba).
Test fail-closed
Open it as someone WITHOUT the
filialattribute: they should see zero rows — never "everything".
Expected result#
- Campinas sees only Campinas; Sorocaba, only Sorocaba.
- A member without the attribute → denyAll (no rows), never "no filter".
- Multi-value (e.g.,
regiao = ["Sul", "Sudeste"]) becomes anINclause.
RLS carries through to exports, deliveries and AI#
This is the point many people forget — and that ingestia.bi guarantees:
- Exports (XLSX/CSV/PDF) read the snapshot with the requester's RLS; on-demand PDF uses an ephemeral token that carries the session's RLS (see Export and distribution).
- Email/WhatsApp subscriptions apply RLS per recipient (the subscription filter adds to RLS, never widens it).
- AI reads the same secure view as the screen: Q&A and insights never see more than the person who asked can see (see Questions about the dashboard and Privacy, external sending and AI budget).
Limits and caveats#
- RLS filters rows; to hide sensitive columns, use the
viewPIIpermission and PII governance (orthogonal to RLS). - Per-member limits: up to 20 attributes, key ≤ 60 and value ≤ 200 characters, up to 50 values per attribute.
- Isolation between customers is done per workspace (each with its own datalake); RLS filters rows between people in the same workspace.
Common mistakes#
| Symptom | Likely cause | What to do |
|---|---|---|
| Person sees zero rows | missing/empty attribute (denyAll) | set the attribute in the profile |
| Person sees too many rows | grant not configured on the dashboard | create the {column, memberAttribute} grant |
| Attribute "doesn't take" | case difference/typo | the key is normalized; check the name |
| RLS not applied in email | subscription without per-recipient RLS | configure the per-recipient filter |
Related#
Last reviewed: 2026-09-08.