[CT-3541] [Bug] Duplicate Metric InputMeasures cause query time errors in MetricFlow #9360
Labels
backport 1.7.latest
bug
Something isn't working
High Severity
bug with significant impact that should be resolved in a reasonable timeframe
Impact: SL
Milestone
Is this a new bug in dbt-core?
Current Behavior
After parsing a metric, we process a metric to populate it's
input_measures
. This happens in _process_metric_node. It's possible for there to be duplicate input measures in theinput_measures
list. When there is, a validation warning shows up in the output. Additionally on the MetricFlow side, this causes a query time error for the metric.Expected Behavior
There shouldn't be duplicate
InputMeasure
s in aMetric
'sMetric.type_params.input_measures
and thus no validation warning should be raised.Steps To Reproduce
a. Alternatively pull down my qmalcolm--duplicate-input-measure-repro from jaffle-sl-template
dbt parse
Relevant log output
Environment
Which database adapter are you using with dbt?
snowflake
Additional Context
The Semantic Layer team, is going to work on mitigating this in MetricFlow as an immediate fix, however we should also fix this on the Core side.
The text was updated successfully, but these errors were encountered: