Skip to content

Commit

Permalink
fixup! Support metric aliases in queries
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneyholcomb committed Dec 20, 2024
1 parent 06eada3 commit 86a7499
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions metricflow/dataflow/builder/dataflow_plan_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit 86a7499

Please sign in to comment.