Consult Snowflake CREATE MASKING POLICY parameter reference before generating any CREATE MASKING POLICY DDL.
Before writing a CREATE MASKING POLICY statement:
references/parameters.md to review all available parameters and their defaults.CREATE OR REPLACE — always use CREATE MASKING POLICY IF NOT EXISTS.RETURNS must exactly match the data type of the first argument (<arg_name_to_mask>); cross-type transformations are not allowed.<body>) must be a valid SQL expression — use conditional functions (e.g. IFF, CASE) along with masking functions (e.g. SHA2, REGEXP_REPLACE) or return the column value unchanged.EXEMPT_OTHER_POLICIES = TRUE if the user explicitly needs this policy to bypass other row access or conditional masking policies — this setting cannot be changed once the policy is attached to a table or view.