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.

In production

dbt Cloud offers email and Slack notifications when tests fail.

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 via plain SQL SELECT statements.

Useful for defining accepted ranges (ex: refunds must have a negative value).


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 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.

Data testing stories

Learn from data teams who’ve made testing a key part of their workflow.

Get started with dbt

Create an account to start transforming & testing your data with dbt Cloud.

Get started