0
0
Snowflakecloud~5 mins

Row access policies in Snowflake - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a row access policy in Snowflake?
A row access policy controls which rows a user can see or query in a table based on conditions. It helps protect sensitive data by filtering rows dynamically.
Click to reveal answer
intermediate
How do you apply a row access policy to a table in Snowflake?
You attach the row access policy to a table column using the ALTER TABLE command with ADD ROW ACCESS POLICY. This enforces the policy when querying the table.
Click to reveal answer
beginner
What is the purpose of the USING clause in a row access policy?
The USING clause defines the condition that determines if a row is visible to the user. It returns TRUE for rows the user can access and FALSE for rows to hide.
Click to reveal answer
intermediate
Can row access policies be combined with masking policies in Snowflake?
Yes, row access policies filter rows, while masking policies hide or transform column data. Using both together enhances data security by controlling both row visibility and column content.
Click to reveal answer
beginner
What happens if a user queries a table with a row access policy and no rows meet the policy condition?
The user sees an empty result set because the policy filters out all rows. This prevents unauthorized access to any data in the table.
Click to reveal answer
What does a row access policy in Snowflake control?
AThe number of users accessing the table
BWhich columns a user can see in a table
CThe size of the table
DWhich rows a user can see in a table
How do you attach a row access policy to a table?
AUsing GRANT SELECT
BUsing CREATE MASKING POLICY
CUsing ALTER TABLE ADD ROW ACCESS POLICY
DUsing DROP POLICY
What does the USING clause in a row access policy specify?
AThe condition to filter rows
BThe columns to mask
CThe user roles allowed
DThe table name
If no rows meet the row access policy condition, what is the query result?
AEmpty result set
BError message
CAll rows returned
DPartial columns returned
Can row access policies and masking policies be used together?
ANo, masking policies replace row access policies
BYes, they control rows and columns separately
CYes, but only on different tables
DNo, only one policy type can be applied
Explain how a row access policy works in Snowflake and why it is useful.
Think about how you hide certain rows from some users.
You got /4 concepts.
    Describe the steps to create and apply a row access policy in Snowflake.
    Consider policy creation and linking to a table.
    You got /4 concepts.