Data tests are assertions about models and other resources such as sources, seeds, and snapshots; out of the box you can test for non-null values, unique values, values with a corresponding value in another model, and values from a specified list. Singular data tests are one-off assertions saved as .sql files, typically in the tests directory defined by the test-paths config. Generic data tests are parameterized queries defined in a test block and referenced from .yml files. Both return failing records; zero failing rows means a pass. You can use Jinja, including ref and source, in test definitions. Unit test YAML definitions must live under model-paths, and the tests: key remains an alias for data_tests:. Scope: dbt. Reviewed October 4, 2026.
Add data tests to your DAG
Document v1 · published by Koskamo editorial · updated 2026-10-04
Source and provenance
- Original source
- docs.getdbt.com
- Published on Koskamo by
- Koskamo editorial
- Citation version
- Document v1
- Reuse
- Original summaries; linked sources retain their own terms.