Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hybrid mesh blog #6174

Merged
merged 144 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
144 commits
Select commit Hold shift + click to select a range
f25df67
add branch
john-rock Jul 18, 2023
8a3f888
Merge pull request #615 from dbt-labs/repo-sync
john-rock Jun 4, 2024
c89d19a
Merge pull request #616 from dbt-labs/repo-sync
john-rock Jun 4, 2024
f57c109
Merge remote-tracking branch 'origin/current' into repo-sync
john-rock Jun 6, 2024
4d39b58
Merge remote-tracking branch 'public_docs/current' into repo-sync
john-rock Jun 6, 2024
8648c3b
Merge pull request #618 from dbt-labs/repo-sync
john-rock Jun 6, 2024
7a991e1
Merge pull request #619 from dbt-labs/repo-sync
john-rock Jun 6, 2024
8b064e9
Merge pull request #620 from dbt-labs/repo-sync
john-rock Jun 7, 2024
731fc9a
Merge pull request #622 from dbt-labs/repo-sync
john-rock Jun 8, 2024
4d12662
Merge pull request #623 from dbt-labs/repo-sync
john-rock Jun 10, 2024
8968545
Merge pull request #624 from dbt-labs/repo-sync
john-rock Jun 10, 2024
cc0a95d
Merge pull request #625 from dbt-labs/repo-sync
john-rock Jun 11, 2024
b7d9ed4
Merge pull request #626 from dbt-labs/repo-sync
john-rock Jun 12, 2024
831115f
Merge pull request #627 from dbt-labs/repo-sync
john-rock Jun 12, 2024
0b3302d
Merge pull request #628 from dbt-labs/repo-sync
john-rock Jun 14, 2024
78a6f14
Merge pull request #629 from dbt-labs/repo-sync
john-rock Jun 14, 2024
70ecf21
Merge pull request #630 from dbt-labs/repo-sync
john-rock Jun 15, 2024
321e1de
Merge pull request #631 from dbt-labs/repo-sync
john-rock Jun 17, 2024
612d4fd
Merge pull request #632 from dbt-labs/repo-sync
john-rock Jun 17, 2024
368763f
Merge pull request #633 from dbt-labs/repo-sync
john-rock Jun 18, 2024
fa504f5
Merge pull request #634 from dbt-labs/repo-sync
john-rock Jun 18, 2024
da946d9
Merge pull request #635 from dbt-labs/repo-sync
john-rock Jun 19, 2024
db66550
Merge pull request #636 from dbt-labs/repo-sync
john-rock Jun 19, 2024
70419e3
Merge pull request #637 from dbt-labs/repo-sync
john-rock Jun 19, 2024
f4df51e
Merge pull request #638 from dbt-labs/repo-sync
john-rock Jun 20, 2024
2a505be
Merge pull request #639 from dbt-labs/repo-sync
john-rock Jun 20, 2024
8c6f150
Merge pull request #640 from dbt-labs/repo-sync
john-rock Jun 21, 2024
66a6b36
Merge pull request #641 from dbt-labs/repo-sync
john-rock Jun 21, 2024
7ef03a2
Merge pull request #642 from dbt-labs/repo-sync
john-rock Jun 22, 2024
1c9563f
Merge pull request #643 from dbt-labs/repo-sync
john-rock Jun 24, 2024
a865f6d
Merge pull request #644 from dbt-labs/repo-sync
john-rock Jun 25, 2024
a8623db
Merge pull request #645 from dbt-labs/repo-sync
john-rock Jun 25, 2024
d624d8d
Merge pull request #646 from dbt-labs/repo-sync
john-rock Jun 25, 2024
c5ed645
Merge pull request #647 from dbt-labs/repo-sync
john-rock Jun 26, 2024
e6b35a4
Merge pull request #648 from dbt-labs/repo-sync
john-rock Jun 26, 2024
3206d84
Merge pull request #649 from dbt-labs/repo-sync
john-rock Jun 26, 2024
698d78a
Merge pull request #650 from dbt-labs/repo-sync
john-rock Jun 27, 2024
2cbfb77
Merge pull request #651 from dbt-labs/repo-sync
john-rock Jun 27, 2024
a65b143
Merge pull request #652 from dbt-labs/repo-sync
john-rock Jun 28, 2024
e00d270
Merge pull request #653 from dbt-labs/repo-sync
john-rock Jun 28, 2024
431fdda
Merge pull request #654 from dbt-labs/repo-sync
john-rock Jun 29, 2024
261a216
Merge pull request #655 from dbt-labs/repo-sync
john-rock Jul 1, 2024
c6450d9
Merge pull request #656 from dbt-labs/repo-sync
john-rock Jul 1, 2024
c4623d3
Merge pull request #657 from dbt-labs/repo-sync
john-rock Jul 2, 2024
fe03b00
Merge pull request #658 from dbt-labs/repo-sync
john-rock Jul 2, 2024
78526db
Merge pull request #659 from dbt-labs/repo-sync
john-rock Jul 3, 2024
9b01e7f
Merge pull request #660 from dbt-labs/repo-sync
john-rock Jul 3, 2024
a7ed078
Merge pull request #662 from dbt-labs/repo-sync
john-rock Jul 4, 2024
7d89cb5
Merge pull request #663 from dbt-labs/repo-sync
john-rock Jul 4, 2024
0511f39
Merge pull request #664 from dbt-labs/repo-sync
john-rock Jul 4, 2024
d4833d9
Merge pull request #665 from dbt-labs/repo-sync
john-rock Jul 5, 2024
98cfb27
Merge pull request #666 from dbt-labs/repo-sync
john-rock Jul 9, 2024
1b7c058
Merge pull request #667 from dbt-labs/repo-sync
john-rock Jul 9, 2024
fd5b1b0
Merge pull request #668 from dbt-labs/repo-sync
john-rock Jul 9, 2024
89e6149
Merge pull request #669 from dbt-labs/repo-sync
john-rock Jul 10, 2024
11dd94a
Merge pull request #670 from dbt-labs/repo-sync
john-rock Jul 10, 2024
809d6a0
Merge pull request #671 from dbt-labs/repo-sync
john-rock Jul 10, 2024
9096f79
Merge pull request #672 from dbt-labs/repo-sync
john-rock Jul 11, 2024
bda2ab9
Merge pull request #673 from dbt-labs/repo-sync
john-rock Jul 11, 2024
db6bac2
Merge pull request #674 from dbt-labs/repo-sync
john-rock Jul 12, 2024
62379ea
Merge pull request #675 from dbt-labs/repo-sync
john-rock Jul 12, 2024
850669c
Merge pull request #676 from dbt-labs/repo-sync
john-rock Jul 12, 2024
775eca4
Merge pull request #677 from dbt-labs/repo-sync
john-rock Jul 13, 2024
cccc4bd
Merge pull request #678 from dbt-labs/repo-sync
john-rock Jul 15, 2024
d07cc14
Merge pull request #679 from dbt-labs/repo-sync
john-rock Jul 15, 2024
d14f7d9
Merge pull request #680 from dbt-labs/repo-sync
john-rock Jul 16, 2024
35fb6b5
Merge pull request #681 from dbt-labs/repo-sync
john-rock Jul 16, 2024
0ef213a
Merge pull request #682 from dbt-labs/repo-sync
john-rock Jul 16, 2024
e166747
Merge pull request #683 from dbt-labs/repo-sync
john-rock Jul 17, 2024
9f32ef7
Merge pull request #684 from dbt-labs/repo-sync
john-rock Jul 17, 2024
9aec201
Merge pull request #685 from dbt-labs/repo-sync
john-rock Jul 18, 2024
5dd622b
Merge pull request #686 from dbt-labs/repo-sync
john-rock Jul 18, 2024
6ee59ce
Merge pull request #687 from dbt-labs/repo-sync
john-rock Jul 18, 2024
d21fba1
Merge pull request #688 from dbt-labs/repo-sync
john-rock Jul 19, 2024
3cc48bf
Merge pull request #689 from dbt-labs/repo-sync
john-rock Jul 19, 2024
1b5b1c7
Merge pull request #690 from dbt-labs/repo-sync
john-rock Jul 20, 2024
d4f4fb8
Merge pull request #691 from dbt-labs/repo-sync
john-rock Jul 20, 2024
42bb24e
Merge pull request #692 from dbt-labs/repo-sync
john-rock Jul 22, 2024
2062235
Merge pull request #693 from dbt-labs/repo-sync
john-rock Jul 23, 2024
82a9ee9
Merge pull request #694 from dbt-labs/repo-sync
john-rock Jul 23, 2024
73bfa11
Merge pull request #695 from dbt-labs/repo-sync
john-rock Jul 23, 2024
5c9752e
Merge pull request #696 from dbt-labs/repo-sync
john-rock Jul 24, 2024
8908926
Merge pull request #697 from dbt-labs/repo-sync
john-rock Jul 24, 2024
0dda7e4
Merge pull request #698 from dbt-labs/repo-sync
john-rock Jul 25, 2024
7e6a335
Merge pull request #699 from dbt-labs/repo-sync
john-rock Jul 25, 2024
b914a8e
Merge pull request #700 from dbt-labs/repo-sync
john-rock Jul 25, 2024
e7444c2
Merge pull request #701 from dbt-labs/repo-sync
john-rock Jul 26, 2024
e569797
Merge pull request #702 from dbt-labs/repo-sync
john-rock Jul 26, 2024
b7d0fd9
Merge pull request #703 from dbt-labs/repo-sync
john-rock Jul 26, 2024
1b15aa9
Merge pull request #704 from dbt-labs/repo-sync
john-rock Jul 29, 2024
24f4e02
Merge pull request #705 from dbt-labs/repo-sync
john-rock Jul 30, 2024
edb77e4
Merge pull request #706 from dbt-labs/repo-sync
john-rock Jul 30, 2024
ad068ce
Merge pull request #707 from dbt-labs/repo-sync
john-rock Jul 30, 2024
582195e
Merge pull request #708 from dbt-labs/repo-sync
john-rock Jul 31, 2024
1cdf759
Merge pull request #709 from dbt-labs/repo-sync
john-rock Jul 31, 2024
03bcd98
Merge pull request #710 from dbt-labs/repo-sync
john-rock Jul 31, 2024
d3810a1
Merge pull request #711 from dbt-labs/repo-sync
john-rock Aug 1, 2024
d96c62d
Merge pull request #712 from dbt-labs/repo-sync
john-rock Aug 1, 2024
a126524
Merge pull request #713 from dbt-labs/repo-sync
john-rock Aug 1, 2024
e403414
Merge pull request #714 from dbt-labs/repo-sync
john-rock Aug 2, 2024
a17b78e
Merge pull request #715 from dbt-labs/repo-sync
john-rock Aug 2, 2024
b926ac8
Merge pull request #716 from dbt-labs/repo-sync
john-rock Aug 2, 2024
e7930c6
Merge pull request #717 from dbt-labs/repo-sync
john-rock Aug 3, 2024
922a08e
Merge pull request #718 from dbt-labs/repo-sync
john-rock Aug 6, 2024
62fdae1
Merge pull request #719 from dbt-labs/repo-sync
john-rock Aug 6, 2024
bb21c11
Merge pull request #720 from dbt-labs/repo-sync
john-rock Aug 6, 2024
397d7c5
Merge pull request #721 from dbt-labs/repo-sync
john-rock Aug 7, 2024
2559542
Merge pull request #722 from dbt-labs/repo-sync
john-rock Aug 7, 2024
183f73b
Merge pull request #723 from dbt-labs/repo-sync
john-rock Aug 7, 2024
efb17bf
Merge pull request #724 from dbt-labs/repo-sync
john-rock Aug 8, 2024
f111eb8
Merge pull request #725 from dbt-labs/repo-sync
john-rock Aug 8, 2024
3cc8896
Merge pull request #726 from dbt-labs/repo-sync
john-rock Aug 8, 2024
1553df9
Merge pull request #727 from dbt-labs/repo-sync
john-rock Aug 9, 2024
288179a
Merge pull request #728 from dbt-labs/repo-sync
john-rock Aug 9, 2024
edae988
Merge pull request #729 from dbt-labs/repo-sync
john-rock Aug 12, 2024
5e238b5
Merge pull request #730 from dbt-labs/repo-sync
john-rock Aug 12, 2024
1ef9134
Merge pull request #731 from dbt-labs/repo-sync
john-rock Aug 13, 2024
d277e77
Merge pull request #732 from dbt-labs/repo-sync
john-rock Aug 13, 2024
08da781
Merge pull request #733 from dbt-labs/repo-sync
john-rock Aug 14, 2024
d2d2ffb
Merge pull request #734 from dbt-labs/repo-sync
john-rock Aug 14, 2024
f0d1f13
Merge pull request #735 from dbt-labs/repo-sync
john-rock Aug 15, 2024
88196d9
Merge pull request #736 from dbt-labs/repo-sync
john-rock Aug 15, 2024
07f37ee
Merge pull request #737 from dbt-labs/repo-sync
john-rock Aug 19, 2024
926c801
Merge pull request #738 from dbt-labs/repo-sync
john-rock Aug 21, 2024
c04d4c1
Merge pull request #739 from dbt-labs/repo-sync
john-rock Aug 21, 2024
f98a361
Merge pull request #740 from dbt-labs/repo-sync
john-rock Aug 22, 2024
1919fb4
Merge pull request #741 from dbt-labs/repo-sync
john-rock Aug 22, 2024
01cfb43
Merge pull request #742 from dbt-labs/repo-sync
john-rock Aug 23, 2024
c318bac
Merge pull request #743 from dbt-labs/repo-sync
john-rock Aug 23, 2024
ee70258
Merge pull request #744 from dbt-labs/repo-sync
john-rock Aug 23, 2024
3302b14
Merge pull request #745 from dbt-labs/repo-sync
john-rock Aug 24, 2024
a21fb67
add blog
mirnawong1 Sep 30, 2024
c0402bd
Merge branch 'current' into hybrid-mesh-blog
mirnawong1 Sep 30, 2024
98d1097
fix typo
mirnawong1 Sep 30, 2024
cc01624
Merge branch 'hybrid-mesh-blog' of https://github.com/dbt-labs/docs-i…
mirnawong1 Sep 30, 2024
af71d15
Update 2024-10-04-hybrid-mesh.md
mirnawong1 Sep 30, 2024
e0e5c95
update
mirnawong1 Sep 30, 2024
b7ca15a
natalie feedback
mirnawong1 Sep 30, 2024
17405b5
Merge branch 'current' into hybrid-mesh-blog
mirnawong1 Sep 30, 2024
6b751e4
Update website/blog/2024-10-04-hybrid-mesh.md
mirnawong1 Sep 30, 2024
89ce6cb
Update 2024-10-04-hybrid-mesh.md
mirnawong1 Sep 30, 2024
d99fd64
Rename website/static/img/blog/2024-10-04-hybrid-mesh/hybrid-mesh.png…
mirnawong1 Sep 30, 2024
554c00b
Rename website/static/img/blog/2024-09-30-hybrid-mesh-hybrid-mesh.png…
mirnawong1 Sep 30, 2024
9b3daab
Update website/blog/2024-10-04-hybrid-mesh.md
mirnawong1 Sep 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions website/blog/2024-10-04-hybrid-mesh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
title: "How Hybrid Mesh unlocks dbt collaboration at scale"
description: A deep-dive into the Hybrid Mesh pattern for enabling collaboration between domain teams using dbt Core and dbt Cloud.
slug: hybrid-mesh
authors: [jason_ganz]
tags: [analytics craft]
hide_table_of_contents: false
date: 2024-09-30
is_featured: true
---

