Data tests are select queries that must return zero failing rows
Add data tests to your DAG
Guide to asserting uniqueness, non-null, relationships, and custom logic on dbt models and related resources.
Based on
Add data tests to your DAG | dbt Developer Hub
The guide reframes tests as data tests to distinguish them from unit tests, while keeping tests as a YAML alias for data_tests. Out of the box, teams can assert non-null, unique, foreign-key-like relationships, and membership in a value list. Custom business logic becomes a test when expressed as a select of failing rows.
Integrity checks sit in the project DAG and run with dbt test, so analytics and engineering teams learn early whether model SQL still matches declared expectations. Extending tests means encoding organizational rules in the same mechanism as the generics.
Governed shared meaning needs executable checks, not only descriptions: assertions about keys and allowed values are part of the contract between producers and every downstream consumer.
Put this to work on CoreModels
Related connectors and recipes
See all connectors →Take the next step
Try CoreModels, talk with our team, or explore more resources.