dbt in Practice · Lesson 2 of 5 · 14 min
Tests that catch real problems
A dbt test is a query that returns the bad rows. Zero rows means the test passes.
dbt tests are simple: each one is a query that looks for rows that break a rule. If the query returns nothing, the test passes. If it returns rows, dbt build stops before bad data reaches a dashboard.
Four tests come built in, and they catch most problems: