DATA_METRIC_FUNCTION_REFERENCES

functionsupportedGovernance (policies, tags, data quality)Enterprise+

docs.snowflake.com ↗

Information SchemaTable functions

Returns a row for each object that has the specified data metric function assigned to the object or returns a row for each data metric function assigned to the specified object. Data Quality Monitoring requires Enterprise Edition. To inquire about upgrading, please contact Snowflake Support.

Syntax

DATA_METRIC_FUNCTION_REFERENCES(
  METRIC_NAME => '<string>' )

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

Parameters

NameRequiredDescription
METRIC_NAME => 'string'requiredSpecifies the name of the data metric function. The entire data metric name must be enclosed in single quotes. If the data metric 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, such as '"<metric_name>"'.
REF_ENTITY_NAME => 'string'requiredThe name of the object, such as table_name, view_name, or external_table_name, on which the data metric function is added. 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, such as '"<table_name>"'.
REF_ENTITY_DOMAIN => 'string'requiredThe object type, such as table or materialized view, on which the data metric function is added. Use 'TABLE' for all supported table types.

Returns

The function returns the following columns:

Usage notes

Access control requirements

Results are returned based on the privileges granted to the role executing the query. A role used to execute this operation must have the following privileges at a minimum: - Any supported privilege on the data metric function. For system DMFs, the role can be granted the DATA_METRIC_USER database role. - Any supported privilege on the table or view, such as REFERENCES.

Usage notes: Suspended statuses

When the DMF association is suspended, the status can be one of the following: SUSPENDED_TABLE_DOES_NOT_EXIST_OR_NOT_AUTHORIZED: One of the following: The table is dropped. The schema or database that contains the table is dropped. The schema or database that contains the table cannot be resolved by the table owner role. “Resolved” means the role that calls the function does not have the appropriate privileges on the schema or database that contains the table. SUSPENDED_DATA_METRIC_FUNCTION_DOES_NOT_EXIST_OR_NOT_AUTHORIZED: One of the following: The DMF is dropped. The schema or database that contains the DMF is dropped. The schema or database that contains the DMF cannot be resolved by the table owner role. SUSPENDED_TABLE_COLUMN_DOES_NOT_EXIST_OR_NOT_AUTHORIZED: One of the following: The target table column is dropped. The schema or database that contains the column is dropped. The schema or database that contains the column cannot be resolved by the table owner role. SUSPENDED_INSUFFICIENT_PRIVILEGE_TO_EXECUTE_DATA_METRIC_FUNCTION: The table owner role does not have the EXECUTE DATA METRIC FUNCTION privilege. SUSPENDED_ACTIVE_EVENT_TABLE_DOES_NOT_EXIST_OR_NOT_AUTHORIZED: The event table is not set at the account level. SUSPENDED_DATA_METRIC_FUNCTION_OR_TARGET_OBJECT_IS_INVALID: The DMF evaluation failed with an error that doesn’t map to a more specific suspended status, so either the DMF or the object it’s associated with is invalid.

See also