New: Cookbooks and AI ExplanationsStep-by-Step recipes to solve problems connected to Roadmaps and Cheat Sheets. Need more details? Use AI buttons for structured and simple explanations with concrete examples throughout the whole platform.Take a look
A broken model made it to production last week, and the first anyone heard about it was a Slack message from the CEO's dashboard.
What you'll have at the end
A CI job that builds and tests only the changed models on every pull request, and fails it before a merge can happen
You need
A dbt project that already builds successfully with its own dev target, with at least one generic test such as unique already attached to a model, hosted in a GitHub repository where someone can change branch settings.
Not covered
Building or scheduling the production deploy job itself, and a multi-warehouse setup where the CI runner can't see production data at all: defer only works when the CI target and the production job point at the same warehouse.
Leans on
Give dbt a dev target
for the personal sandbox this CI check has nothing to do with, since a developer's own dev target stays theirs while this recipe's schema exists only for the length of one pull request
Writing a custom dbt test
for adding the kind of test this gate is only as good as, since a broken compile is the easy case and a wrong number with no test attached sails straight through untouched
Checked 25 Aug 2026
Part of the dbt (Data Build Tool) cookbook