From ff7c4ab3d50aabc1596037d0f2cf8031e4f7cd39 Mon Sep 17 00:00:00 2001 From: Will Deng Date: Mon, 15 Jul 2024 17:33:15 -0400 Subject: [PATCH] added config.meta to metric --- metricflow/engine/models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/metricflow/engine/models.py b/metricflow/engine/models.py index de899b3018..25961e26ae 100644 --- a/metricflow/engine/models.py +++ b/metricflow/engine/models.py @@ -16,7 +16,7 @@ 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 MetricInputMeasure, MetricType, MetricTypeParams +from dbt_semantic_interfaces.protocols.metric import MetricConfig, MetricInputMeasure, MetricType, MetricTypeParams from dbt_semantic_interfaces.protocols.saved_query import ( SavedQuery as SemanticManifestSavedQuery, ) @@ -44,6 +44,7 @@ class Metric: metadata: Optional[Metadata] dimensions: List[Dimension] label: Optional[str] + config: Optional[MetricConfig] @classmethod def from_pydantic(cls, pydantic_metric: SemanticManifestMetric, dimensions: List[Dimension]) -> Metric: @@ -57,6 +58,7 @@ def from_pydantic(cls, pydantic_metric: SemanticManifestMetric, dimensions: List metadata=pydantic_metric.metadata, dimensions=dimensions, label=pydantic_metric.label, + config=pydantic_metric.config, ) @property