ALTER MASKING POLICY
ENTERPRISE EDITION FEATURE
This feature requires Enterprise Edition (or higher). To inquire about upgrading, please contact Snowflake Support.
Replaces the existing masking policy rules with new rules or a new comment and allows the renaming of a masking policy.
Any changes made to the policy rules go into effect when the next SQL query that uses the masking policy runs.
See also:
Masking policy DDL
Syntax
ALTER MASKING POLICY [ IF EXISTS ] <name> RENAME TO <new_name>
ALTER MASKING POLICY [ IF EXISTS ] <name> SET BODY -> <expression_on_arg_name_to_mask>
ALTER MASKING POLICY [ IF EXISTS ] <name> SET TAG <tag_name> = '<tag_value>' [ , <tag_name> = '<tag_value>' ... ]
ALTER MASKING POLICY [ IF EXISTS ] <name> UNSET TAG <tag_name> [ , <tag_name> ... ]
-- apply masking policy to a table column
ALTER TABLE IF EXISTS user_info MODIFY COLUMN email SET MASKING POLICY email_mask;
-- apply the masking policy to a view column
ALTER VIEW user_info_v MODIFY COLUMN email SET MASKING POLICY email_mask;
https://docs.snowflake.com/en/user-guide/security-column-ddm-use
D is the answer. https://docs.snowflake.com/en/user-guide/security-column-intro
table
ALTER TABLE IF EXISTS user_info MODIFY COLUMN ssn_number SET MASKING POLICY ssn_mask;
-- view
ALTER VIEW user_info_v MODIFY COLUMN ssn_number SET MASKING POLICY ssn_mask_v;
D
ALTER TABLE t1 MODIFY COLUMN c1 UNSET MASKING POLICY;
ALTER TABLE t1 MODIFY COLUMN c1 SET MASKING POLICY p2;
CREATE MASKING POLICY email_mask AS
(val string) RETURNS string ->
CASE
WHEN CURRENT_ROLE() IN ('PAYROLL') THEN val
ELSE '******'
END;
https://docs.snowflake.com/en/user-guide/security-column-intro
Ans is A - n this example, my_masking_policy is the name of the masking policy that was previously created. The SET BODY clause defines the logic for the masking policy, specifying which roles can view the actual data and which roles will see masked data.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
PrasantSadangi
1 week, 2 days agokayuhanbiduk
6 months agopvskbrod
7 months, 1 week agosinghks
8 months agoMarcusbraga
8 months, 2 weeks agoMultiCloudIronMan
9 months agoMultiCloudIronMan
3 months, 3 weeks agokayuhanbiduk
6 months ago