Schema:

LOCAL

DATA_QUALITY_MONITORING_LOGS view

This view displays a row for each structured log event emitted by a data metric function that produces per-event detail in addition to its aggregate result. The row’s value column holds the event payload as a VARIANT; the keys in that payload depend on the row’s signal_type.

The aggregate result of the DMF evaluation is written to DATA_QUALITY_MONITORING_RESULTS. The log rows in this view are correlated with that aggregate result by the run_id column.

Columns

The columns in the view are defined as follows:

Column nameData typeDescription
scheduled_timeTIMESTAMP_LTZThe time the DMF is scheduled to run based on the schedule that you set for the table or view.
change_commit_timeTIMESTAMP_LTZ

The time the DMF trigger operation occurred, or None if the DMF is not scheduled to run by a trigger operation.

For information about the trigger operation, see Adjust the schedule for DMFs.

measurement_timeTIMESTAMP_LTZThe time at which the metric was evaluated.
table_idNUMBERInternal/system-generated identifier of the table that the DMF is associated with.
table_nameVARCHARName of the table that the DMF is associated with.
table_schemaVARCHARName of the schema that contains the table that the DMF is associated with.
table_databaseVARCHARName of the database that contains the table that the DMF is associated with.
metric_idNUMBERInternal/system-generated identifier of the DMF.
metric_nameVARCHARName of the DMF that emitted the log row. For schema drift, this is SCHEMA_CHANGE_COUNT.
metric_schemaVARCHARName of the schema that contains the DMF.
metric_databaseVARCHARName of the database that contains the DMF.
reference_idVARCHARThe ID that uniquely identifies the metric entity reference, known as the association ID.
run_idVARCHAR

Identifier that correlates this log row with the aggregate row written to DATA_QUALITY_MONITORING_RESULTS for the same evaluation.

signal_typeVARCHARThe category of the log row. Currently SCHEMA_DRIFT.
valueVARIANT

Per-change payload. The keys in this object depend on signal_type. For SCHEMA_DRIFT rows, the keys are described in the next table.

For SCHEMA_DRIFT rows, the value VARIANT contains the following keys:

KeyData typeDescription
snow.data_metric.schema_change.change_typeVARCHAROne of ADD, DROP, RENAME, or TYPE_CHANGE.
snow.data_metric.schema_change.column_idNUMBERInternal/system-generated identifier of the column the change applies to.
snow.data_metric.schema_change.column_ordinalNUMBER1-based ordinal position of the column in the table.
snow.data_metric.schema_change.column_nameVARCHARCurrent name of the column after the change.
snow.data_metric.schema_change.data_typeVARCHARJSON-encoded descriptor of the column’s current data type.
snow.data_metric.schema_change.old_column_nameVARCHARPrevious column name. Populated only when change_type is RENAME.
snow.data_metric.schema_change.new_column_nameVARCHARNew column name. Populated only when change_type is RENAME.
snow.data_metric.schema_change.old_data_typeVARCHARJSON-encoded descriptor of the previous data type. Populated only when change_type is TYPE_CHANGE.
snow.data_metric.schema_change.new_data_typeVARCHARJSON-encoded descriptor of the new data type. Populated only when change_type is TYPE_CHANGE.

Access control requirements

The role used to query the view must be granted the SNOWFLAKE.DATA_QUALITY_MONITORING_VIEWER application role or the SNOWFLAKE.DATA_QUALITY_MONITORING_ADMIN application role.