ExamGecko
Question list
Search
Search

List of questions

Search

Question 93 - ARA-C01 discussion

Report
Export

The following table exists in the production database:

A regulatory requirement states that the company must mask the username for events that are older than six months based on the current date when the data is queried.

How can the requirement be met without duplicating the event data and making sure it is applied when creating views using the table or cloning the table?

A.
Use a masking policy on the username column using a entitlement table with valid dates.
Answers
A.
Use a masking policy on the username column using a entitlement table with valid dates.
B.
Use a row level policy on the user_events table using a entitlement table with valid dates.
Answers
B.
Use a row level policy on the user_events table using a entitlement table with valid dates.
C.
Use a masking policy on the username column with event_timestamp as a conditional column.
Answers
C.
Use a masking policy on the username column with event_timestamp as a conditional column.
D.
Use a secure view on the user_events table using a case statement on the username column.
Answers
D.
Use a secure view on the user_events table using a case statement on the username column.
Suggested answer: C

Explanation:

A masking policy is a feature of Snowflake that allows masking sensitive data in query results based on the role of the user and the condition of the data. A masking policy can be applied to a column in a table or a view, and it can use another column in the same table or view as a conditional column.A conditional column is a column that determines whether the masking policy is applied or not based on its value1.

In this case, the requirement can be met by using a masking policy on the username column with event_timestamp as a conditional column. The masking policy can use a function that masks the username if the event_timestamp is older than six months based on the current date, and returns the original username otherwise.The masking policy can be applied to the user_events table, and it will also be applied when creating views using the table or cloning the table2.

The other options are not correct because:

A) Using a masking policy on the username column using an entitlement table with valid dates would require creating another table that stores the valid dates for each username, and joining it with the user_events table in the masking policy function. This would add complexity and overhead to the masking policy, and it would not use the event_timestamp column as the condition for masking.

B) Using a row level policy on the user_events table using an entitlement table with valid dates would require creating another table that stores the valid dates for each username, and joining it with the user_events table in the row access policy function. This would filter out the rows that have event_timestamp older than six months based on the valid dates, instead of masking the username column. This would not meet the requirement of masking the username, and it would also reduce the visibility of the event data.

D) Using a secure view on the user_events table using a case statement on the username column would require creating a view that uses a case expression to mask the username column based on the event_timestamp column. This would meet the requirement of masking the username, but it would not be applied when cloning the table. A secure view is a view that prevents the underlying data from being exposed by queries on the view.However, a secure view does not prevent the underlying data from being exposed by cloning the table3.

1:Masking Policies | Snowflake Documentation

2: Using Conditional Columns in Masking Policies | Snowflake Documentation

3: Secure Views | Snowflake Documentation

asked 23/09/2024
Jeff Silverman
34 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first