For years, the standard approach to analytics engineering was the ‘single project’ model. You had one giant dbt repository, one massive dbt_project.yml, and a lineage graph that looked like a bowl of spaghetti. But as I’ve scaled projects for larger teams, I’ve found that this monolith eventually becomes a bottleneck. CI/CD times skyrocket, a single typo in a staging model can break the entire warehouse, and ownership becomes a blurred mess.
This is where scaling data pipelines with dbt mesh changes the game. Instead of one giant project, dbt Mesh allows you to split your warehouse into multiple, independent dbt projects that can still reference each other. It’s essentially microservices for your data transformation layer.
The Challenge: The Monolith Bottleneck
In my experience, the breaking point happens when you hit about 15-20 engineers working in a single repository. You start seeing these specific friction points:
- The CI/CD Wall: Running
dbt teston the entire project takes 40 minutes, killing developer velocity. - Ownership Ambiguity: Who owns the
dim_customersmodel? The Marketing team? The Core Data team? Everyone touches it, so no one owns it. - Blast Radius: A change in a low-level source model triggers a full rebuild of 500 downstream models, costing thousands in Snowflake or BigQuery credits.
If you’re just starting out, you might be looking for a setting up a dbt cloud pipeline tutorial to get the basics right, but once you hit scale, the architecture itself must evolve.
Solution Overview: What is dbt Mesh?
dbt Mesh isn’t a new tool; it’s a design pattern enabled by Cross-Project References. In a mesh architecture, you divide your data domain into separate projects. For example, you might have a core_analytics project and a marketing_analytics project.
The magic happens when the Marketing project references a model produced by the Core project without needing to import the entire source code. This is achieved by marking models as public, effectively creating a ‘Data Contract’ between the producer and the consumer.
Techniques for Distributed Pipelines
1. Defining Public Models
To scale data pipelines with dbt mesh, you must be intentional about what you expose. Not every model should be public. I recommend a ‘Hub and Spoke’ model where only the final, curated marts are public.
# In the Core Project: models/marts/dim_customers.yml
version: 2
models:
- name: dim_customers
config:
materialized: table
access: public # This allows other projects to reference this model
description: "The gold-standard customer dimension table"
2. Cross-Project Referencing
When the Marketing project needs dim_customers, it no longer uses a local ref(). Instead, it uses the project-qualified reference:
-- In the Marketing Project
select *
from {{ ref('core_analytics', 'dim_customers') }}
where segment = 'enterprise'
This decoupling means the Marketing team can run their pipelines independently of the Core project’s internal staging logic. If you are debating whether to use dbt for this or a traditional ETL tool, check out my breakdown of dbt vs matillion for enterprise etl to see where the logic should live.
Implementation Strategy
I’ve found that migrating to a mesh is most successful when done incrementally. Don’t try to split everything at once.
- Audit the Lineage: Use the dbt DAG to find natural cleavage points where domains (Finance, HR, Product) are clearly separated.
- Extract a Leaf Project: Move the most independent domain (e.g., Marketing) into its own project first.
- Establish Contracts: Define exactly which models the leaf project needs from the core. Mark those as
public. - Automate Deployment: Set up separate CI/CD pipelines for each project so that the Marketing team can deploy changes in 2 minutes, regardless of the Core project’s size.
As shown in the architecture diagram above, this creates a system where the ‘Core’ team provides the infrastructure, and ‘Domain’ teams provide the specific business logic.
The Pitfalls of dbt Mesh
It’s not all sunshine and rainbows. Scaling data pipelines with dbt mesh introduces new complexities:
- Dependency Tracking: While dbt handles the references, you now have to coordinate deployments. If the Core team changes a column name in a
publicmodel, the Marketing project will fail. - Governance Overhead: You need a strict naming convention across projects to avoid confusion.
- Tooling requirements: dbt Mesh features are primarily optimized for dbt Cloud. If you are on dbt Core (open source), you’ll have to build a lot of the cross-project orchestration yourself using Airflow or Dagster.
Final Verdict
dbt Mesh is the answer for organizations that have outgrown the monolith. By shifting from a centralized project to a distributed mesh, you trade some architectural simplicity for massive gains in developer velocity and system stability.
If your team is spending more time waiting for CI/CD and arguing over merge conflicts than actually building models, it’s time to start scaling your data pipelines with dbt mesh.