[X] I have searched the existing issues, and I could not find an existing issue for this bug
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 the input_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 InputMeasures in a Metric's Metric.type_params.input_measures and thus no validation warning should be raised.
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
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.