QuestionQ289

VerifiedEnsuring Data Security and Compliance

A data engineer must implement column masking for a sensitive column in a Unity Catalog-managed table. The masking logic must dynamically determine whether users belong to particular groups defined in a separate group_access table that maps groups to permitted departments.

Which approach should the engineer use to enforce this requirement efficiently?

Explanation

A Unity Catalog column mask is applied through a UDF, and that UDF can perform a lookup against a mapping table while evaluating the invoking user's group membership. Referencing group_access keeps authorization data-driven: changes to allowed group–department mappings take effect without rewriting or redeploying the masking logic. A row filter affects which rows are returned, not whether a sensitive column value is masked.

Learn more

Community Discussion

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