Skip to content

Automatic translation — the Portuguese version is the reference. View in Portuguese

Updated on 2026-09-08

Tutorial: set up row-level security (RLS) on a dashboard

Have two people open the same dashboard and see different rows, using RLS by member attribute (fail-closed).

On this page (8)

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)#

  1. 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.

  2. Create the grant on the dashboard

    In the dashboard's sharing/security panel, add the attribute grant: {column: "filial", memberAttribute: "filial"}.

  3. Publish

    RLS now applies to the dashboard's secure read and to report deliveries.

  4. Test as each profile

    Open it as the Campinas manager (sees only Campinas) and as the Sorocaba manager (sees only Sorocaba).

  5. Test fail-closed

    Open it as someone WITHOUT the filial attribute: 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 an IN clause.

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 viewPII permission 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#

SymptomLikely causeWhat to do
Person sees zero rowsmissing/empty attribute (denyAll)set the attribute in the profile
Person sees too many rowsgrant not configured on the dashboardcreate the {column, memberAttribute} grant
Attribute "doesn't take"case difference/typothe key is normalized; check the name
RLS not applied in emailsubscription without per-recipient RLSconfigure the per-recipient filter

Related#


Last reviewed: 2026-09-08.

Related links