From 55bda323733a1487809ab4d7d21c03994d3e0b33 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Wed, 31 Jul 2024 11:58:50 +0100 Subject: [PATCH 1/6] add dbt mesh x sl faqs --- .../best-practices/how-we-mesh/mesh-5-faqs.md | 4 +++ .../docs/use-dbt-semantic-layer/sl-faqs.md | 8 +++++ website/docs/guides/mesh-qs.md | 1 + website/docs/guides/sl-snowflake-qs.md | 2 +- website/snippets/_sl-dbt-mesh-faq.md | 30 +++++++++++++++++++ 5 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 website/snippets/_sl-dbt-mesh-faq.md diff --git a/website/docs/best-practices/how-we-mesh/mesh-5-faqs.md b/website/docs/best-practices/how-we-mesh/mesh-5-faqs.md index 980228f4ed4..858000b9911 100644 --- a/website/docs/best-practices/how-we-mesh/mesh-5-faqs.md +++ b/website/docs/best-practices/how-we-mesh/mesh-5-faqs.md @@ -261,12 +261,16 @@ Historical limitations required customers to "duplicate" projects so that one ac +import SLMeshFAQs from '/snippets/_sl-dbt-mesh-faq.md'; + The [dbt Semantic Layer](/docs/use-dbt-semantic-layer/dbt-sl) and dbt Mesh are complementary mechanisms enabled by dbt Cloud that work together to enhance the management, usability, and governance of data in large-scale data environments. The Semantic Layer in dbt Cloud allows teams to centrally define business metrics and dimensions. It ensures consistent and reliable metric definitions across various analytics tools and platforms. dbt Mesh enables organizations to split their data architecture into multiple domain-specific projects, while retaining the ability to reference “public” models across projects. It is also possible to reference a “public” model from another project for the purpose of defining semantic models and metrics. Your organization can have multiple dbt projects feed into a unified semantic layer, ensuring that metrics and dimensions are consistently defined and understood across these domains. + + diff --git a/website/docs/docs/use-dbt-semantic-layer/sl-faqs.md b/website/docs/docs/use-dbt-semantic-layer/sl-faqs.md index 9a122aa644a..40b84ada40a 100644 --- a/website/docs/docs/use-dbt-semantic-layer/sl-faqs.md +++ b/website/docs/docs/use-dbt-semantic-layer/sl-faqs.md @@ -279,6 +279,14 @@ We are currently working on introducing more fine-grained access controls, inclu ## Implementation + + +import SLMeshFAQs from '/snippets/_sl-dbt-mesh-faq.md'; + + + + + We recommend to build your semantic layer on top of the [marts layer](/best-practices/how-we-structure/4-marts), which represents the clean and transformed data from your dbt models. diff --git a/website/docs/guides/mesh-qs.md b/website/docs/guides/mesh-qs.md index fe581471da3..5c4d0f00866 100644 --- a/website/docs/guides/mesh-qs.md +++ b/website/docs/guides/mesh-qs.md @@ -636,6 +636,7 @@ Here are some additional resources to help you continue your journey: - [How we build our dbt mesh projects](https://docs.getdbt.com/best-practices/how-we-mesh/mesh-1-intro) - [dbt Mesh FAQs](https://docs.getdbt.com/best-practices/how-we-mesh/mesh-5-faqs) +- [Implement dbt Mesh with the Semantic Layer](/docs/use-dbt-semantic-layer/sl-faqs#how-can-i-implement-dbt-mesh-with-the-dbt-semantic-layer) - [Cross-project references](/docs/collaborate/govern/project-dependencies#how-to-write-cross-project-ref) - [dbt Explorer](/docs/collaborate/explore-projects) diff --git a/website/docs/guides/sl-snowflake-qs.md b/website/docs/guides/sl-snowflake-qs.md index b80f6706c80..e9c4caf53b0 100644 --- a/website/docs/guides/sl-snowflake-qs.md +++ b/website/docs/guides/sl-snowflake-qs.md @@ -1064,7 +1064,7 @@ You've learned how to: - Build, test, and manage dbt Cloud projects, focusing on metrics and semantic layers. - Run production jobs and query metrics with our available integrations. -For next steps, you can start defining your own metrics and learn additional configuration options such as [exports](/docs/use-dbt-semantic-layer/exports), [fill null values](/docs/build/advanced-topics), and more. +For next steps, you can start defining your own metrics and learn additional configuration options such as [exports](/docs/use-dbt-semantic-layer/exports), [fill null values](/docs/build/advanced-topics), [implementing dbt Mesh with the Semantic Layer](/docs/use-dbt-semantic-layer/sl-faqs#how-can-i-implement-dbt-mesh-with-the-dbt-semantic-layer), and more. Here are some additional resources to help you continue your journey: diff --git a/website/snippets/_sl-dbt-mesh-faq.md b/website/snippets/_sl-dbt-mesh-faq.md new file mode 100644 index 00000000000..522bb22eaaa --- /dev/null +++ b/website/snippets/_sl-dbt-mesh-faq.md @@ -0,0 +1,30 @@ +When using the dbt Semantic Layer in a [dbt Mesh](/best-practices/how-we-mesh/mesh-1-intro) setting, we recommend the following: + +- You have one global project that contains your Semantic Layer configurations. +- Then as you build your Semantic Layer, you can cross reference dbt models across your various projects or packages to create your semantic models using the [two-argument `ref` function](/reference/dbt-jinja-functions/ref#ref-project-specific-models)( `ref('project_name', 'model_name')`). +- Your dbt Semantic Layer project serves as a global source of truth across the rest of your projects. + +#### Usage example +For example, to let's say you have a public model (`fct_orders`) that lives in the `jaffle_finance` project. As you build your semantic model, use the following syntax to ref the model: + + + +```yaml +semantic_models: + - name: customer_orders + defaults: + agg_time_dimension: first_ordered_at + description: | + Customer grain mart that aggregates customer orders. + model: ref('analytics', 'fct_orders') # ref('project_name', 'model_name') + entities: + ...rest of configuration... + dimensions: + ...rest of configuration... + measures: + ...rest of configuration... +``` + + +Notice that in the `model` parameter, we're using the `ref` function to reference the `fct_orders` model in the `jaffle_finance` project. +
From b1ae42eccee31f34548c5a1684da7ffbae7fd17f Mon Sep 17 00:00:00 2001 From: nataliefiann <120089939+nataliefiann@users.noreply.github.com> Date: Fri, 2 Aug 2024 10:58:40 +0100 Subject: [PATCH 2/6] Update website/snippets/_sl-dbt-mesh-faq.md --- website/snippets/_sl-dbt-mesh-faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/snippets/_sl-dbt-mesh-faq.md b/website/snippets/_sl-dbt-mesh-faq.md index 522bb22eaaa..2cb452d6f48 100644 --- a/website/snippets/_sl-dbt-mesh-faq.md +++ b/website/snippets/_sl-dbt-mesh-faq.md @@ -5,7 +5,7 @@ When using the dbt Semantic Layer in a [dbt Mesh](/best-practices/how-we-mesh/me - Your dbt Semantic Layer project serves as a global source of truth across the rest of your projects. #### Usage example -For example, to let's say you have a public model (`fct_orders`) that lives in the `jaffle_finance` project. As you build your semantic model, use the following syntax to ref the model: +For example, let's say you have a public model (`fct_orders`) that lives in the `jaffle_finance` project. As you build your semantic model, use the following syntax to ref the model: From a933ca2013a5693819dccb5129aac65f7fb9c296 Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Mon, 5 Aug 2024 22:55:00 +0100 Subject: [PATCH 3/6] Update _sl-dbt-mesh-faq.md --- website/snippets/_sl-dbt-mesh-faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/snippets/_sl-dbt-mesh-faq.md b/website/snippets/_sl-dbt-mesh-faq.md index 2cb452d6f48..35c3f1747d7 100644 --- a/website/snippets/_sl-dbt-mesh-faq.md +++ b/website/snippets/_sl-dbt-mesh-faq.md @@ -16,7 +16,7 @@ semantic_models: agg_time_dimension: first_ordered_at description: | Customer grain mart that aggregates customer orders. - model: ref('analytics', 'fct_orders') # ref('project_name', 'model_name') + model: ref('jaffle_finance', 'fct_orders') # ref('project_name', 'model_name') entities: ...rest of configuration... dimensions: From 5eda6c2d37a0d2426dad2bab0dc8a578bf729f81 Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Wed, 7 Aug 2024 20:55:15 +0100 Subject: [PATCH 4/6] Update _sl-dbt-mesh-faq.md Co-authored-by: Jeremy Cohen --- website/snippets/_sl-dbt-mesh-faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/snippets/_sl-dbt-mesh-faq.md b/website/snippets/_sl-dbt-mesh-faq.md index 35c3f1747d7..201bc0341aa 100644 --- a/website/snippets/_sl-dbt-mesh-faq.md +++ b/website/snippets/_sl-dbt-mesh-faq.md @@ -1,6 +1,6 @@ When using the dbt Semantic Layer in a [dbt Mesh](/best-practices/how-we-mesh/mesh-1-intro) setting, we recommend the following: -- You have one global project that contains your Semantic Layer configurations. +- You have one standalone project that contains your semantic models and metrics. - Then as you build your Semantic Layer, you can cross reference dbt models across your various projects or packages to create your semantic models using the [two-argument `ref` function](/reference/dbt-jinja-functions/ref#ref-project-specific-models)( `ref('project_name', 'model_name')`). - Your dbt Semantic Layer project serves as a global source of truth across the rest of your projects. From 1409d7bc408ff9100539d125bfb494992d2aeaf8 Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Thu, 8 Aug 2024 09:35:44 +0100 Subject: [PATCH 5/6] Update website/snippets/_sl-dbt-mesh-faq.md --- website/snippets/_sl-dbt-mesh-faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/snippets/_sl-dbt-mesh-faq.md b/website/snippets/_sl-dbt-mesh-faq.md index 201bc0341aa..23c426a9f93 100644 --- a/website/snippets/_sl-dbt-mesh-faq.md +++ b/website/snippets/_sl-dbt-mesh-faq.md @@ -1,7 +1,7 @@ When using the dbt Semantic Layer in a [dbt Mesh](/best-practices/how-we-mesh/mesh-1-intro) setting, we recommend the following: - You have one standalone project that contains your semantic models and metrics. -- Then as you build your Semantic Layer, you can cross reference dbt models across your various projects or packages to create your semantic models using the [two-argument `ref` function](/reference/dbt-jinja-functions/ref#ref-project-specific-models)( `ref('project_name', 'model_name')`). +- Then as you build your Semantic Layer, you can [cross-reference dbt models](/docs/collaborate/govern/project-dependencies) across your various projects or packages to create your semantic models using the [two-argument `ref` function](/reference/dbt-jinja-functions/ref#ref-project-specific-models)( `ref('project_name', 'model_name')`). - Your dbt Semantic Layer project serves as a global source of truth across the rest of your projects. #### Usage example From 03ef1457421c36539c13c2547805072ad1f9e1f6 Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Thu, 8 Aug 2024 09:36:15 +0100 Subject: [PATCH 6/6] Update website/snippets/_sl-dbt-mesh-faq.md --- website/snippets/_sl-dbt-mesh-faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/snippets/_sl-dbt-mesh-faq.md b/website/snippets/_sl-dbt-mesh-faq.md index 23c426a9f93..1a517f1aa21 100644 --- a/website/snippets/_sl-dbt-mesh-faq.md +++ b/website/snippets/_sl-dbt-mesh-faq.md @@ -26,5 +26,5 @@ semantic_models: ``` -Notice that in the `model` parameter, we're using the `ref` function to reference the `fct_orders` model in the `jaffle_finance` project. +Notice that in the `model` parameter, we're using the `ref` function with two arguments to reference the public model `fct_orders` defined in the `jaffle_finance` project.