Schema:

ORGANIZATION_USAGE

POLICY_REFERENCES view¶

Important

This view is only available in the organization account. For more information, see Premium views in the organization account.

This Organization Usage view lists policy objects and their references in each account.

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

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

Columns¶

Column Name

Data Type

Description

ORGANIZATION_NAME

VARCHAR

Name of the organization.

ACCOUNT_LOCATOR

VARCHAR

System-defined identifier for an account.

ACCOUNT_NAME

VARCHAR

User-defined identifier for an account.

REGION

VARCHAR

Snowflake Region where the account is located.

POLICY_DB

VARCHAR

The database in which the policy is set.

POLICY_SCHEMA

VARCHAR

The schema in which the policy is set.

POLICY_ID

NUMBER

Internal/system-generated identifier for the policy.

POLICY_NAME

VARCHAR

The name of the policy.

POLICY_KIND

VARCHAR(17)

The type of policy.

REF_DATABASE_NAME

VARCHAR

The name of the database containing an object that the queried object references.

REF_SCHEMA_NAME

VARCHAR

The name of the schema containing an object that the queried object references.

REF_ENTITY_NAME

VARCHAR

The name of the object (i.e. table_name, view_name, external_table_name) on which the policy is set.

REF_ENTITY_DOMAIN

VARCHAR

The object type (i.e. table, view) on which the policy is set.

REF_COLUMN_NAME

VARCHAR

The column name on which the policy is set.

REF_ARG_COLUMN_NAMES

VARCHAR

Returns NULL for rows in the query result in which a Column-level Security masking policy is set.

TAG_DATABASE

VARCHAR

The name of the database containing the tag that has a policy assigned to the tag or NULL if the policy is not assigned to a tag.

TAG_SCHEMA

VARCHAR

The name of the schema containing the tag that has a policy assigned to the tag or NULL if the policy is not assigned to a tag.

TAG_NAME

VARCHAR

The name of the tag that has the policy assigned to it or NULL if the policy is not assigned to a tag.

POLICY_STATUS

VARCHAR

Specifies 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 by a tag.

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 24 hours.

  • The view only displays objects for which the current role for the session has been granted access privileges.