Categories:

Table, View, & Sequence DDL

SHOW MASKING POLICIES

Lists masking policy information, including the creation date, database and schema names, owner, and any available comments.

Syntax

SHOW MASKING POLICIES;

Usage Notes

  • Only returns rows for the masking policy owner (i.e. the role with the OWNERSHIP privilege on the masking policy) or a role with the APPLY privilege on the masking policy or a role with the global APPLY MASKING POLICY privilege.

  • The command does not require a running warehouse to execute.

  • The value for LIMIT rows cannot exceed 10000. If LIMIT rows is omitted, the command results in an error if the result set is larger than 10K rows.

    To view results for which more than 10K records exist, either include LIMIT rows or query the corresponding view in the Information Schema.

  • To post-process the output of this command, you can use the RESULT_SCAN function, which treats the output as a table that can be queried.

Example

show masking policies;

-----------------------------------+----------+---------------------+-------------------------+----------------+--------------+-------------+
           created_on              |   name   |    database_name    |       schema_name       |      kind      |     owner    | comment     |
-----------------------------------+----------+---------------------+-------------------------+----------------+--------------+-------------+
 Mon, 27 April 2020 00:10:25 -0700 | SSN_MASK | DATAMASKING_DEMO_DB | DATAMASKING_DEMO_SCHEMA | MASKING_POLICY | ACCOUNTADMIN | DEMO_POLICY |
-----------------------------------+----------+---------------------+-------------------------+----------------+--------------+-------------+