One of the most important things that dbt does is unlock the ability for teams to collaborate on creating and disseminating organizational knowledge.

In the past, this primarily looked like a team working in one dbt Project to create a set of transformed objects in their data platform.

As dbt was adopted by larger organizations and began to drive workloads at a global scale, it became clear that we needed mechanisms to allow teams to operate independently from each other, creating and sharing data models across teams — [dbt Mesh](/best-practices/how-we-mesh/mesh-1-intro).

<!-- truncate -->

dbt Mesh is powerful because it allows teams to operate _independently_ and _collaboratively_, each team free to build on their own but contributing to a larger, shared set of data outputs.

The flexibility of dbt Mesh means that it can support [a wide variety of patterns and designs](/best-practices/how-we-mesh/mesh-3-structures). Today, let’s dive into one pattern that is showing promise as a way to enable teams working on very different dbt deployments to work together.

## How Hybrid Mesh enables collaboration between dbt Core and dbt Cloud teams

**_Scenario_** &mdash; A company with a central data team uses dbt Core. The setup is working well for that team. They want to scale their impact to enable faster decision-making, organization-wide. The current dbt Core setup isn't well suited for onboarding a larger number of less-technical, nontechnical, or less-frequent contributors.

**_The goal_** &mdash; Enable three domain teams of less-technical users to leverage and extend the central data models, with full ownership over their domain-specific dbt models.

