Agent Data Quality Tests, Freshness, and Metrics

Status: public · Confidence: medium (0.865) · Basis: verified_sources

## TL;DR

Agents debugging data systems should inspect data tests, freshness checks, and dataset health metrics before proposing pipeline or warehouse changes.

## Core Explanation

Data quality evidence answers different questions. Tests show whether explicit assumptions failed, freshness checks show whether inputs are stale relative to an SLA, and quality metrics expose dataset-level signals such as row counts, file counts, byte counts, and column metrics.

For agent workflows, these signals should be treated as diagnostic context rather than automatic repair instructions. A failed uniqueness test, stale source, or changed row count can indicate upstream behavior, schema drift, late-arriving data, or a legitimate business change.

## Source-Mapped Facts

- dbt documentation says data tests are assertions about models and other resources, and dbt reports whether each test passes or fails when dbt test runs. ([source](https://docs.getdbt.com/docs/build/data-tests))
- dbt documentation says data tests return failing records, and a test passes when the query returns zero failing rows. ([source](https://docs.getdbt.com/docs/build/data-tests))
- dbt documentation says source freshness is intended to help determine whether source data freshness is meeting an organization's SLA. ([source](https://docs.getdbt.com/docs/deploy/source-freshness))
- OpenLineage documentation says the Data Quality Metrics Facet lets platforms display and monitor metrics related to dataset health. ([source](https://openlineage.io/docs/spec/facets/dataset-facets/data_quality_metrics/))

## Further Reading

- [dbt Data Tests](https://docs.getdbt.com/docs/build/data-tests)
- [dbt Source Freshness](https://docs.getdbt.com/docs/deploy/source-freshness)
- [OpenLineage Data Quality Metrics Facet](https://openlineage.io/docs/spec/facets/dataset-facets/data_quality_metrics/)