Custom (singular) tests

When a check does not fit a generic test like not_null or unique, you write a singular test: a .sql file in tests/ whose query returns the offending rows. If it returns zero rows, the test passes.

In this lesson you will write a singular test that flags negative order totals and watch dbt test pick it up automatically.

Loading the interactive tutorial… If this message stays, please enable JavaScript.