- Categories:
DATA_QUALITY_MONITORING_RESULTS¶
Returns a row for each data metric function assigned to the specified object, which includes the evaluation result and other metadata of the data metric function on the object.
- See also:
DATA_QUALITY_MONITORING_RESULTS view (LOCAL view)
Syntax¶
DATA_QUALITY_MONITORING_RESULTS(
REF_ENTITY_NAME => '<string>' ,
REF_ENTITY_DOMAIN => '<string>'
)
Arguments¶
REF_ENTITY_NAME => 'string'
The name of the table object on which the data metric function 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, such as
'"<table_name>"'
.
REF_ENTITY_DOMAIN => 'string'
The object type on which the data metric function is set.
If the object is a kind of table, use
'TABLE'
as the argument value.If the object is a view or materialized view, use
'VIEW'
as the argument value.For a list of supported object types on which a data metric function can be set, see Supported table kinds.
Returns¶
The function returns the following columns:
Column name |
Data type |
Description |
---|---|---|
|
TIMESTAMP_LTZ |
The time the DMF is scheduled to run based on the schedule that you set for the table or view. |
|
TIMESTAMP_LTZ |
The time the DMF trigger operation occurred, or For information about the trigger operation, see Schedule your DMFs to run. |
|
TIMESTAMP_LTZ |
The time at which the metric is evaluated. |
|
NUMBER |
Internal/system-generated identifier of the table where the rule is associated. Rules could either be associated directly to the table or to any column of the table. |
|
VARCHAR |
Name of the table. |
|
VARCHAR |
Name of the schema name that contains the table. |
|
VARCHAR |
Name of the database that contains the table. |
|
NUMBER |
Internal/system-generated identifier of the metric. |
|
VARCHAR |
Name of the metric. |
|
VARCHAR |
Name of the schema that contains of the metric. |
|
VARCHAR |
Name of the database that contains the metric. |
|
VARCHAR |
Return type of the metric. |
|
ARRAY |
An array that contains IDs of reference arguments used to evaluate the rule. Entries of the array are ordered by the positions of arguments. |
|
ARRAY |
An array that contains types of reference arguments used to evaluate the rule. Entries of the array are ordered by the positions of arguments. Currently only supports COLUMN type arguments. |
|
ARRAY |
An array that contains names of reference arguments used to evaluate the rule. Entries of the array are ordered by the positions of arguments. |
|
VARCHAR |
The ID to uniquely identify the metric entity reference, known as the association ID. |
|
VARIANT |
The result of the evaluation. |
Access control requirements¶
To access this function, the role in use must have the SNOWFLAKE.DATA_QUALITY_MONITORING_LOOKUP application role, at a minimum. For other application role options, see Managing access to the DMF results. Use the GRANT APPLICATION ROLE command to grant the application role to a role.
To view results, the role in use must also have the following privileges:
The SELECT or OWNERSHIP privileges on the object (table or view) to which the data metric function is assigned.
The USAGE or OWNERSHIP privileges on the data metric function.
Usage notes¶
Errors occur if the specified object name does not exist or if the query operator is not authorized to view any data metric function on
the object. Unsupported object types listed as the REF_ENTITY_DOMAIN, such as 'stream'
, also return errors.
Examples¶
Return a row for each data metric function assigned to the table named my_table
:
USE DATABASE SNOWFLAKE; USE SCHEMA LOCAL; SELECT * FROM TABLE(SNOWFLAKE.LOCAL.DATA_QUALITY_MONITORING_RESULTS( REF_ENTITY_NAME => 'my_db.my_schema.my_table', REF_ENTITY_DOMAIN => 'table'));