diff --git a/metricflow/plan_conversion/dataflow_to_sql.py b/metricflow/plan_conversion/dataflow_to_sql.py index b7b51ee9a1..770103da66 100644 --- a/metricflow/plan_conversion/dataflow_to_sql.py +++ b/metricflow/plan_conversion/dataflow_to_sql.py @@ -677,7 +677,9 @@ def visit_compute_metrics_node(self, node: ComputeMetricsNode) -> SqlDataSet: column_name=expr, input_measure=input_measure, from_data_set_alias=from_data_set_alias ) elif metric.type is MetricType.DERIVED: - assert metric.type_params.expr + assert ( + metric.type_params.expr + ), "Derived metrics are required to have an `expr` in their YAML definition." metric_expr = SqlStringExpression(sql_expr=metric.type_params.expr) elif metric.type == MetricType.CONVERSION: conversion_type_params = metric.type_params.conversion_type_params