CI/CD for dbt projects enables automated testing and deployment of data warehouse transformations through the same pull request workflow used for application code. A dbt CI pipeline runs on every pull request: it compiles the project to catch Jinja syntax errors, runs `dbt build --select state:modified+` to test only changed models against a development schema, and blocks the merge if any test fails. A dbt CD pipeline runs on merge to main and deploys changes to production. No untested SQL transformation reaches production.
The key dbt CI/CD concept is `state:modified+` — a dbt selection method that identifies which models have changed (their compiled SQL has changed) and selects them plus all their downstream dependents. Running `dbt build --select state:modified+` in a CI pipeline builds and tests the changed model and all models that depend on it, without running the entire project. This makes CI fast even for large projects: a change to one staging model only rebuilds that model and its downstream marts, not the hundreds of other models in the project.
Analogy🏏Cricket
🏏 Think of it like cricket: OLTP is the IPL's live ticketing counter — it handles thousands of simultaneous seat reservations, each requiring a precise single-seat record update with immediate confirmation. Speed per transaction and data consistency under concurrent updates are everything. OLAP is the IPL's season statistics department — it runs complex analytical queries across every ball bowled in every match of every season to produce the published rankings, economy rates, and historical comparisons. No one books a seat through the statistics department, and no broadcaster calls the ticketing counter for Bumrah's career economy rate. The two workloads demand completely different systems. Just as the ticketing counter is built for speed and correctness on one seat at a time and would buckle if asked to tally a decade of attendance mid-sale, an OLTP row-store excels at single-record writes but chokes on full-table aggregation; and just as the statistics department pores over millions of past deliveries but would be hopeless at booking a live seat under contention, the OLAP columnar engine sweeps billions of rows yet is the wrong tool for a fast single-row update. The physical design of each — row-oriented for the counter, columnar for the stats desk — is what makes it superb at its own job and unfit for the other's.
🏏 Showing the Cricket analogy — a Cricket version isn’t available for this concept yet.