POLICY_REFERENCES

functionsupportedGovernance (policies, tags, data quality)

docs.snowflake.com ↗

Information SchemaTable functions

Returns a row for each object that has the specified policy assigned to the object or returns a row for each policy assigned to the specified object. See also: POLICY_REFERENCES view (Account Usage View)

Syntax

For network policy objects only

POLICY_REFERENCES(
      POLICY_NAME => '<string>' ,
      POLICY_KIND => 'NETWORK_POLICY'
      )

For other policy objects

POLICY_REFERENCES(
      POLICY_NAME => '<string>'
      )

For all policy objects

POLICY_REFERENCES(
    REF_ENTITY_NAME => '<string>' ,
    REF_ENTITY_DOMAIN => '<string>'
    )

Parameters

NameRequiredDescription
POLICY_NAME => 'string'requiredSpecifies the policy name. The entire policy name must be enclosed in single quotes. If the policy name is case-sensitive or includes any special characters or spaces, double quotes are required to process the case/characters. The double quotes must be enclosed within the single quotes (i.e. '"<policy_name>"'). Currently, Snowflake supports the following policies when specifying the policy name as an argument: aggregation policies authentication policy feature policy ingress policy masking policy network policy packages policy password policy projection policies row access policy session policy storage lifecycle policies
POLICY_KIND => 'NETWORK_POLICY'requiredUse this argument only when the POLICY_NAME value is a network policy. Do not use this argument when you specify the name of other kinds of policies.
REF_ENTITY_NAME => 'string'requiredThe name of the object, such as the table name, view name, external table name, or username, on which the policy is set. The entire object name must be enclosed in single quotes. If the object name is case-sensitive or includes any special characters or spaces, double quotes are required to process the case/characters. The double quotes must be enclosed within the single quotes (i.e. '"<table_name>"').
REF_ENTITY_DOMAIN => 'string'requiredThe object type on which the policy is set. If the object is an external table, use 'TABLE' as the argument value. If the object is a materialized view, use 'VIEW' as the argument value. The supported domains are: 'ACCOUNT' 'INTEGRATION' 'TABLE' 'TAG' 'USER' 'VIEW'

Returns

The function returns the following columns: Note the following for the POLICY_STATUS column:

Usage notes