- **Central data team:** Data engineers comfortable using dbt Core and the command line interface (CLI), building and maintaining foundational data models for the entire organization.

- **Domain teams:** Data analysts comfortable working in SQL but not using the CLI and prefer to start working right away without managing local dbt Core installations or updates. The team needs to build transformations specific to their business context. Some of these users may have tried dbt in the past, but they were not able to successfully onboard to the central team's setup.

**_Solution: Hybrid Mesh_** &mdash; Data teams can use dbt Mesh to connect projects *across* dbt Core and dbt Cloud, creating a workflow where everyone gets to work in their preferred environment while creating a shared lineage that allows for visibility, validation, and ownership across the data pipeline.

Each team will fully own its dbt code, from development through deployment, using the product that is appropriate to their needs and capabilities _while sharing data products across teams using both dbt Core and dbt Cloud._

<Lightbox src="/img/blog/2024-09-30-hybrid-mesh/hybrid-mesh.png" width="75%" title="A before and after diagram highlighting how a Hybrid Mesh allows central data teams using dbt Core to work with domain data teams using dbt Cloud." />

Creating a Hybrid Mesh is mostly the same as creating any other [dbt Mesh](/guides/mesh-qs?step=1) workflow &mdash; there are a few considerations but mostly _it just works_. We anticipate it will continue to see adoption as more central data teams look to onboard their downstream domain teams.

