What Is a Data Mesh? Data Products Explained for Analytics Engineers
A data mesh moves ownership of analytical data to the teams that produce it. What that means, what a data product is, and what one looks like in a dbt project.
On this page · 15 sections
- What a data mesh is
- The four principles of data mesh
- What a data product is
- Centralized warehouse team vs data mesh
- What a data product looks like in dbt
- A worked example
- When a data mesh is not worth it
- Common misconceptions
- Frequently Asked Questions
- What are the four principles of a data mesh?
- How do you define a data product in a data mesh?
- What does a data product owner do?
- How is a data mesh different from a data lake or a data warehouse?
- Do you need dbt Mesh to build data products in dbt?
- Primary sources and further reading
- Topic
- Data Modeling
- Category
- Architecture
A data mesh is a way of organizing analytical data in which each business domain, such as finance or marketing, owns and publishes its own data, and no central team owns all of it. Zhamak Dehghani introduced the term in 2019 and later defined it by four principles: domain ownership, data as a product, a self-serve data platform, and federated computational governance. A data product is what a domain publishes: a dataset with a named owner, a described structure, and stated quality levels that other teams can find and rely on. For analytics engineers, the closest thing in a dbt project is a public model with an owner and an enforced contract.
What a data mesh is
Dehghani, then a consultant at Thoughtworks, described the idea in a 2019 article on martinfowler.com. Her starting point is the centralized data platform: one data warehouse or data lake, run by one team, that ingests, cleans, and serves data from every part of the company. She names three ways it fails as a company grows. One platform owns data that belongs to many unrelated domains. Its teams are split by pipeline stage (ingest, clean, aggregate, serve), so one new dataset needs coordinated changes in every stage. And its data engineers know the tooling but not the domains that produce or use the data, while consumers compete for a place in their backlog.
A data mesh reverses the flow. Each domain hosts and serves its own datasets in a form others can use. Storage can still be shared, central infrastructure. What moves is ownership. The scope is analytical data, the historical record used for reporting and machine learning, not the operational data that applications run on.
The four principles of data mesh
Dehghani's 2020 follow-up article states four principles, which she intends to be collectively necessary and sufficient.
- Domain-oriented decentralized data ownership and architecture. The teams closest to the data own and serve it. In her media-company example, the podcasts team also publishes the history of released podcasts and their listenership.
- Data as a product. A domain treats the analytical data it provides as a product and its users as customers. Without it, spreading data across more teams would make it harder to find and trust. Accountability for data quality moves upstream, close to the source.
- Self-serve data infrastructure as a platform. A platform team provides storage, pipeline tooling, cataloging, and access control as a service with no business logic in it, so domains do not each build a stack.
- Federated computational governance. Representatives of the domains and the platform agree on a few global rules, such as how a listener is identified across domains, and the platform enforces them automatically. Everything else, including how a domain models its data, stays local.
What a data product is
In the 2020 article a data product is the smallest unit of the architecture that can be deployed on its own. It bundles code (pipelines, access interfaces, policy enforcement), the data with its metadata, and the infrastructure to run it. The data can be served as events, files, or tables.
The 2019 article lists the qualities a domain dataset needs before it counts as a product:
- Discoverable. It is registered in a data catalog, a searchable registry of datasets, with its owner, origin, sample data, and lineage (the record of what it was built from).
- Addressable. It has a unique address that follows a company-wide convention.
- Trustworthy and truthful. The owner publishes service level objectives (SLOs), target levels for things such as timeliness and error rates, and tests the data where it is created.
- Self-describing. Its schema and meaning are documented well enough to use without asking the owner.
- Interoperable. It follows global standards, such as shared identifiers, so it can be joined with other domains' data.
- Secure. Access policies are defined centrally and applied to each product.
Each domain also gets a data product owner, who sets the roadmap for its data products and decides when schemas change or are retired.
Centralized warehouse team vs data mesh
| Question | Centralized warehouse team | Data mesh |
|---|---|---|
| Who owns the analytical data | One central team owns and curates data from every domain | The domain team that produces it |
| Who builds the models and pipelines | Central data engineers, organized by pipeline stage | Data product developers inside each domain |
| Who defines quality | The central team cleans data after ingestion, and a central governance group certifies trusted datasets | Each data product owner sets and meets SLOs. The federated group defines how quality is modeled, and the platform automates it |
| How consumers find data | They ask the central team and wait in its backlog | Every data product registers itself in a catalog, with an owner and a unique address |
| In a dbt project | One project that the central team maintains | A group or a project per domain, with public models as the interface |
The rows follow Dehghani's two articles. The centralized cell in the "how consumers find data" row and the last row are this site's summary.
What a data product looks like in dbt
dbt builds tables and views in a warehouse from SQL SELECT statements called models. One model selects from another with the ref function. The dbt documentation groups the features below under model governance. Treating them as the parts of a data product is this site's reading.
- Groups and owners. A group is a named set of models (and other resources) with a required
owner, given as a name or an email. - Model access. A model is
private(only its own group can reference it),protected(anything in the same project, the default), orpublic(any group, package, or project). The documentation describes public models as an organization's data products. Access does not grant database permissions. - Model contracts. With
contract: enforced: trueyou declare every column's name and data type. dbt checks the model's query against that list before building and fails on a mismatch. A contract fixes a table's shape. Data tests check its contents. - Model versions. When a contracted model needs a breaking change, such as a removed column, you publish a new version and set a deprecation date on the old one, so consumers have time to migrate.
- Cross-project references. A model in one project references a public model in another with a two-argument
ref('project_name', 'model_name').
The documentation calls the combination dbt Mesh and describes it as a pattern, not a single product. It says access, contracts, versions, and groups are available in both dbt v1 and the dbt platform, the names it now uses. Project dependencies, which resolve cross-project references through a hosted metadata service, are only available on dbt platform Enterprise and Enterprise+ plans. The documented alternative is to install the upstream project as a package, which pulls in its full source code. In the dbt platform, Catalog lists public models for every user in the account.
A worked example
This project was run with dbt 1.12.7 and the Postgres adapter on PostgreSQL 16. Finance owns a private staging model, stg_orders, and a public table, fct_orders, that selects four columns from it. One YAML file declares the group, its owner, the access levels, and the contract:
groups:
- name: finance
owner:
name: Finance Analytics
email: finance-data@example.com
models:
- name: stg_orders
config:
group: finance
access: private
- name: fct_orders
config:
group: finance
access: public
materialized: table
contract:
enforced: true
columns:
- name: order_id
data_type: integer
constraints:
- type: not_null
- name: channel
data_type: text
- name: amount
data_type: numeric(10, 2)
- name: ordered_on
data_type: date
Marketing, a second group, builds its own model on the public table:
select
channel,
count(*) as orders,
sum(amount) as revenue
from {{ ref('fct_orders') }}
group by channel
dbt build created all three models and reported PASS=3 WARN=0 ERROR=0. In PostgreSQL, fct_orders has the contract's column types, and order_id is not null. When the marketing model is pointed at the private staging model, dbt stops before it runs anything:
Parsing Error
Node model.shop.orders_by_channel attempted to reference node model.shop.stg_orders, which is not allowed because the referenced node is private to the 'finance' group.
When Finance changes fct_orders to return amount as text, the table is not built and the marketing model is skipped:
Compilation Error in model fct_orders (models/finance/fct_orders.sql)
This model has an enforced contract that failed.
Please ensure the name, data_type, and number of columns in your contract match the columns in your model's definition.
| column_name | definition_type | contract_type | mismatch_reason |
| ----------- | --------------- | ------------- | ------------------ |
| amount | TEXT | DECIMAL | data type mismatch |
Declaring a second version of fct_orders without the channel column built fct_orders_v1 and fct_orders_v2 side by side, and dbt reported that the marketing model's unpinned ref still resolved to version 1. The dbt hub has more guides.
When a data mesh is not worth it
Dehghani presents data mesh as an answer to a problem of scale. She writes that the centralized model can work for organizations with a simpler domain and fewer kinds of consumption, and fails for enterprises with rich domains, many sources, and diverse consumers. The move also has requirements: each domain needs a data product owner and data engineers, and a platform team has to exist.
The dbt documentation draws a similar line. It says an organization with fewer than 500 models and fewer than a dozen regular dbt contributors is well served by a single project, and that governance features add maintenance if adopted while models are still changing.
This site's advice:
- If one team builds and maintains every model, keep one project. Splitting it adds interfaces to maintain and no new owners.
- If the domain teams have nobody who can maintain models, reassigning ownership will not improve the data. Train or hire first.
- Start inside one project: put models into groups with owners, mark internal models private, and add contracts to the tables other teams depend on. The dbt documentation suggests the same.
Common misconceptions
- "A data mesh is a product you can buy." Dehghani describes principles and a technology-agnostic architecture. The dbt documentation says dbt Mesh helps put a data mesh into practice, and that its governance features apply to models only.
- "Every domain gets its own silo." Dehghani says she is not arguing for fragmented, siloed domain data. Products must be discoverable, and global rules still apply.
- "A data mesh replaces the warehouse." In her description the warehouse and the lake become nodes on the mesh. For those storage designs, see lakehouse architecture.
- "A data product is a new kind of table." It is an ordinary modeled table (see warehouse schema design) with an owner, a contract, and documentation attached.
Frequently Asked Questions
What are the four principles of a data mesh?
Domain-oriented decentralized data ownership and architecture, data as a product, self-serve data infrastructure as a platform, and federated computational governance. Zhamak Dehghani stated them in her 2020 article.
How do you define a data product in a data mesh?
A data product is the analytical data a domain publishes for others, with the code that produces it, its metadata, and the infrastructure it runs on. Dehghani requires it to be discoverable, addressable, trustworthy, self-describing, interoperable, and secure.
What does a data product owner do?
The data product owner sets the roadmap for a domain's data products, decides when data and schemas change or are retired, and balances the needs of different consumers. Dehghani measures the role on data quality, consumer satisfaction, and the lead time to find and use the data.
How is a data mesh different from a data lake or a data warehouse?
A lake and a warehouse are ways to store and query data. A data mesh is about who owns the data and how teams share it. Dehghani treats lakes and warehouses as nodes on the mesh.
Do you need dbt Mesh to build data products in dbt?
No. Groups, model access, contracts, and versions work inside a single dbt project, as the example above shows. Of the features above, only project dependencies need a dbt platform Enterprise or Enterprise+ plan. The documentation also recommends keeping metrics in one project when several projects share a semantic layer.
Primary sources and further reading
- How to Move Beyond a Monolithic Data Lake to a Distributed Data Mesh, Zhamak Dehghani (2019). The term, the failure modes, data product qualities, and the data product owner.
- Data Mesh Principles and Logical Architecture, Zhamak Dehghani (2020). The four principles and the governance comparison.
- About model governance, dbt documentation. Feature availability.
- Model contracts, dbt documentation. Contracts versus tests.
- Model access, dbt documentation. Access levels.
- Model versions, dbt documentation. Breaking changes.
- Add groups to your DAG, dbt documentation. Groups and owners.
- Project dependencies, dbt documentation. Cross-project references and plans.
- About dbt Mesh, dbt documentation. dbt Mesh as a pattern.
- dbt Mesh FAQs, dbt documentation. Catalog and the 500-model guidance.
The dbt project was run with dbt 1.12.7 on PostgreSQL 16. The output is what dbt printed, with timestamps and macro trace lines removed. Sources were read in November 2026.
- Data Modeling
Top Data Modeling Best Practices for Efficient Analytics Engineering
Explore essential data modeling best practices to build scalable and efficient models, ensuring data accuracy and performance in analytics engineering.
- Fundamentals
DuckDB Tutorial: Install, Query CSV and Parquet, and Use It from Python
Learn how DuckDB enables fast local data analysis on your laptop. This tutorial covers installation, SQL queries, and integration with Python workflows.
- Data Modeling
Star Schema vs Snowflake Schema: Differences and a Worked SQL Example
A star schema keeps each dimension in one flat table. A snowflake schema splits it into sub-tables. The same sales data built both ways in PostgreSQL, with the joins and updates each design needs.
Drill it in the exercise library.
Portfolio-ready builds on this topic.
- advanced · open →
SQL Survival Challenge: Last City on Earth
Emergency operations analytics: triage supplies, power, and threats to keep the Last City alive.
- advanced · open →
Zombie Virus - Phase 3: The Cure
Cohort & effectiveness analytics: measure a vaccine's impact on infections, survivors, and city resilience.
