1) ABAC — many tables, one central rule
Story: 60+ fact tables all have a country column. Platform owns access; domains should not paste 60 copies of the same SQL.
Why pick this: Tag the column once, attach one attribute-based policy. Ada (country=HK) only sees HK rows on every tagged table.
-- Education sketch (names/APIs vary by release)
ALTER TABLE sales.orders SET TAGS ('rls.country' = 'country');
-- Policy idea: user.attr.country must match the tagged column value
-- Ada → HK rows only on orders, shipments, returns, …
2) Row filter — one table, simple column
Story: Only sales.orders needs RLS for now. The rule is “row.country equals Ada’s country.” Everyone still queries the same table name.
Why pick this: Fastest when logic is a single-table predicate and you do not want a new view name for every consumer.
-- Education sketch
CREATE FUNCTION gov.country_filter(country STRING)
RETURNS BOOLEAN
RETURN country = current_user_country(); -- Ada → 'HK'
ALTER TABLE sales.orders
SET ROW FILTER gov.country_filter ON (country);
3) Dynamic view — region↔country mapping
Story: Ada is an APAC lead who may see HK+SG via a mapping table, not a single attribute on orders. Domain owners iterate in SQL.
Why pick this: Use when the rule needs a join (user → allowed region/country). Grant the view; keep the base table locked down.
-- Education sketch
CREATE VIEW sales.orders_rls AS
SELECT o.*
FROM sales.orders o
JOIN gov.user_region_map m
ON m.user_email = current_user()
AND o.region = m.region
AND o.country = m.country;
-- Ada's map rows: (Ada, APAC, HK), (Ada, APAC, SG)