A security team requires that all users outside the hr_analysts group see NULL instead of the actual Social Security Number values in the employees table. Which Unity Catalog approach correctly implements this column-level PII protection?
Answer & explanation
Correct answer: A
WHY A: Dynamic views are the Unity Catalog mechanism for column-level security, including PII masking. By wrapping the table in a view with a CASE expression that checks current_user() or is_account_group_member(), authors return NULL (or a masked placeholder) to users outside the approved group while approved users see the real values. This is the documented Databricks practice for column-level PII protection.
WHY NOT B: SQL warehouse and cluster policies govern compute resource settings such as instance types and autoscaling; they are not a mechanism for column-level masking or user-based redaction at query time.
WHY NOT C: Delta Lake table properties control behaviors like schema enforcement and optimized writes; they do not provide column-level access control or encryption that selectively masks values for specific users at query time.
WHY NOT D: IAM policies on external locations restrict which users or service principals can reach the storage path at all. They work at the file level, not the column level, and do not mask specific column values for different groups.
WHY NOT E: A row filter function removes whole rows for unauthorized users, which would block access to any row with a non-null SSN. That is row-level security, not column-level masking, and it hides the full record instead of just the sensitive column.