Metricflow Join Order between Dim and Fct, Join Dim to Fct instead of Fct to Dim #1900
soham-dasgupta
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Lets consider a very common use case where an Analyst needs to calculate revenue from each customer given a dim table (dim_customer) that consist of customer details and a fct table (fact_customer_revenue) that consists of customer revenue.
The semantic models would look somewhat like below
To generate a feature set consisting of revenue at customer_id level , the below command would be run
That leads to creation of SQL
But, Whoaa!
Suddenly In the final output, the analyst would miss a bunch of customer_ids that exist in dim_customer, that has not generated revenue.
To fix it, the Analyst would now write a dbt model as below
How can Metricflow handle such common use cases?
Beta Was this translation helpful? Give feedback.
All reactions