DATA_METRIC_FUNCTION_EXPECTATIONS
functionsupportedGovernance (policies, tags, data quality)Enterprise+Returns information about the expectations that exist in the account. Data Quality Monitoring requires Enterprise Edition. To inquire about upgrading, please contact Snowflake Support.
Syntax
supportedpartialnot supportednot scored
DATA_METRIC_FUNCTION_EXPECTATIONS(
[ METRIC_NAME => '<string>' ]
[, REF_ENTITY_NAME => '<string>' ]
[, REF_ENTITY_DOMAIN => '<string>' ]
)
Parameters
| Name | Required | Description |
|---|---|---|
METRIC_NAME => 'string' | required | Specifies the name of a system or custom data metric function (DMF). This function returns expectations that were added to the associations between objects and the specified DMF. |
REF_ENTITY_NAME => 'string' | required | Specifies the name of an object with which DMFs are associated. Returns expectations that were added to DMF associations with the object. If specified, you must also specify REF_ENTITY_DOMAIN. 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' | required | The object type of REF_ENTITY_NAME. If the object is any type of table, use table as the argument value. If the object is a view or materialized view, use view as the argument value. |
Output
The function returns the following columns: Column name | Data type | Description metric_database_name | VARCHAR | Database where the DMF exists. metric_schema_name | VARCHAR | Schema where the DMF exists. metric_name | VARCHAR | Name of the DMF. metric_signature | VARCHAR | Signature of the DMF. metric_data_type | VARCHAR | Data type returned by the DMF. ref_entity_database_name | VARCHAR | Database of the object associated with the DMF. ref_entity_schema_name | VARCHAR | Schema of the object associated with the DMF. ref_entity_name | VARCHAR | Name of the object associated with the DMF. ref_entity_domain | VARCHAR | Type of object associated with the DMF. ref_arguments | ARRAY | Arguments passed to the DMF. ref_id | VARCHAR | System-generated identifier. expectation_id | VARCHAR | System-generated identifier of the expectation. expectation_name | VARCHAR | Name given to the expectation by the user when it was added to the DMF association. expectation_expression | VARCHAR | Boolean expression of the expectation. See Defining what meets the expectation.