Data testing & continuous integration
Deploy fearlessly with routine testing and CI/CD
Go from reactive to proactive
Trust is sensitive - it builds slowly, and can be erased quickly. Data practitioners understand this more than most. dbt enables data teams to deploy with the same confidence of software engineers, with rapid, reliable testing and CI/CD.
Building trust
Data testing in dbt
Teams using dbt typically verify data quality at four stages:
On source data
Use schema tests to verify raw data quality.
On transformations
Avoid fan-outs or missed joins in your staging models.
On deployment
Enable CI on dbt Cloud to execute tests against new PRs.
View analytic code inline
Pop into the data model itself for ad-hoc investigation while browsing docs.
Supported tests in dbt
dbt makes simple testing easy, and complex testing possible.
Schema testing
Validate essential data quality
Out of the box, dbt supports schema tests for uniqueness, null or accepted values, or referential integrity between tables.
These can be extended by writing your own custom schema tests.

Data value testing
Flag out-of-range values
Define data test failure conditions in simple code.
Packages
Implement complex testing logic
Packages like dbt-expectations, maintained by community member Claus Herther, supplement dbt’s native testing functionality.
This extends to statistical & distribution tests, or aggregate function tests - anything that can be written in SQL or Python can be tested in dbt.
CI on deployment
Validate your code before shipping
Avoid shipping low-quality analytics code, by validating every pull request prior to deployment. Each CI run builds your dbt project to a temporary schema in your warehouse.
Test your data where it lives
Whether your analytics data is stored in a cloud warehouse, data lake, lake house or beach house - you can transform and test it with dbt.