Skip to content

Commit

Permalink
Add meta to dimensions, entities, and measures
Browse files Browse the repository at this point in the history
  • Loading branch information
DevonFulcher committed Dec 10, 2024
1 parent cd330b8 commit 8ef5bb8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions metricflow/engine/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ class Dimension:
entity_links: Tuple[EntityReference, ...]
type_params: Optional[DimensionTypeParams]
metadata: Optional[Metadata]
config: Optional[SemanticLayerElementConfig] = None
is_partition: bool = False
expr: Optional[str] = None
label: Optional[str] = None
Expand All @@ -112,6 +113,7 @@ def from_pydantic(
type=pydantic_dimension.type,
type_params=parsed_type_params,
metadata=pydantic_dimension.metadata,
config=pydantic_dimension.config,
is_partition=pydantic_dimension.is_partition,
expr=pydantic_dimension.expr,
label=pydantic_dimension.label,
Expand Down Expand Up @@ -142,6 +144,7 @@ class Entity:
description: Optional[str]
type: EntityType
role: Optional[str]
config: Optional[SemanticLayerElementConfig] = None
expr: Optional[str] = None

@classmethod
Expand All @@ -152,6 +155,7 @@ def from_pydantic(cls, pydantic_entity: SemanticManifestEntity) -> Entity:
description=pydantic_entity.description,
type=pydantic_entity.type,
role=pydantic_entity.role,
config=pydantic_entity.config,
expr=pydantic_entity.expr,
)

Expand All @@ -163,6 +167,7 @@ class Measure:
name: str
agg: AggregationType
agg_time_dimension: str
config: Optional[SemanticLayerElementConfig] = None
description: Optional[str] = None
expr: Optional[str] = None
agg_params: Optional[MeasureAggregationParameters] = None
Expand Down

0 comments on commit 8ef5bb8

Please sign in to comment.