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}"