QuestionQ46

VerifiedOfficial exam objectives/topics

A Data Engineer must create a tag-based masking policy that decides whether data is masked according to the label-string value assigned to the salary column in the staff table. The Engineer created the tag and masking policy with the following commands:

Question Image

How should the Engineer apply the tag so that only users with the payroll_admin role can access the data?

Explanation

The tag-based masking policy reveals the salary when the tag value is visible or when CURRENT_ROLE() is payroll_admin; otherwise, it returns -1. Setting the column tag to masked makes the tag-value condition false, leaving payroll_admin as the only role that receives the unmasked value. Snowflake applies a tag-based masking policy when the tag is assigned to the column with ALTER TABLE ... MODIFY COLUMN ... SET TAG.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!