thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Data & Analytics · Advanced

Row Access Policy

A Snowflake Enterprise object that filters which rows a query returns based on the user's role or a mapping table.

Definition

Row access policies are attached to tables or views and evaluated at query time, often against an entitlement mapping table. They replace older patterns that relied on secure views with CURRENT_ROLE() filters.

Example

CREATE ROW ACCESS POLICY region_rap AS (region STRING) RETURNS BOOLEAN -> EXISTS (SELECT 1 FROM entitlements e WHERE e.role = CURRENT_ROLE() AND e.region = region);

Exam tip

Row access policies are evaluated before masking policies.

Related terms