Skip to main content
AI & Data

A Practical Guide to dbt Tests

E
Esther Nakato

Sep 29, 2026 · 1 min read · 2 comments

If leadership loses trust in one dashboard, they stop trusting all of them. dbt tests are the cheapest insurance you can buy.

Start with the basics

unique and not_null on every primary key. They catch more bugs than anything clever.

Test relationships

Every foreign key should have a relationships test so orphaned rows fail the build.

Test the business rules

Custom tests like "revenue is never negative" encode what the business already believes.

Run them in CI

Tests that only run on someone's laptop are suggestions.

Share WhatsApp Post LinkedIn
3 Like 0 Insightful 0 Fire
Sign in to react and save

Discussion (2)

Sign in to join the discussion.

Olumide Bakare ·

Relationship tests caught an orphaned-orders bug for us within a day of adding them.

Nia Mwangi ·

We run these in CI on every pull request now. Dashboards finally agree.