A Hybrid Mesh can be adopted as a stable long-term pattern, or as an intermediary while you perform a [migration from dbt Core to dbt Cloud](/guides/core-cloud-2?step=1).

## How to build a Hybrid Mesh
Enabling a Hybrid Mesh is as simple as a few additional steps to import the metadata from your Core project into dbt Cloud. Once you’ve done this, you should be able to operate your dbt Mesh like normal and all of our [standard recommendations](/best-practices/how-we-mesh/mesh-1-intro) still apply.

### Step 1: Prepare your Core project for access through dbt Mesh

Configure public models to serve as stable interfaces for downstream dbt Projects.

- Decide which models from your Core project will be accessible in your Mesh. For more information on how to configure public access for those models, refer to the [model access page.](/docs/collaborate/govern/model-access)
- Optionally set up a [model contract](/docs/collaborate/govern/model-contracts) for all public models for better governance.
- Keep dbt Core and dbt Cloud projects in separate repositories to allow for a clear separation between upstream models managed by the dbt Core team and the downstream models handled by the dbt Cloud team.

### Step 2: Mirror each "producer" Core project in dbt Cloud
This allows dbt Cloud to know about the contents and metadata of your project, which in turn allows for other projects to access its models.

- [Create a dbt Cloud account](https://www.getdbt.com/signup/) and a dbt project for each upstream Core project.
- Note: If you have [environment variables](/docs/build/environment-variables) in your project, dbt Cloud environment variables must be prefixed with `DBT_ `(including `DBT_ENV_CUSTOM_ENV_` or `DBT_ENV_SECRET`). Follow the instructions in [this guide](https://docs.getdbt.com/guides/core-to-cloud-1?step=8#environment-variables) to convert them for dbt Cloud.
- Each upstream Core project has to have a production [environment](/docs/dbt-cloud-environments) in dbt Cloud. You need to configure credentials and environment variables in dbt Cloud just so that it will resolve relation names to the same places where your dbt Core workflows are deploying those models.
- Set up a [merge job](/docs/deploy/merge-jobs) in a production environment to run `dbt parse`. This will enable connecting downstream projects in dbt Mesh by producing the necessary [artifacts](/reference/artifacts/dbt-artifacts) for cross-project referencing.
- Note: Set up a regular job to run `dbt build` instead of using a merge job for `dbt parse`, and centralize your dbt orchestration by moving production runs to dbt Cloud. Check out [this guide](/guides/core-to-cloud-1?step=9) for more details on converting your production runs to dbt Cloud.
- Optional: Set up a regular job (for example, daily) to run `source freshness` and `docs generate`. This will hydrate dbt Cloud with additional metadata and enable features in [dbt Explorer](/docs/collaborate/explore-projects) that will benefit both teams, including [Column-level lineage](/docs/collaborate/column-level-lineage).

### Step 3: Create and connect your downstream projects to your Core project using dbt Mesh
Now that dbt Cloud has the necessary information about your Core project, you can begin setting up your downstream projects, building on top of the public models from the project you brought into Cloud in [Step 2](#step-2-mirror-each-producer-core-project-in-dbt-cloud). To do this:
- Initialize each new downstream dbt Cloud project and create a [`dependencies.yml` file](/docs/collaborate/govern/project-dependencies#use-cases).
- In that `dependencies.yml` file, add the dbt project name from the `dbt_project.yml` of the upstream project(s). This sets up cross-project references between different dbt projects:

```yaml
# dependencies.yml file in dbt Cloud downstream project
projects:
- name: upstream_project_name
```
- Use [cross-project references](/reference/dbt-jinja-functions/ref#ref-project-specific-models) for public models in upstream project. Add [version](/reference/dbt-jinja-functions/ref#versioned-ref) to references of versioned models:
```yaml
select * from {{ ref('upstream_project_name', 'monthly_revenue') }}
```

And that’s all it takes! From here, the domain teams that own each dbt Project can build out their models to fit their own use cases. You can now build out your Hybrid Mesh however you want, accessing the full suite of dbt Cloud features.
- Orchestrate your Mesh to ensure timely delivery of data products and make them available to downstream consumers.
- Use [dbt Explorer](/docs/collaborate/explore-projects) to trace the lineage of your data back to its source.
- Onboard more teams and connect them to your Mesh.
- Build [semantic models](/docs/build/semantic-models) and [metrics](/docs/build/metrics-overview) into your projects to query them with the [dbt Semantic Layer](https://www.getdbt.com/product/semantic-layer).


## Conclusion

In a world where organizations have complex and ever-changing data needs, there is no one-size fits all solution. Instead, data practitioners need flexible tooling that meets them where they are. The Hybrid Mesh presents a model for this approach, where teams that are comfortable and getting value out of dbt Core can collaborate frictionlessly with domain teams on dbt Cloud.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading