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

Update metricflow-cli.md #3966

Merged
merged 8 commits into from
Aug 23, 2023
Merged

Update metricflow-cli.md #3966

merged 8 commits into from
Aug 23, 2023

Conversation

mirnawong1
Copy link
Contributor

adding how to add dimension filter to where filter per slack thread

adding how to add dimension filter to where filter
@mirnawong1 mirnawong1 requested a review from a team as a code owner August 22, 2023 11:45
@netlify
Copy link

netlify bot commented Aug 22, 2023

Deploy Preview for docs-getdbt-com ready!

Name Link
🔨 Latest commit 238544a
🔍 Latest deploy log https://app.netlify.com/sites/docs-getdbt-com/deploys/64e5e656f785fc0007ecd1d7
😎 Deploy Preview https://deploy-preview-3966--docs-getdbt-com.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added size: small This change will take 1 to 2 days to address content Improvements or additions to content Docs team Authored by the Docs team @dbt Labs and removed size: small This change will take 1 to 2 days to address labels Aug 22, 2023
@Jstein77
Copy link
Contributor

@mirnawong1 thanks for opening this PR! Can we also update the where clause example in the query example section?
The example should be:

mf query --metrics order_total --group-by metric_time --where "{{Dimension('order_id__is_food_order')}} = True"

I think we should also update the metric in the other examples to order_total so it's consistent with the example project.

@vercel
Copy link

vercel bot commented Aug 22, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
docs-getdbt-com ⬜️ Ignored (Inspect) Visit Preview Aug 22, 2023 3:05pm

@github-actions github-actions bot added the size: small This change will take 1 to 2 days to address label Aug 22, 2023
add template wrapper. setup instructions
@github-actions github-actions bot added size: medium This change will take up to a week to address and removed size: small This change will take 1 to 2 days to address labels Aug 22, 2023
@mirnawong1
Copy link
Contributor Author

hey @Jstein77 ,t hanks so much! can you give this another look?

Copy link
Contributor

@Jstein77 Jstein77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

--where TEXT SQL-like where statement provided as a string. For
example: --where "revenue > 100"
To add a dimension filter to a where filter, you have to indicate that the filter item is part of your model. Reference the dimension using the following template wrapper: {{ Dimension(‘model_name1__model_name2’) }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To add a dimension filter to a where filter, you have to indicate that the filter item is part of your model. Reference the dimension using the following template wrapper: {{ Dimension(‘model_name1__model_name2’) }}
To add a dimension filter to a where filter, you have to indicate that the filter item is part of your model. Reference the dimension using the following template wrapper: {{ Dimension(‘primary_entity__dimension_name’) }}

@mirnawong1 mirnawong1 merged commit 1074f83 into current Aug 23, 2023
10 checks passed
@mirnawong1 mirnawong1 deleted the mirnawong1-patch-5 branch August 23, 2023 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Improvements or additions to content Docs team Authored by the Docs team @dbt Labs size: medium This change will take up to a week to address
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants