System data metric functions

This topic is a reference for the system data metric functions (DMFs) that Snowflake provides to all accounts. DMFs are the building block of data quality checks.

About system DMFs

Snowflake provides system DMFs in the CORE schema of the shared SNOWFLAKE database. System DMFs are maintained by Snowflake; you cannot change the name or functionality of any system DMF.

Each system DMF enables you to measure a different data quality attribute. You can assign more than one system DMF to a table or view to allow for a more comprehensive data quality measurement to address your governance and compliance needs.

System DMFs

Currently, Snowflake supports these system DMFs to measure common metrics without having to define them:

CategorySystem DMFDescription
AccuracyBLANK_COUNTDetermine how many blank values are in a column.
BLANK_PERCENTDetermine what percentage of a column’s values are blank.
CASE_FORMAT_VIOLATION_COUNTDetermine how many non-NULL values in a string column have inconsistent casing (not all-uppercase, all-lowercase, or title-case).
CASE_FORMAT_VIOLATION_PERCENTDetermine what percentage of non-NULL values in a string column have inconsistent casing.
FUTURE_TIMESTAMP_COUNTDetermine how many values in a date/timestamp column are in the future relative to the scheduled evaluation time.
FUTURE_TIMESTAMP_PERCENTDetermine what percentage of values in a date/timestamp column are in the future relative to the scheduled evaluation time.
INVALID_JSON_COUNTDetermine how many non-NULL values in a string column are not valid JSON.
INVALID_JSON_PERCENTDetermine what percentage of non-NULL values in a string column are not valid JSON.
INVALID_NUMERIC_TYPE_CAST_COUNTDetermine how many non-NULL values in a string column cannot be parsed as numeric.
INVALID_NUMERIC_TYPE_CAST_PERCENTDetermine what percentage of non-NULL values in a string column cannot be parsed as numeric.
NEGATIVE_COUNTDetermine how many values in a numeric column are negative.
NEGATIVE_PERCENTDetermine what percentage of values in a numeric column are negative.
NULL_COUNTDetermine how many NULL values are in a column.
NULL_PERCENTDetermine what percentage of a column’s values are NULL.
SPECIAL_CHARACTER_COUNTDetermine how many non-NULL values in a string column contain characters outside the alphanumeric range.
SPECIAL_CHARACTER_PERCENTDetermine what percentage of non-NULL values in a string column contain characters outside the alphanumeric range.
UNTRIMMED_STRING_COUNTDetermine how many non-NULL values in a string column have leading or trailing whitespace.
UNTRIMMED_STRING_PERCENTDetermine what percentage of non-NULL values in a string column have leading or trailing whitespace.
ZERO_COUNTDetermine how many values in a numeric column are equal to zero.
ZERO_PERCENTDetermine what percentage of values in a numeric column are equal to zero.
FreshnessFRESHNESSDetermine the freshness of a table’s data based on a timestamp column or the most recent DML operation.
DATA_METRIC_SCHEDULE_TIMEDefine custom freshness metrics.
StatisticsAPPROX_QUANTILE_25Determine the approximate 25th percentile value for a numeric column.
APPROX_QUANTILE_50Determine the approximate 50th percentile (median) value for a numeric column.
APPROX_QUANTILE_99Determine the approximate 99th percentile value for a numeric column.
AVGDetermine the average value of a column.
MAXDetermine the maximum value of a column.
MEDIANDetermine the exact median value for a numeric column.
MINDetermine the minimum value of a column.
STDDEVDetermine the standard deviation value for a column.
STRING_LENGTH_AVGDetermine the average string length of non-NULL values for a string column.
STRING_LENGTH_MAXDetermine the maximum string length of non-NULL values for a string column.
STRING_LENGTH_MINDetermine the minimum string length of non-NULL values for a string column.
VARIANCEDetermine the variance value for a numeric column.
UniquenessACCEPTED_VALUESDetermine whether values in a column match a Boolean expression.
DUPLICATE_COUNTDetermine the number of duplicate values in a column, including NULL values.
UNIQUE_COUNTDetermine the number of unique, non-NULL values in a column.
VolumeROW_COUNTDetermine how many records are in the table or view.