> ## Documentation Index
> Fetch the complete documentation index at: https://docs.snowflake.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction to data quality checks

Data Quality Monitoring requires Enterprise Edition. To inquire about upgrading, please contact
[Snowflake Support](https://docs.snowflake.com/user-guide/contacting-support).

Data quality checks in Snowflake continuously validate the health of your data. These checks help you comply with regulatory standards, meet
service-level agreements through accurate metrics, and build credibility in data-driven decisions by providing automated, consistent data
validation. Cortex Data Quality lets you leverage AI to agentically suggest data quality checks based on characteristics of your metadata
and usage patterns, eliminating the need to manually define checks and accelerating your setup process while keeping your data securely
inside Snowflake. Once configured, quality checks run automatically on your chosen schedule, reporting violations so you can take corrective
action.

## Get started

Snowflake provides a web interface to set up data quality checks and monitor the results of these checks.

To get started, do one of the following:

- To set up data quality checks for your data, see [Use Snowsight to set up data quality checks](/user-guide/data-quality-ui-setup).
- To monitor the results of your existing data quality checks on a specific table or view, see [Monitoring data quality checks in Snowsight](/user-guide/data-quality-ui-monitor).
- To monitor data quality health across your entire account, see [Using the data quality monitoring dashboard](/user-guide/data-quality-centralized-dashboard).

<a id="label-data-quality-core-concepts"></a>

## Core concepts of data quality checks

<dl>
<dt>Data metric function (DMF)</dt>
<dd>

A DMF measures an attribute of your data such as how many NULL values exist in a column or how often a table is being updated. The DMF
returns a value based on the current state of your data, but doesn't define whether that value constitutes a data quality issue; a DMF is
a building block of a data quality check.

Snowflake provides *system DMFs* to measure common metrics without requiring configuration. For a list of the system DMFs that are
available for various dimensions, see [System data metric functions](/user-guide/data-quality-system-dmfs).

If there isn't a system DMF for the metric that you want to monitor, you can define a *custom DMF*. To learn how to create a custom DMF,
see [Custom data metric functions](/user-guide/data-quality-custom-dmfs).

</dd>
<dt>Expectations</dt>
<dd>

An expectation is combined with a DMF to create a data quality check. When a DMF returns a value, it's compared to the expectation's
definition to determine whether data passed or failed the check. Return values that fail the check are reported as expectation violations
so you can take appropriate action.

If you [use Snowsight to create a data quality check](/user-guide/data-quality-ui-setup), you choose the DMF and define the expectation at the
same time. You can also [use SQL to work with expectations directly](/user-guide/data-quality-expectations).

</dd>
<dt>Anomaly detection</dt>
<dd>

Anomaly detection uses historical data to automatically detect when a DMF return value is above or below a predicted range. Currently,
Snowflake can automatically detect anomalies in the volume and freshness of your data. For more information, see
[Detecting anomalies in data quality](/user-guide/data-quality-anomaly).

</dd>
<dt>DMF schedule</dt>
<dd>

The DMF schedule for a table or view determines how often a DMF runs. Because a DMF powers a data quality check, the DMF schedule
determines how often the quality check is performed. By default, the DMF schedule runs a DMF once every hour. To adjust the schedule for
a table or view, see [](#label-data-quality-ui-setup-schedule).

The DMF schedule doesn't affect how often Snowflake checks whether there is an anomaly.

</dd>
</dl>

<a id="label-data-quality-supported-tables"></a>

## Supported table kinds

You can set a DMF on the following kinds of table objects:

- Dynamic table
- Event table
- External table
- %iceberg-tm% table
- Materialized view
- Table (CREATE TABLE), including temporary and transient tables
- View

You cannot set a DMF on a hybrid table or a stream object.

<a id="label-data-quality-cost"></a>

## Cost considerations

The DMFs that power data quality checks use [serverless compute resources](#label-serverless-credit-usage) that incur costs. For the
pricing of these costs, see [Snowflake Service Consumption Table](https://www.snowflake.com/legal-files/CreditConsumptionTable.pdf).

The credits consumed by the serverless compute resources are listed under the "Data Quality Monitoring" category on your monthly bill.
These credits include compute consumed by all system or user-defined data quality metrics that you use. You are not billed for creating a
DMF.

For schema-level anomaly detection, Snowflake can evaluate checks for multiple tables as a batch. The
[DATA_QUALITY_MONITORING_USAGE_HISTORY view](/sql-reference/account-usage/data_quality_monitoring_usage_history) attributes the batch's
compute cost to the participating tables based on the number of DMF associations for each table in the batch. For more information about
schema-level checks, see [Monitor the data quality of a schema](/user-guide/data-quality-schema-level).

- Billing occurs only when a scheduled DMF is computed on an object. You are not billed for unscheduled data metric
  function usage, such as calling a DMF with a SELECT statement.
- The logging infrastructure consolidates metric outputs in the event table. Consumption incurred by the logging service shows up on
  your monthly bill as "Logging."
- During this preview, Snowflake runs automatic checks in the background to identify popular
  schemas with preliminary data quality issues. These checks are provided by Snowflake and do not
  incur any charges to your account. See [Using the data quality monitoring dashboard](/user-guide/data-quality-centralized-dashboard).

To track consumption related to quality checks, you can query the following views:

<blockquote>

- [DATA_QUALITY_MONITORING_USAGE_HISTORY](/sql-reference/account-usage/data_quality_monitoring_usage_history) to
  track your credit consumption related to using DMFs in your account.
- [METERING_DAILY_HISTORY](/sql-reference/organization-usage/metering_daily_history) to track the daily credits consumed for an
  account in your organization. The `service_type` column specifies `DATA_QUALITY_MONITORING`.

</blockquote>

## Replication

For information about replication and DMFs, see [](#label-replication-data-quality).

<a id="label-data-quality-limitations"></a>

## Limitations

Note the following limitations when using DMFs:

- You can only have 50,000 total associations of DMFs on objects per account. Each instance of setting a DMF on a table or view counts as
  one association.
- [Data sharing](/user-guide/data-sharing-intro): You can't grant privileges on a DMF to a share or set a DMF on a shared table or view.
- Setting a DMF on an object tag is not supported.
- You can't set a DMF on objects in a [reader account](#label-about-reader-accounts).
- Trial accounts don't support this feature.