Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose MetricConfig in MFEngine #1334

Merged
merged 1 commit into from
Jul 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion metricflow/engine/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down
Loading