From 2ea07035ee74d06627f9d6e5895ff1d483ba802d Mon Sep 17 00:00:00 2001 From: tlento Date: Wed, 22 May 2024 15:06:25 -0700 Subject: [PATCH] Add semantic_model_origin property to LinkableElement interface LinkableElements have a commonality, which is that they always have either a semantic model where they are defined, or they are virtual constructs (either metric queries or virtual dimensions, such as metric_time). In order to do predicate pushdown evaluation against source nodes, we require the linkable element to have a singular semantic model origin. That may be a virtual model, as in the case of metric_time or metric elements, or it may be a concrete model, as in the case of all other entities and dimensions. This change provides that accessor. It is separated out for ease of review due to the need to rename the existing `semantic_model_origin` property. We could not re-use it, as dataclasses do not allow a mixture of @property decorated functions and simple properties. This has the added benefit of differentiating between the semantic model origin, which may be virtual, and the semantic model containing the element definition. --- .../model/semantics/linkable_element.py | 49 +++++++++++++++++-- .../model/semantics/linkable_element_set.py | 5 +- .../model/semantics/linkable_spec_resolver.py | 16 +++--- .../semantics/test_linkable_element_set.py | 20 ++++---- .../model/test_where_filter_spec.py | 14 +++--- ...ccumulate_last_2_months_metric__result.txt | 2 +- ...h_different_parent_time_grains__result.txt | 4 +- ...c_with_same_parent_time_grains__result.txt | 2 +- ...ics_with_different_time_grains__result.txt | 4 +- ..._metrics_with_same_time_grains__result.txt | 2 +- ...in_query_filter__simple_metric__result.txt | 2 +- ...validate_where_constraint_dims__result.txt | 2 +- ...cs_with_common_filtered_metric__result.txt | 4 +- ...tion_for_invalid_metric_filter__result.txt | 4 +- ...or_invalid_metric_input_filter__result.txt | 4 +- ...lution_for_valid_metric_filter__result.txt | 2 +- ..._for_valid_metric_input_filter__result.txt | 2 +- ...ccumulate_last_2_months_metric__result.txt | 2 +- ...h_different_parent_time_grains__result.txt | 4 +- ...c_with_same_parent_time_grains__result.txt | 2 +- ...ics_with_different_time_grains__result.txt | 4 +- ..._metrics_with_same_time_grains__result.txt | 2 +- ...spec_resolution__simple_metric__result.txt | 2 +- metricflow/engine/metricflow_engine.py | 6 +-- .../test_dataflow_to_sql_plan.py | 2 +- .../test_distinct_values_plan__dfp_0.xml | 2 +- ..._distinct_values_plan_with_join__dfp_0.xml | 2 +- ...join_to_time_spine_with_filters__dfp_0.xml | 6 +-- .../test_measure_constraint_plan__dfp_0.xml | 8 +-- ...traint_with_reused_measure_plan__dfp_0.xml | 4 +- ...ry_have_different_granularities__dfp_0.xml | 6 +-- ...ry_have_different_granularities__dfp_0.xml | 10 ++-- .../test_where_constrained_plan__dfp_0.xml | 4 +- ...constrained_plan_time_dimension__dfp_0.xml | 4 +- ...ained_with_common_linkable_plan__dfp_0.xml | 4 +- ...constrained_metric_not_combined__dfp_0.xml | 2 +- ...onstrained_metric_not_combined__dfpo_0.xml | 2 +- 37 files changed, 128 insertions(+), 88 deletions(-) diff --git a/metricflow-semantics/metricflow_semantics/model/semantics/linkable_element.py b/metricflow-semantics/metricflow_semantics/model/semantics/linkable_element.py index 82ad6c1f30..36757f508d 100644 --- a/metricflow-semantics/metricflow_semantics/model/semantics/linkable_element.py +++ b/metricflow-semantics/metricflow_semantics/model/semantics/linkable_element.py @@ -104,13 +104,24 @@ def element_type(self) -> LinkableElementType: """The LinkableElementType describing what this instance represents.""" raise NotImplementedError + @property + @abstractmethod + def semantic_model_origin(self) -> SemanticModelReference: + """The semantic model where this element was defined, if one exists. + + If no such model exists, the element will return the VIRTUAL_SEMANTIC_MODEL_REFERENCE, as it is + either a virtual construct (e.g., metric_time) or a composite of semantic model inputs that could be used as + a virtual semantic model at some point (e.g., metric queries requested as filter inputs). + """ + raise NotImplementedError + @dataclass(frozen=True) class LinkableDimension(LinkableElement, SerializableDataclass): """Describes how a dimension can be realized by joining based on entity links.""" # The semantic model where this dimension was defined. - semantic_model_origin: Optional[SemanticModelReference] + defined_in_semantic_model: Optional[SemanticModelReference] element_name: str dimension_type: DimensionType entity_links: Tuple[EntityReference, ...] @@ -146,19 +157,33 @@ def reference(self) -> DimensionReference: # noqa: D102 @override def derived_from_semantic_models(self) -> Sequence[SemanticModelReference]: semantic_model_references = set() - if self.semantic_model_origin: - semantic_model_references.add(self.semantic_model_origin) + if self.defined_in_semantic_model: + semantic_model_references.add(self.defined_in_semantic_model) semantic_model_references.update(self.join_path.derived_from_semantic_models) return sorted_semantic_model_references(semantic_model_references) + @property + @override + def semantic_model_origin(self) -> SemanticModelReference: + """Returns the semantic model reference pointing to the model where the dimension is defined. + + For virtual dimensions, such as metric_time, where there is no semantic model definition we return the + virtual semantic model reference. + """ + return ( + self.defined_in_semantic_model + if self.defined_in_semantic_model + else SemanticModelDerivation.VIRTUAL_SEMANTIC_MODEL_REFERENCE + ) + @dataclass(frozen=True) class LinkableEntity(LinkableElement, SerializableDataclass): """Describes how an entity can be realized by joining based on entity links.""" # The semantic model where this entity was defined. - semantic_model_origin: SemanticModelReference + defined_in_semantic_model: SemanticModelReference element_name: str properties: FrozenSet[LinkableElementProperty] entity_links: Tuple[EntityReference, ...] @@ -182,10 +207,15 @@ def reference(self) -> EntityReference: # noqa: D102 @property @override def derived_from_semantic_models(self) -> Sequence[SemanticModelReference]: - semantic_model_references = {self.semantic_model_origin} + semantic_model_references = {self.defined_in_semantic_model} semantic_model_references.update(self.join_path.derived_from_semantic_models) return sorted_semantic_model_references(semantic_model_references) + @property + @override + def semantic_model_origin(self) -> SemanticModelReference: + return self.defined_in_semantic_model + # TODO: add to DSI @dataclass(frozen=True) @@ -254,6 +284,15 @@ def derived_from_semantic_models(self) -> Sequence[SemanticModelReference]: return sorted_semantic_model_references(semantic_model_references) + @property + @override + def semantic_model_origin(self) -> SemanticModelReference: + """Returns the virtual semantic model reference, as metrics are not defined in semantic models. + + Metrics may be used as virtual source nodes for metrics as dimensions use cases, and we represent that here. + """ + return SemanticModelDerivation.VIRTUAL_SEMANTIC_MODEL_REFERENCE + @property def metric_to_entity_join_path(self) -> Optional[SemanticModelJoinPath]: """Join path used in metric subquery to join entity to metric, if needed.""" diff --git a/metricflow-semantics/metricflow_semantics/model/semantics/linkable_element_set.py b/metricflow-semantics/metricflow_semantics/model/semantics/linkable_element_set.py index 8a59c9a6a4..effa5daf92 100644 --- a/metricflow-semantics/metricflow_semantics/model/semantics/linkable_element_set.py +++ b/metricflow-semantics/metricflow_semantics/model/semantics/linkable_element_set.py @@ -184,7 +184,7 @@ def intersection_by_path_key(linkable_element_sets: Sequence[LinkableElementSet] dimensions, key=lambda linkable_dimension: ( linkable_dimension.semantic_model_origin.semantic_model_name - if linkable_dimension.semantic_model_origin + if linkable_dimension.defined_in_semantic_model else "" ), ) @@ -194,7 +194,8 @@ def intersection_by_path_key(linkable_element_sets: Sequence[LinkableElementSet] path_key_to_linkable_entities={ path_key: tuple( sorted( - entities, key=lambda linkable_entity: linkable_entity.semantic_model_origin.semantic_model_name + entities, + key=lambda linkable_entity: linkable_entity.defined_in_semantic_model.semantic_model_name, ) ) for path_key, entities in join_path_to_linkable_entities.items() diff --git a/metricflow-semantics/metricflow_semantics/model/semantics/linkable_spec_resolver.py b/metricflow-semantics/metricflow_semantics/model/semantics/linkable_spec_resolver.py index e3584248c2..f6892ee78e 100644 --- a/metricflow-semantics/metricflow_semantics/model/semantics/linkable_spec_resolver.py +++ b/metricflow-semantics/metricflow_semantics/model/semantics/linkable_spec_resolver.py @@ -72,7 +72,7 @@ def _generate_linkable_time_dimensions( linkable_dimensions.append( LinkableDimension( - semantic_model_origin=semantic_model_origin, + defined_in_semantic_model=semantic_model_origin, element_name=dimension.reference.element_name, dimension_type=DimensionType.TIME, entity_links=entity_links, @@ -88,7 +88,7 @@ def _generate_linkable_time_dimensions( if time_granularity.to_int() <= date_part.to_int(): linkable_dimensions.append( LinkableDimension( - semantic_model_origin=semantic_model_origin, + defined_in_semantic_model=semantic_model_origin, element_name=dimension.reference.element_name, dimension_type=DimensionType.TIME, entity_links=entity_links, @@ -331,7 +331,7 @@ def _get_elements_in_semantic_model(self, semantic_model: SemanticModel) -> Link for entity in semantic_model.entities: linkable_entities.append( LinkableEntity( - semantic_model_origin=semantic_model.reference, + defined_in_semantic_model=semantic_model.reference, element_name=entity.reference.element_name, entity_links=(), join_path=SemanticModelJoinPath( @@ -346,7 +346,7 @@ def _get_elements_in_semantic_model(self, semantic_model: SemanticModel) -> Link continue linkable_entities.append( LinkableEntity( - semantic_model_origin=semantic_model.reference, + defined_in_semantic_model=semantic_model.reference, element_name=entity.reference.element_name, entity_links=(entity_link,), join_path=SemanticModelJoinPath( @@ -363,7 +363,7 @@ def _get_elements_in_semantic_model(self, semantic_model: SemanticModel) -> Link if dimension_type is DimensionType.CATEGORICAL: linkable_dimensions.append( LinkableDimension( - semantic_model_origin=semantic_model.reference, + defined_in_semantic_model=semantic_model.reference, element_name=dimension.reference.element_name, dimension_type=DimensionType.CATEGORICAL, entity_links=(entity_link,), @@ -495,7 +495,7 @@ def _get_metric_time_elements(self, measure_reference: Optional[MeasureReference ) path_key_to_linkable_dimensions[path_key].append( LinkableDimension( - semantic_model_origin=measure_semantic_model.reference if measure_semantic_model else None, + defined_in_semantic_model=measure_semantic_model.reference if measure_semantic_model else None, element_name=MetricFlowReservedKeywords.METRIC_TIME.value, dimension_type=DimensionType.TIME, entity_links=(), @@ -722,7 +722,7 @@ def create_linkable_element_set_from_join_path( if dimension_type == DimensionType.CATEGORICAL: linkable_dimensions.append( LinkableDimension( - semantic_model_origin=semantic_model.reference, + defined_in_semantic_model=semantic_model.reference, element_name=dimension.reference.element_name, dimension_type=DimensionType.CATEGORICAL, entity_links=join_path.entity_links, @@ -750,7 +750,7 @@ def create_linkable_element_set_from_join_path( if entity.reference != join_path.last_entity_link: linkable_entities.append( LinkableEntity( - semantic_model_origin=semantic_model.reference, + defined_in_semantic_model=semantic_model.reference, element_name=entity.reference.element_name, entity_links=join_path.entity_links, join_path=join_path, diff --git a/metricflow-semantics/tests_metricflow_semantics/model/semantics/test_linkable_element_set.py b/metricflow-semantics/tests_metricflow_semantics/model/semantics/test_linkable_element_set.py index ab49e0ed6d..cb28c1ef42 100644 --- a/metricflow-semantics/tests_metricflow_semantics/model/semantics/test_linkable_element_set.py +++ b/metricflow-semantics/tests_metricflow_semantics/model/semantics/test_linkable_element_set.py @@ -58,14 +58,14 @@ # Entities _base_entity = LinkableEntity( element_name=_base_entity_reference.element_name, - semantic_model_origin=_base_semantic_model, + defined_in_semantic_model=_base_semantic_model, entity_links=(), join_path=SemanticModelJoinPath(left_semantic_model_reference=_measure_semantic_model), properties=frozenset([LinkableElementProperty.ENTITY]), ) _ambiguous_entity = LinkableEntity( element_name=AMBIGUOUS_NAME, - semantic_model_origin=_base_semantic_model, + defined_in_semantic_model=_base_semantic_model, entity_links=(_base_entity_reference,), join_path=SemanticModelJoinPath(left_semantic_model_reference=_measure_semantic_model), properties=frozenset([LinkableElementProperty.ENTITY, LinkableElementProperty.LOCAL_LINKED]), @@ -73,7 +73,7 @@ # For testing deduplication on entities _ambiguous_entity_with_join_path = LinkableEntity( element_name=AMBIGUOUS_NAME, - semantic_model_origin=_base_semantic_model, + defined_in_semantic_model=_base_semantic_model, entity_links=(_base_entity_reference,), join_path=SemanticModelJoinPath( left_semantic_model_reference=_measure_semantic_model, @@ -92,7 +92,7 @@ element_name=_base_dimension_reference.element_name, entity_links=(_base_entity_reference,), dimension_type=DimensionType.CATEGORICAL, - semantic_model_origin=_base_semantic_model, + defined_in_semantic_model=_base_semantic_model, join_path=SemanticModelJoinPath(left_semantic_model_reference=_measure_semantic_model), properties=frozenset([LinkableElementProperty.LOCAL_LINKED]), time_granularity=None, @@ -102,7 +102,7 @@ element_name=_time_dimension_reference.element_name, entity_links=(_base_entity_reference,), dimension_type=DimensionType.TIME, - semantic_model_origin=_base_semantic_model, + defined_in_semantic_model=_base_semantic_model, join_path=SemanticModelJoinPath(left_semantic_model_reference=_measure_semantic_model), properties=frozenset([LinkableElementProperty.LOCAL_LINKED]), time_granularity=TimeGranularity.DAY, @@ -113,7 +113,7 @@ element_name=AMBIGUOUS_NAME, entity_links=(_base_entity_reference,), dimension_type=DimensionType.CATEGORICAL, - semantic_model_origin=_secondary_semantic_model, + defined_in_semantic_model=_secondary_semantic_model, join_path=SemanticModelJoinPath(left_semantic_model_reference=_measure_semantic_model), properties=frozenset([LinkableElementProperty.LOCAL_LINKED]), time_granularity=None, @@ -125,7 +125,7 @@ element_name=AMBIGUOUS_NAME, entity_links=(_base_entity_reference,), dimension_type=DimensionType.CATEGORICAL, - semantic_model_origin=_secondary_semantic_model, + defined_in_semantic_model=_secondary_semantic_model, join_path=SemanticModelJoinPath( left_semantic_model_reference=_measure_semantic_model, path_elements=( @@ -576,7 +576,7 @@ def linkable_set() -> LinkableElementSet: # noqa: D103 element_type=LinkableElementType.DIMENSION, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference("dimension_source"), + defined_in_semantic_model=SemanticModelReference("dimension_source"), element_name="dimension_element", dimension_type=DimensionType.CATEGORICAL, entity_links=(entity_0,), @@ -601,7 +601,7 @@ def linkable_set() -> LinkableElementSet: # noqa: D103 time_granularity=TimeGranularity.DAY, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference("time_dimension_source"), + defined_in_semantic_model=SemanticModelReference("time_dimension_source"), element_name="time_dimension_element", dimension_type=DimensionType.TIME, entity_links=(entity_1,), @@ -627,7 +627,7 @@ def linkable_set() -> LinkableElementSet: # noqa: D103 element_type=LinkableElementType.ENTITY, ): ( LinkableEntity( - semantic_model_origin=SemanticModelReference("entity_source"), + defined_in_semantic_model=SemanticModelReference("entity_source"), element_name="entity_element", entity_links=(entity_2,), join_path=SemanticModelJoinPath( diff --git a/metricflow-semantics/tests_metricflow_semantics/model/test_where_filter_spec.py b/metricflow-semantics/tests_metricflow_semantics/model/test_where_filter_spec.py index 1de38e6241..e327580762 100644 --- a/metricflow-semantics/tests_metricflow_semantics/model/test_where_filter_spec.py +++ b/metricflow-semantics/tests_metricflow_semantics/model/test_where_filter_spec.py @@ -115,7 +115,7 @@ def test_dimension_in_filter( # noqa: D103 date_part=None, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference("bookings"), + defined_in_semantic_model=SemanticModelReference("bookings"), dimension_type=DimensionType.CATEGORICAL, element_name="country_latest", entity_links=(EntityReference("listing"),), @@ -173,7 +173,7 @@ def test_dimension_in_filter_with_grain( # noqa: D103 date_part=None, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference("listings_source"), + defined_in_semantic_model=SemanticModelReference("listings_source"), dimension_type=DimensionType.TIME, element_name="created_at", entity_links=(EntityReference("listing"),), @@ -237,7 +237,7 @@ def test_time_dimension_in_filter( # noqa: D103 date_part=None, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference("listings_source"), + defined_in_semantic_model=SemanticModelReference("listings_source"), dimension_type=DimensionType.CATEGORICAL, element_name="created_at", entity_links=(EntityReference("listing"),), @@ -302,7 +302,7 @@ def test_date_part_in_filter( # noqa: D103 date_part=DatePart.YEAR, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference("bookings"), + defined_in_semantic_model=SemanticModelReference("bookings"), dimension_type=DimensionType.TIME, element_name="metric_time", entity_links=(), @@ -370,7 +370,7 @@ def resolved_spec_lookup() -> FilterSpecResolutionLookUp: date_part=DatePart.YEAR, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference("bookings"), + defined_in_semantic_model=SemanticModelReference("bookings"), dimension_type=DimensionType.TIME, element_name="metric_time", entity_links=(), @@ -492,7 +492,7 @@ def test_entity_in_filter( # noqa: D103 date_part=DatePart.YEAR, ): ( LinkableEntity( - semantic_model_origin=SemanticModelReference("bookings"), + defined_in_semantic_model=SemanticModelReference("bookings"), element_name="user", entity_links=(EntityReference("listing"),), join_path=SemanticModelJoinPath( @@ -603,7 +603,7 @@ def get_spec(dimension: str) -> WhereFilterSpec: date_part=DatePart.YEAR, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference("bookings"), + defined_in_semantic_model=SemanticModelReference("bookings"), dimension_type=DimensionType.TIME, element_name=METRIC_TIME_ELEMENT_NAME, entity_links=(), diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__accumulate_last_2_months_metric__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__accumulate_last_2_months_metric__result.txt index 0563b9eb01..36027af385 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__accumulate_last_2_months_metric__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__accumulate_last_2_months_metric__result.txt @@ -8,7 +8,7 @@ GroupByItemResolution( time_granularity=MONTH, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference( + defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), element_name='metric_time', diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__derived_metric_with_different_parent_time_grains__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__derived_metric_with_different_parent_time_grains__result.txt index faf4da1125..0229fb11e7 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__derived_metric_with_different_parent_time_grains__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__derived_metric_with_different_parent_time_grains__result.txt @@ -20,7 +20,7 @@ GroupByItemResolution( time_granularity=MONTH, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference( + defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), element_name='metric_time', @@ -65,7 +65,7 @@ GroupByItemResolution( time_granularity=YEAR, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference( + defined_in_semantic_model=SemanticModelReference( semantic_model_name='yearly_measure_source', ), element_name='metric_time', diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__derived_metric_with_same_parent_time_grains__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__derived_metric_with_same_parent_time_grains__result.txt index 0563b9eb01..36027af385 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__derived_metric_with_same_parent_time_grains__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__derived_metric_with_same_parent_time_grains__result.txt @@ -8,7 +8,7 @@ GroupByItemResolution( time_granularity=MONTH, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference( + defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), element_name='metric_time', diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__metrics_with_different_time_grains__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__metrics_with_different_time_grains__result.txt index fc4edeaab7..9adc6ac8da 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__metrics_with_different_time_grains__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__metrics_with_different_time_grains__result.txt @@ -17,7 +17,7 @@ GroupByItemResolution( time_granularity=MONTH, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference( + defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), element_name='metric_time', @@ -60,7 +60,7 @@ GroupByItemResolution( time_granularity=YEAR, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference( + defined_in_semantic_model=SemanticModelReference( semantic_model_name='yearly_measure_source', ), element_name='metric_time', diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__metrics_with_same_time_grains__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__metrics_with_same_time_grains__result.txt index 0563b9eb01..36027af385 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__metrics_with_same_time_grains__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__metrics_with_same_time_grains__result.txt @@ -8,7 +8,7 @@ GroupByItemResolution( time_granularity=MONTH, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference( + defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), element_name='metric_time', diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__simple_metric__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__simple_metric__result.txt index 0563b9eb01..36027af385 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__simple_metric__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__simple_metric__result.txt @@ -8,7 +8,7 @@ GroupByItemResolution( time_granularity=MONTH, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference( + defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), element_name='metric_time', diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_parse_and_validate_where_constraint_dims__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_parse_and_validate_where_constraint_dims__result.txt index 1c78b42533..f2fbc47b39 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_parse_and_validate_where_constraint_dims__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_parse_and_validate_where_constraint_dims__result.txt @@ -54,7 +54,7 @@ ParseQueryResult( ), ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference( + defined_in_semantic_model=SemanticModelReference( semantic_model_name='bookings_source', ), element_name='is_instant', diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_derived_metrics_with_common_filtered_metric__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_derived_metrics_with_common_filtered_metric__result.txt index 4f73eec46e..055d3e87f4 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_derived_metrics_with_common_filtered_metric__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_derived_metrics_with_common_filtered_metric__result.txt @@ -30,7 +30,7 @@ FilterSpecResolutionLookUp( time_granularity=MONTH, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference( + defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), element_name='metric_time', @@ -93,7 +93,7 @@ FilterSpecResolutionLookUp( time_granularity=MONTH, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference( + defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), element_name='metric_time', diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_invalid_metric_filter__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_invalid_metric_filter__result.txt index 25a315413f..119b0392e5 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_invalid_metric_filter__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_invalid_metric_filter__result.txt @@ -49,7 +49,7 @@ FilterSpecResolutionLookUp( time_granularity=MONTH, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference( + defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), element_name='metric_time', @@ -94,7 +94,7 @@ FilterSpecResolutionLookUp( time_granularity=YEAR, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference( + defined_in_semantic_model=SemanticModelReference( semantic_model_name='yearly_measure_source', ), element_name='metric_time', diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_invalid_metric_input_filter__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_invalid_metric_input_filter__result.txt index 63281fdf3c..7d9f61426a 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_invalid_metric_input_filter__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_invalid_metric_input_filter__result.txt @@ -50,7 +50,7 @@ FilterSpecResolutionLookUp( time_granularity=MONTH, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference( + defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), element_name='metric_time', @@ -97,7 +97,7 @@ FilterSpecResolutionLookUp( time_granularity=YEAR, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference( + defined_in_semantic_model=SemanticModelReference( semantic_model_name='yearly_measure_source', ), element_name='metric_time', diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_valid_metric_filter__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_valid_metric_filter__result.txt index 490c23b61b..02a9dbc33f 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_valid_metric_filter__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_valid_metric_filter__result.txt @@ -30,7 +30,7 @@ FilterSpecResolutionLookUp( time_granularity=MONTH, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference( + defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), element_name='metric_time', diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_valid_metric_input_filter__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_valid_metric_input_filter__result.txt index a9a72e3e83..b0d2033359 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_valid_metric_input_filter__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_valid_metric_input_filter__result.txt @@ -30,7 +30,7 @@ FilterSpecResolutionLookUp( time_granularity=MONTH, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference( + defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), element_name='metric_time', diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__accumulate_last_2_months_metric__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__accumulate_last_2_months_metric__result.txt index 0d7e29528a..af6392ade2 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__accumulate_last_2_months_metric__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__accumulate_last_2_months_metric__result.txt @@ -30,7 +30,7 @@ FilterSpecResolutionLookUp( time_granularity=MONTH, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference( + defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), element_name='metric_time', diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__derived_metric_with_different_parent_time_grains__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__derived_metric_with_different_parent_time_grains__result.txt index 29d7ce7b66..2fb667f41c 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__derived_metric_with_different_parent_time_grains__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__derived_metric_with_different_parent_time_grains__result.txt @@ -49,7 +49,7 @@ FilterSpecResolutionLookUp( time_granularity=MONTH, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference( + defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), element_name='metric_time', @@ -94,7 +94,7 @@ FilterSpecResolutionLookUp( time_granularity=YEAR, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference( + defined_in_semantic_model=SemanticModelReference( semantic_model_name='yearly_measure_source', ), element_name='metric_time', diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__derived_metric_with_same_parent_time_grains__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__derived_metric_with_same_parent_time_grains__result.txt index d164a0ae90..2979f426e1 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__derived_metric_with_same_parent_time_grains__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__derived_metric_with_same_parent_time_grains__result.txt @@ -30,7 +30,7 @@ FilterSpecResolutionLookUp( time_granularity=MONTH, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference( + defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), element_name='metric_time', diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__metrics_with_different_time_grains__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__metrics_with_different_time_grains__result.txt index 636086ac09..870dd193e7 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__metrics_with_different_time_grains__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__metrics_with_different_time_grains__result.txt @@ -51,7 +51,7 @@ FilterSpecResolutionLookUp( time_granularity=MONTH, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference( + defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), element_name='metric_time', @@ -94,7 +94,7 @@ FilterSpecResolutionLookUp( time_granularity=YEAR, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference( + defined_in_semantic_model=SemanticModelReference( semantic_model_name='yearly_measure_source', ), element_name='metric_time', diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__metrics_with_same_time_grains__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__metrics_with_same_time_grains__result.txt index 2d5eff848a..f17cf39eb9 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__metrics_with_same_time_grains__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__metrics_with_same_time_grains__result.txt @@ -33,7 +33,7 @@ FilterSpecResolutionLookUp( time_granularity=MONTH, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference( + defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), element_name='metric_time', diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__simple_metric__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__simple_metric__result.txt index eedf3694f5..f587df8fc9 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__simple_metric__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__simple_metric__result.txt @@ -30,7 +30,7 @@ FilterSpecResolutionLookUp( time_granularity=MONTH, ): ( LinkableDimension( - semantic_model_origin=SemanticModelReference( + defined_in_semantic_model=SemanticModelReference( semantic_model_name='monthly_measures_source', ), element_name='metric_time', diff --git a/metricflow/engine/metricflow_engine.py b/metricflow/engine/metricflow_engine.py index f223e131a7..dd35f97c9a 100644 --- a/metricflow/engine/metricflow_engine.py +++ b/metricflow/engine/metricflow_engine.py @@ -608,10 +608,10 @@ def simple_dimensions_for_metrics( # noqa: D102 ) else: assert ( - linkable_dimension.semantic_model_origin + linkable_dimension.defined_in_semantic_model ), "Only metric_time can have no semantic_model_origin." semantic_model = self._semantic_manifest_lookup.semantic_model_lookup.get_by_reference( - linkable_dimension.semantic_model_origin + linkable_dimension.defined_in_semantic_model ) assert semantic_model dimensions.append( @@ -662,7 +662,7 @@ def entities_for_metrics(self, metric_names: List[str]) -> List[Entity]: # noqa ) in path_key_to_linkable_entities.items(): for linkable_entity in linkable_entity_tuple: semantic_model = self._semantic_manifest_lookup.semantic_model_lookup.get_by_reference( - linkable_entity.semantic_model_origin + linkable_entity.defined_in_semantic_model ) assert semantic_model entities.append( 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 42e2eb8e3b..2f981895a2 100644 --- a/tests_metricflow/plan_conversion/test_dataflow_to_sql_plan.py +++ b/tests_metricflow/plan_conversion/test_dataflow_to_sql_plan.py @@ -202,7 +202,7 @@ def test_filter_with_where_constraint_node( ), linkable_elements=( LinkableDimension( - semantic_model_origin=SemanticModelReference("bookings_source"), + defined_in_semantic_model=SemanticModelReference("bookings_source"), element_name="ds", dimension_type=DimensionType.TIME, entity_links=(EntityReference(element_name="booking"),), diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan__dfp_0.xml index b582dc6c95..790ffe2f20 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan__dfp_0.xml @@ -38,7 +38,7 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan_with_join__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan_with_join__dfp_0.xml index 9c8345d092..7077e14d3d 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan_with_join__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan_with_join__dfp_0.xml @@ -43,7 +43,7 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_filters__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_filters__dfp_0.xml index 1640b927ee..21371744ac 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_filters__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_filters__dfp_0.xml @@ -17,7 +17,7 @@ - + @@ -49,7 +49,7 @@ - + @@ -96,7 +96,7 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_plan__dfp_0.xml index 1ddac764b9..e10f1637e1 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_plan__dfp_0.xml @@ -27,7 +27,7 @@ - + @@ -80,7 +80,7 @@ - + @@ -192,7 +192,7 @@ - + @@ -245,7 +245,7 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_with_reused_measure_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_with_reused_measure_plan__dfp_0.xml index 212afd5307..dacb8f92cf 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_with_reused_measure_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_with_reused_measure_plan__dfp_0.xml @@ -27,7 +27,7 @@ - + @@ -71,7 +71,7 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_to_grain_metric_filter_and_query_have_different_granularities__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_to_grain_metric_filter_and_query_have_different_granularities__dfp_0.xml index fc66b1ec39..99b604df39 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_to_grain_metric_filter_and_query_have_different_granularities__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_to_grain_metric_filter_and_query_have_different_granularities__dfp_0.xml @@ -17,7 +17,7 @@ - + @@ -52,7 +52,7 @@ - + @@ -90,7 +90,7 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_window_metric_filter_and_query_have_different_granularities__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_window_metric_filter_and_query_have_different_granularities__dfp_0.xml index 590612e4b7..9b55aa5c18 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_window_metric_filter_and_query_have_different_granularities__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_window_metric_filter_and_query_have_different_granularities__dfp_0.xml @@ -17,7 +17,7 @@ - + @@ -55,7 +55,7 @@ - + @@ -97,7 +97,7 @@ - + @@ -167,7 +167,7 @@ - + @@ -208,7 +208,7 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan__dfp_0.xml index 83a05ef65b..97d6aa3a03 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan__dfp_0.xml @@ -20,7 +20,7 @@ - + @@ -75,7 +75,7 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan_time_dimension__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan_time_dimension__dfp_0.xml index 79ae091ec1..a84a4e5acf 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan_time_dimension__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan_time_dimension__dfp_0.xml @@ -17,7 +17,7 @@ - + @@ -57,7 +57,7 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_with_common_linkable_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_with_common_linkable_plan__dfp_0.xml index 044edaaee7..c33ea9936a 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_with_common_linkable_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_with_common_linkable_plan__dfp_0.xml @@ -20,7 +20,7 @@ - + @@ -65,7 +65,7 @@ - + diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfp_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfp_0.xml index 9e92b25ecf..25dd48aa97 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfp_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfp_0.xml @@ -59,7 +59,7 @@ - + diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfpo_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfpo_0.xml index 1be231cc4b..c85ce86aca 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfpo_0.xml @@ -59,7 +59,7 @@ - +