Schema:

ACCOUNT_USAGE

POLICY_REFERENCES view

This Account Usage view lists policy objects and their references in your account.

The view supports aggregation, masking, network, projection, row access, and storage lifecycle policies.

The view is complementary to the Information Schema table function POLICY_REFERENCES.

Columns

Column NameData TypeDescription
POLICY_DBVARCHARThe database in which the policy is set.
POLICY_SCHEMAVARCHARThe schema in which the policy is set.
POLICY_IDNUMBERInternal/system-generated identifier for the policy.
POLICY_NAMEVARCHARThe name of the policy.
POLICY_KINDVARCHAR(17)The type of policy.
REF_DATABASE_NAMEVARCHARThe name of the database containing an object that the queried object references.
REF_SCHEMA_NAMEVARCHARThe name of the schema containing an object that the queried object references.
REF_ENTITY_NAMEVARCHARThe name of the object (i.e. table_name, view_name, external_table_name) on which the policy is set.
REF_ENTITY_DOMAINVARCHARThe object type (i.e. table, view) on which the policy is set.
REF_COLUMN_NAMEVARCHARThe column name on which the policy is set.
REF_ARG_COLUMN_NAMESVARCHARReturns NULL for rows in the query result in which a Column-level Security masking policy is set.
TAG_DATABASEVARCHARThe name of the database containing the tag that has a policy assigned to the tag or NULL if a policy is not assigned to the tag.
TAG_SCHEMAVARCHARThe name of the schema containing the tag that has a policy assigned to the tag or NULL if a policy is not assigned to the tag.
TAG_NAMEVARCHARThe name of the tag that has a policy assigned to it or NULL if a policy is not assigned to the tag.
POLICY_STATUSVARCHARSpecifies the status of the policy, which can be one of four possible values: ACTIVE, MULTIPLE_MASKING_POLICY_ASSIGNED_TO_THE_COLUMN, COLUMN_IS_MISSING_FOR_SECONDARY_ARG, or COLUMN_DATATYPE_MISMATCH_FOR_SECONDARY_ARG.

Note the following for the POLICY_STATUS column:

ACTIVE

Specifies that the column (i.e. REF_COLUMN_NAME) is only associated with a single policy.

MULTIPLE_MASKING_POLICY_ASSIGNED_TO_THE_COLUMN

Specifies that multiple masking policies are assigned to the same column.

COLUMN_IS_MISSING_FOR_SECONDARY_ARG

Specifies that the policy (i.e. POLICY_NAME) is a conditional masking policy and the table (i.e. REF_ENTITY_NAME) does not have a column with the same name.

COLUMN_DATATYPE_MISMATCH_FOR_SECONDARY_ARG

Specifies that the policy is a conditional masking policy and the table has a column with the same name but a different data type than the data type in the masking policy signature.

Usage notes

  • Latency for the view may be up to 120 minutes (2 hours).