↓ Skip to main content

Data quality

Data quality rules need an explicit owner and a clear place to run. A dbt test detects a violation; a database constraint can enforce a rule, with support depending on the platform.

The guide to dbt tests and constraints explains the difference and shows how to express these checks in YAML. For related tooling, see dbt-guard.

dbt Data Tests in YAML: Stop Praying Your Data Is Correct

dbt Data Tests in YAML: Stop Praying Your Data Is Correct

··1601 words·8 mins
A report spits out weird numbers. An analyst tells you “the totals don’t match,” and you spend your day tracing back up the chain. The habit I keep coming back to is boring: dbt data tests, declared in YAML beside the columns, and actually run in CI. Tell the pipeline what you expect before a dashboard tells you what went wrong.