-
Notifications
You must be signed in to change notification settings - Fork 984
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
add dbt mesh x sl faqs #5867
Merged
Merged
add dbt mesh x sl faqs #5867
Changes from 10 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
55bda32
add dbt mesh x sl faqs
mirnawong1 b00bd50
Merge branch 'current' into sl-dbt-mesh-faq
mirnawong1 b1ae42e
Update website/snippets/_sl-dbt-mesh-faq.md
nataliefiann a878ed4
Merge branch 'current' into sl-dbt-mesh-faq
mirnawong1 a933ca2
Update _sl-dbt-mesh-faq.md
mirnawong1 a25f809
Merge branch 'current' into sl-dbt-mesh-faq
mirnawong1 d1c84d8
Merge branch 'current' into sl-dbt-mesh-faq
mirnawong1 0fc072d
Merge branch 'current' into sl-dbt-mesh-faq
mirnawong1 034bef7
Merge branch 'current' into sl-dbt-mesh-faq
mirnawong1 5eda6c2
Update _sl-dbt-mesh-faq.md
mirnawong1 1409d7b
Update website/snippets/_sl-dbt-mesh-faq.md
mirnawong1 03ef145
Update website/snippets/_sl-dbt-mesh-faq.md
mirnawong1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 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')`). | ||
mirnawong1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- Your dbt Semantic Layer project serves as a global source of truth across the rest of your projects. | ||
|
||
#### Usage example | ||
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: | ||
|
||
<File name="models/metrics/semantic_model_name.yml"> | ||
|
||
```yaml | ||
semantic_models: | ||
- name: customer_orders | ||
defaults: | ||
agg_time_dimension: first_ordered_at | ||
description: | | ||
Customer grain mart that aggregates customer orders. | ||
model: ref('jaffle_finance', 'fct_orders') # ref('project_name', 'model_name') | ||
entities: | ||
...rest of configuration... | ||
dimensions: | ||
...rest of configuration... | ||
measures: | ||
...rest of configuration... | ||
``` | ||
</File> | ||
|
||
Notice that in the `model` parameter, we're using the `ref` function to reference the `fct_orders` model in the `jaffle_finance` project. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
mirnawong1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<br /> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend also linking to: