From 86a74992eed8d625d5e9cce2d4c2ace5182166c1 Mon Sep 17 00:00:00 2001 From: Courtney Holcomb Date: Fri, 20 Dec 2024 07:37:31 -0800 Subject: [PATCH] fixup! Support metric aliases in queries --- metricflow/dataflow/builder/dataflow_plan_builder.py | 1 + 1 file changed, 1 insertion(+) diff --git a/metricflow/dataflow/builder/dataflow_plan_builder.py b/metricflow/dataflow/builder/dataflow_plan_builder.py index 383482a38..6f65742d6 100644 --- a/metricflow/dataflow/builder/dataflow_plan_builder.py +++ b/metricflow/dataflow/builder/dataflow_plan_builder.py @@ -163,6 +163,7 @@ def _build_query_output_node( or metric_spec.offset_to_grain is not None or metric_spec.offset_window is not None ): + # Remove aliases here. They will be added back at the very end of the query. metric_specs += (metric_spec.with_alias(None),) if metric_spec.alias else (metric_spec,) raise ValueError( f"The metric specs in the query spec should not contain any metric modifiers. Got: {metric_spec}"