Projects

Production pipelines for dbt models

Databricks
PySpark
SQL
dbt
Jenkins

Best practices applied in CI/CD.

Project illustration.

The problem


Shipping new analytics models to production was slow, manual, and unreliable. The flow depended on operational runbooks and heavy human intervention, without standardized technical gates to validate quality before promotion. That caused:

  • High lead time to put new models in production.
  • High error risk from lack of automated validation.
  • Low predictability in the deploy process.
  • Difficulty scaling the team’s delivery volume.

Historically, publishing new tables took about 3 days.


The solution


A dbt CI/CD pipeline was designed and implemented for fast, safe, and auditable productionization, using Jenkins and project automation scripts.

1) Pipeline design by execution type

Pipelines were tailored to different delivery contexts (e.g. PR validation, merge flow, and environment-specific runs).

  • Run routing by branch or event.
  • Clear separation between validation and promotion.
  • A single, standardized path for all new models.

2) Quality gate in productionization

The pipeline was configured not to promote code without technical checks:

  • dbt build as validation.
  • Support for tests and declarative checks already defined in the project.
  • Automatic failure on build/quality issues.
  • Traceability of what was validated in each run.
  • Code linting with SQLFluff.

3) Faster, cheaper validation runs using dbt state

Change-driven incremental runs were added to speed validation pipelines:

  • state:modified+ strategy when prior state exists.
  • Fallback to full build when required.
  • Shorter CI time without losing impact safety.

Outcomes


✅ Sharp drop in lead time: new table productionization went from ~3 days to about 1 hour.
✅ More reliable operations: deploy no longer depended on manual steps and now follows automated gates.
✅ Team scalability: more new models could be delivered with less risk.
✅ Process standardization: one validation and promotion flow.
✅ Strong satisfaction from the technical team: analytics engineers reported consistently positive feedback on the new pipeline.