Metric nodes depends_on
will include semantic_models based on measures, but not based on filters
#3682
Labels
dbt-core v1.6
Docs impact for the v1.6 release (July 2023)
semantic-layer-beta
Label for new semantic layer beta launch
Milestone
Somewhere in these docs:
Let's capture that metric nodes will reflect dependencies on semantic models for their measures, but will not reflect dependencies based on filters, for the purposes of:
Context
(from Quigley)
There are three-ish places that metrics need to source the nodes for it's
depends_on
attributeMetric.type_params.input_metrics
forRATIO
andDERIVED
type metricsMetric.type_params.measure
forSIMPLE
andCUMULATIVE
type metricsa.
Metric.filter
b.
Metric.type_params.measure.filter
c.
Metric.type_params.input_metrics[x].filter
The work for 1 and 2 exist currently on dbt-labs/dbt-core#8015.
Number 3 is a bit harder though. This is because
A. The spec for filters actually isn't finalized yet. The MetricFlow team is working on support for dunders
B. Which semantic model a dimension comes from in a filter is determined at query time (because a dimension can exist on multiple semantic models and the optimal join path is calculated).
Thus this issue is just to resolve 1 & 2, whereas 3 will be pushed off and become a separate core ticket/issue
Originally posted by @QMalcolm in dbt-labs/dbt-core#7854 (comment)
The text was updated successfully, but these errors were encountered: