How to show which masks are assign to columns

Viewed 129

I'm unable to change a mask because it is assigned to a column, but I'm having an issue identifying that column.

In SNOWFLAKE, how do I show which masks are assign to columns?

1 Answers

To determine the data masking policy usage you could use:

POLICY_REFERENCES function:

Returns a row for each object that has the specified policy assigned to the object or returns a row for each policy assigned to the specified object.

or

POLICY_REFERENCES View:

This Account Usage view can be used to identify the objects and columns on which a masking policy is set or the tables and views in which a row access policy is set.

select *
from table(information_schema.policy_references(
           policy_name => 'my_db.my_schema.ssn_mask'));


select *
from account_usage.policy_references;
Related