dbt-labs / metricflow

MetricFlow allows you to define, build, and maintain metrics in code.
https://docs.getdbt.com/docs/build/about-metricflow
Other
1.12k stars 92 forks source link

Handle ambiguous `metric_time` filters in YAML definitions #1342

Closed courtneyholcomb closed 1 month ago

courtneyholcomb commented 1 month ago

Handle ambiguous metric_time filters in metric YAML definitions. The expected behavior for an ambiguous metric_time filter in a metric's YAML definition is that it will use the default time granularity for the metric where the filter is defined. This means that if a filter is defined on a derived metric's input metric, that filter will use the derived metrics time granularity, not the input metric's time granularity. Aside from that change, this adds tests for other types of ambiguous metric_time YAML filters.