Data Science Collective

Advice, insights, and ideas from the Medium data science community

Member-only story

From Guidelines to Guardrails: Enforcing dbt Best Practices with CI/CD

6 min readMar 3, 2025

--

As a data engineer, I navigate a sea of commits and merge requests in our dbt repository every day. We strive to keep it as clean and structured as possible, backed by detailed documentation and clear guidelines. But let’s be honest — documentation often gets overlooked or skipped. This article was born out of one of those moments when I realized we needed a more efficient way to enforce best practices. I wanted to speed up the feedback cycle on MRs, ensure implementation rules — like naming conventions — aren’t missed, and enhance compliance and consistency across the repository. Most importantly, I wanted to create a system where contributors naturally follow the same standards, even if maintainers change and documentation fades into the background.

Photo by Christina @ wocintechchat.com on Unsplash

In this article, we will step-by-step create a CI/CD pipeline that ensures the developer cannot merge an MR of a dbt model without also adding a test to it. I will use the dbt project evaluator package for this purpose which has many tests for implementing the dbt best practices. So let’s start with the dbt-project-evaluator package and take a deeper look at it first.

dbt project evaluator

--

--

Data Science Collective
Data Science Collective

Published in Data Science Collective

Advice, insights, and ideas from the Medium data science community

Sezin Sezgin-Rummelsberger
Sezin Sezgin-Rummelsberger

Written by Sezin Sezgin-Rummelsberger

Data Engineer | Writing articles on Data & Analytics Engineering | MSc | https://de.linkedin.com/in/sezinsezgin

No responses yet