Slim CI, state and defer
Build and test only what a pull request changed with state:modified+, --defer and dbt clone.
Pipelines in production · dbt · Gold · CI and governance, lesson 1 of 2
On this page
Read first: ref() and the DAG · var(), target and environments (skip if you know them)
In plain words first
After changing one recipe, a restaurant tastes that dish and the dishes that use it, not the whole menu. For the unchanged ingredients, it borrows from the main kitchen instead of making them again.
Slim CI is exactly that: build the changed modelsmodel: A SELECT statement in a .sql file. dbt runs it and saves the result in the warehouse as a table or view named after the file. Learn more → and their children, and --defer to production for the rest.
Unlock the full lesson
You have read the free part. The rest of this advanced lesson:
- Why CI needs to be slim
- State: the production manifest
- dbt clone
- Retry and result selectors
- A CI and production setup
- Common mistakes
- Key takeaways
- Interview prep with 3 follow-up questions
- Check yourself: 3 questions
Unlock it with the Complete pass (every advanced problem and lesson) or on its own.
Keep going
Up next · CI and governance · lesson 2 of 2 · 5 min readContracts, versions and access
Guarantee a model's columns and types, version breaking changes, and control who may ref a model.
Related lessons
Previous: Late data and idempotent incrementals
Primary sources: Stateful selection · Defer · dbt clone