diff --git a/metricflow/engine/models.py b/metricflow/engine/models.py index 60424ccf9..304a8bc93 100644 --- a/metricflow/engine/models.py +++ b/metricflow/engine/models.py @@ -16,7 +16,12 @@ from dbt_semantic_interfaces.protocols.measure import MeasureAggregationParameters from dbt_semantic_interfaces.protocols.metadata import Metadata from dbt_semantic_interfaces.protocols.metric import Metric as SemanticManifestMetric -from dbt_semantic_interfaces.protocols.metric import MetricConfig, MetricInputMeasure, MetricType, MetricTypeParams +from dbt_semantic_interfaces.protocols.metric import ( + MetricInputMeasure, + MetricType, + MetricTypeParams, + SemanticLayerElementConfig, +) from dbt_semantic_interfaces.protocols.saved_query import ( SavedQuery as SemanticManifestSavedQuery, ) @@ -44,7 +49,7 @@ class Metric: metadata: Optional[Metadata] dimensions: List[Dimension] label: Optional[str] - config: Optional[MetricConfig] + config: Optional[SemanticLayerElementConfig] @classmethod def from_pydantic(cls, pydantic_metric: SemanticManifestMetric, dimensions: List[Dimension]) -> Metric: diff --git a/tests_metricflow/plan_conversion/test_dataflow_to_sql_plan.py b/tests_metricflow/plan_conversion/test_dataflow_to_sql_plan.py index 23b3e4314..21c9daba8 100644 --- a/tests_metricflow/plan_conversion/test_dataflow_to_sql_plan.py +++ b/tests_metricflow/plan_conversion/test_dataflow_to_sql_plan.py @@ -685,7 +685,7 @@ def test_join_to_time_spine_node_with_offset_window( time_range_constraint=TimeRangeConstraint( start_time=as_datetime("2020-01-01"), end_time=as_datetime("2021-01-01") ), - offset_window=PydanticMetricTimeWindow(count=10, granularity=TimeGranularity.DAY), + offset_window=PydanticMetricTimeWindow(count=10, granularity=TimeGranularity.DAY.value), join_type=SqlJoinType.INNER, )