Skip to content

Commit

Permalink
Updated to use correct values
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamDee committed Dec 4, 2024
1 parent 5fc7fe4 commit 0d38d3f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions metricflow/engine/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

Expand Down

0 comments on commit 0d38d3f

Please sign in to comment.