From e5c859da444fa15310e0547e4a6a4ab167a40e99 Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Wed, 29 Nov 2023 15:05:50 -0800 Subject: [PATCH 1/2] Add date_part support for ValidLinkableSpecResolver. Adds time dimension specs with the date_part in returned results so that spec patterns can be used to resolve ambiguous group-by-items. --- .../model/semantics/linkable_spec_resolver.py | 78 ++++++++++++++++--- metricflow/test/snapshot_utils.py | 4 +- 2 files changed, 71 insertions(+), 11 deletions(-) diff --git a/metricflow/model/semantics/linkable_spec_resolver.py b/metricflow/model/semantics/linkable_spec_resolver.py index 3ea425d6fa..b40d65037f 100644 --- a/metricflow/model/semantics/linkable_spec_resolver.py +++ b/metricflow/model/semantics/linkable_spec_resolver.py @@ -19,6 +19,7 @@ TimeDimensionReference, ) from dbt_semantic_interfaces.type_enums import MetricType +from dbt_semantic_interfaces.type_enums.date_part import DatePart from dbt_semantic_interfaces.type_enums.time_granularity import TimeGranularity from metricflow.dataset.dataset import DataSet @@ -46,6 +47,7 @@ class ElementPathKey: element_name: str entity_links: Tuple[EntityReference, ...] time_granularity: Optional[TimeGranularity] + date_part: Optional[DatePart] @dataclass(frozen=True) @@ -58,7 +60,8 @@ class LinkableDimension: entity_links: Tuple[EntityReference, ...] join_path: Tuple[SemanticModelJoinPathElement, ...] properties: FrozenSet[LinkableElementProperties] - time_granularity: Optional[TimeGranularity] = None + time_granularity: Optional[TimeGranularity] + date_part: Optional[DatePart] @property def path_key(self) -> ElementPathKey: # noqa: D @@ -66,6 +69,7 @@ def path_key(self) -> ElementPathKey: # noqa: D element_name=self.element_name, entity_links=self.entity_links, time_granularity=self.time_granularity, + date_part=self.date_part, ) @property @@ -86,7 +90,12 @@ class LinkableEntity: @property def path_key(self) -> ElementPathKey: # noqa: D - return ElementPathKey(element_name=self.element_name, entity_links=self.entity_links, time_granularity=None) + return ElementPathKey( + element_name=self.element_name, + entity_links=self.entity_links, + time_granularity=None, + date_part=None, + ) @dataclass(frozen=True) @@ -259,6 +268,7 @@ def as_spec_set(self) -> LinkableSpecSet: # noqa: D element_name=path_key.element_name, entity_links=path_key.entity_links, time_granularity=path_key.time_granularity, + date_part=path_key.date_part, ) for path_key in self.path_key_to_linkable_dimensions.keys() if path_key.time_granularity @@ -324,10 +334,26 @@ def _generate_linkable_time_dimensions( entity_links=entity_links, join_path=tuple(join_path), time_granularity=time_granularity, + date_part=None, properties=frozenset(properties), ) ) + # Add the time dimension aggregated to a different date part. + for date_part in DatePart: + if time_granularity.to_int() <= date_part.to_int(): + linkable_dimensions.append( + LinkableDimension( + semantic_model_origin=semantic_model_origin, + element_name=dimension.reference.element_name, + entity_links=entity_links, + join_path=tuple(join_path), + time_granularity=time_granularity, + date_part=date_part, + properties=frozenset(properties), + ) + ) + return linkable_dimensions @@ -367,6 +393,8 @@ def create_linkable_element_set( entity_links=entity_links, join_path=self.path_elements, properties=with_properties, + time_granularity=None, + date_part=None, ) ) elif dimension_type == DimensionType.TIME: @@ -476,7 +504,19 @@ def __init__( assert_values_exhausted(metric.type) self._metric_to_linkable_element_sets[metric.name] = linkable_sets_for_measure - logger.info(f"Building the [metric -> valid linkable element] index took: {time.time() - start_time:.2f}s") + + # If no metrics are specified, the query interface supports distinct dimension values from a single semantic + # model. + linkable_element_sets_to_merge: List[LinkableElementSet] = [] + + for semantic_model in semantic_manifest.semantic_models: + linkable_element_sets_to_merge.append( + ValidLinkableSpecResolver._get_elements_in_semantic_model(semantic_model) + ) + + self._no_metric_linkable_element_set = LinkableElementSet.merge_by_path_key(linkable_element_sets_to_merge) + + logger.info(f"Building valid group-by-item indexes took: {time.time() - start_time:.2f}s") def _get_semantic_model_for_measure(self, measure_reference: MeasureReference) -> SemanticModel: # noqa: D semantic_models_where_measure_was_found = [] @@ -534,6 +574,8 @@ def _get_elements_in_semantic_model(semantic_model: SemanticModel) -> LinkableEl entity_links=(entity_link,), join_path=(), properties=dimension_properties, + time_granularity=None, + date_part=None, ) ) elif dimension_type is DimensionType.TIME: @@ -627,13 +669,24 @@ def _get_metric_time_elements(self, measure_reference: MeasureReference) -> Link ) # For each of the possible time granularities, create a LinkableDimension for each one. - return LinkableElementSet( - path_key_to_linkable_dimensions={ - ElementPathKey( + + path_key_to_linkable_dimensions: Dict[ElementPathKey, List[LinkableDimension]] = defaultdict(list) + for time_granularity in possible_metric_time_granularities: + possible_date_parts: Sequence[Optional[DatePart]] = ( + # No date part, just the metric time at a different grain. + (None,) + # date part of a metric time at a different grain. + + tuple(date_part for date_part in DatePart if time_granularity.to_int() <= date_part.to_int()) + ) + + for date_part in possible_date_parts: + path_key = ElementPathKey( element_name=DataSet.metric_time_dimension_name(), entity_links=(), time_granularity=time_granularity, - ): ( + date_part=date_part, + ) + path_key_to_linkable_dimensions[path_key].append( LinkableDimension( semantic_model_origin=measure_semantic_model.reference, element_name=DataSet.metric_time_dimension_name(), @@ -642,7 +695,7 @@ def _get_metric_time_elements(self, measure_reference: MeasureReference) -> Link # Anything that's not at the base time granularity of the measure's aggregation time dimension # should be considered derived. properties=frozenset({LinkableElementProperties.METRIC_TIME}) - if time_granularity is agg_time_dimension_granularity + if time_granularity is agg_time_dimension_granularity and date_part is None else frozenset( { LinkableElementProperties.METRIC_TIME, @@ -650,9 +703,14 @@ def _get_metric_time_elements(self, measure_reference: MeasureReference) -> Link } ), time_granularity=time_granularity, - ), + date_part=date_part, + ) ) - for time_granularity in possible_metric_time_granularities + + return LinkableElementSet( + path_key_to_linkable_dimensions={ + path_key: tuple(linkable_dimensions) + for path_key, linkable_dimensions in path_key_to_linkable_dimensions.items() }, path_key_to_linkable_entities={}, ) diff --git a/metricflow/test/snapshot_utils.py b/metricflow/test/snapshot_utils.py index 76921e49d0..e67c3e3a74 100644 --- a/metricflow/test/snapshot_utils.py +++ b/metricflow/test/snapshot_utils.py @@ -295,7 +295,7 @@ def assert_linkable_element_set_snapshot_equal( # noqa: D set_id: str, linkable_element_set: LinkableElementSet, ) -> None: - headers = ("Semantic Model", "Entity Links", "Name", "Time Granularity", "Properties") + headers = ("Semantic Model", "Entity Links", "Name", "Time Granularity", "Date Part", "Properties") rows = [] for linkable_dimension_iterable in linkable_element_set.path_key_to_linkable_dimensions.values(): for linkable_dimension in linkable_dimension_iterable: @@ -306,6 +306,7 @@ def assert_linkable_element_set_snapshot_equal( # noqa: D tuple(entity_link.element_name for entity_link in linkable_dimension.entity_links), linkable_dimension.element_name, linkable_dimension.time_granularity.name if linkable_dimension.time_granularity is not None else "", + linkable_dimension.date_part.name if linkable_dimension.date_part is not None else "", sorted( linkable_element_property.name for linkable_element_property in linkable_dimension.properties ), @@ -321,6 +322,7 @@ def assert_linkable_element_set_snapshot_equal( # noqa: D tuple(entity_link.element_name for entity_link in linkable_entity.entity_links), linkable_entity.element_name, "", + "", sorted(linkable_element_property.name for linkable_element_property in linkable_entity.properties), ) ) From 0d5afea6bdeaa1d5d1a430734cc3fd48b4357ada Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Wed, 29 Nov 2023 14:22:36 -0800 Subject: [PATCH 2/2] Update snapshots to include date_part. --- .../str/test_all_properties__result0.txt | 226 ++++++++++++++---- .../test_cyclic_join_manifest__result0.txt | 95 ++++++-- ...roperty_for_cumulative_metric__result0.txt | 6 +- ..._property_for_derived_metrics__result0.txt | 54 ++++- .../str/test_one_property__result0.txt | 8 +- .../str/test_linkable_set__result0.txt | 134 ++++++++--- ...imensions_in_different_models__result0.txt | 78 ++++-- .../test_elements_for_metric__result0.txt | 72 ++++++ 8 files changed, 524 insertions(+), 149 deletions(-) diff --git a/metricflow/test/snapshots/test_linkable_spec_resolver.py/str/test_all_properties__result0.txt b/metricflow/test/snapshots/test_linkable_spec_resolver.py/str/test_all_properties__result0.txt index 26b6031523..aaf38fc1e7 100644 --- a/metricflow/test/snapshots/test_linkable_spec_resolver.py/str/test_all_properties__result0.txt +++ b/metricflow/test/snapshots/test_linkable_spec_resolver.py/str/test_all_properties__result0.txt @@ -1,53 +1,173 @@ -Semantic Model Entity Links Name Time Granularity Properties -------------------- ------------------- ----------------- ------------------ --------------------------------------------------- -bookings_source () listing ['ENTITY', 'LOCAL'] -bookings_source () metric_time DAY ['METRIC_TIME'] -bookings_source () metric_time MONTH ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] -bookings_source () metric_time QUARTER ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] -bookings_source () metric_time WEEK ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] -bookings_source () metric_time YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] -companies ('listing', 'user') company ['ENTITY', 'JOINED', 'MULTI_HOP'] -companies ('listing', 'user') company_name ['JOINED', 'MULTI_HOP'] -listings_latest ('listing',) capacity_latest ['JOINED'] -listings_latest ('listing',) country_latest ['JOINED'] -listings_latest ('listing',) created_at DAY ['JOINED'] -listings_latest ('listing',) created_at MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] -listings_latest ('listing',) created_at QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] -listings_latest ('listing',) created_at WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED'] -listings_latest ('listing',) created_at YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] -listings_latest ('listing',) ds DAY ['JOINED'] -listings_latest ('listing',) ds MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] -listings_latest ('listing',) ds QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] -listings_latest ('listing',) ds WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED'] -listings_latest ('listing',) ds YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] -listings_latest ('listing',) is_lux_latest ['JOINED'] -listings_latest ('listing',) user ['ENTITY', 'JOINED'] -lux_listing_mapping ('listing',) lux_listing ['ENTITY', 'JOINED'] -users_ds_source ('listing', 'user') created_at DAY ['JOINED', 'MULTI_HOP'] -users_ds_source ('listing', 'user') created_at MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -users_ds_source ('listing', 'user') created_at QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -users_ds_source ('listing', 'user') created_at WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -users_ds_source ('listing', 'user') created_at YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -users_ds_source ('listing', 'user') ds DAY ['JOINED', 'MULTI_HOP'] -users_ds_source ('listing', 'user') ds MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -users_ds_source ('listing', 'user') ds QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -users_ds_source ('listing', 'user') ds WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -users_ds_source ('listing', 'user') ds YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -users_ds_source ('listing', 'user') ds_partitioned DAY ['JOINED', 'MULTI_HOP'] -users_ds_source ('listing', 'user') ds_partitioned MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -users_ds_source ('listing', 'user') ds_partitioned QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -users_ds_source ('listing', 'user') ds_partitioned WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -users_ds_source ('listing', 'user') ds_partitioned YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -users_ds_source ('listing', 'user') home_state ['JOINED', 'MULTI_HOP'] -users_latest ('listing', 'user') ds_latest DAY ['JOINED', 'MULTI_HOP'] -users_latest ('listing', 'user') ds_latest MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -users_latest ('listing', 'user') ds_latest QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -users_latest ('listing', 'user') ds_latest WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -users_latest ('listing', 'user') ds_latest YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -users_latest ('listing', 'user') home_state_latest ['JOINED', 'MULTI_HOP'] -views_source () listing ['ENTITY', 'LOCAL'] -views_source () metric_time DAY ['METRIC_TIME'] -views_source () metric_time MONTH ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] -views_source () metric_time QUARTER ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] -views_source () metric_time WEEK ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] -views_source () metric_time YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +Semantic Model Entity Links Name Time Granularity Date Part Properties +------------------- ------------------- ----------------- ------------------ ----------- --------------------------------------------------- +bookings_source () listing ['ENTITY', 'LOCAL'] +bookings_source () metric_time DAY ['METRIC_TIME'] +bookings_source () metric_time DAY DAY ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time DAY DOW ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time DAY DOY ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time DAY MONTH ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time DAY QUARTER ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time DAY YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time MONTH ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time MONTH MONTH ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time MONTH QUARTER ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time QUARTER ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time WEEK ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +companies ('listing', 'user') company ['ENTITY', 'JOINED', 'MULTI_HOP'] +companies ('listing', 'user') company_name ['JOINED', 'MULTI_HOP'] +listings_latest ('listing',) capacity_latest ['JOINED'] +listings_latest ('listing',) country_latest ['JOINED'] +listings_latest ('listing',) created_at DAY ['JOINED'] +listings_latest ('listing',) created_at DAY DAY ['JOINED'] +listings_latest ('listing',) created_at DAY DOW ['JOINED'] +listings_latest ('listing',) created_at DAY DOY ['JOINED'] +listings_latest ('listing',) created_at DAY MONTH ['JOINED'] +listings_latest ('listing',) created_at DAY QUARTER ['JOINED'] +listings_latest ('listing',) created_at DAY YEAR ['JOINED'] +listings_latest ('listing',) created_at MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] +listings_latest ('listing',) created_at MONTH MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] +listings_latest ('listing',) created_at MONTH QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +listings_latest ('listing',) created_at MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +listings_latest ('listing',) created_at QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +listings_latest ('listing',) created_at QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +listings_latest ('listing',) created_at QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +listings_latest ('listing',) created_at WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED'] +listings_latest ('listing',) created_at WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] +listings_latest ('listing',) created_at WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +listings_latest ('listing',) created_at WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +listings_latest ('listing',) created_at YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +listings_latest ('listing',) created_at YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +listings_latest ('listing',) ds DAY ['JOINED'] +listings_latest ('listing',) ds DAY DAY ['JOINED'] +listings_latest ('listing',) ds DAY DOW ['JOINED'] +listings_latest ('listing',) ds DAY DOY ['JOINED'] +listings_latest ('listing',) ds DAY MONTH ['JOINED'] +listings_latest ('listing',) ds DAY QUARTER ['JOINED'] +listings_latest ('listing',) ds DAY YEAR ['JOINED'] +listings_latest ('listing',) ds MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] +listings_latest ('listing',) ds MONTH MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] +listings_latest ('listing',) ds MONTH QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +listings_latest ('listing',) ds MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +listings_latest ('listing',) ds QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +listings_latest ('listing',) ds QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +listings_latest ('listing',) ds QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +listings_latest ('listing',) ds WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED'] +listings_latest ('listing',) ds WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] +listings_latest ('listing',) ds WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +listings_latest ('listing',) ds WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +listings_latest ('listing',) ds YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +listings_latest ('listing',) ds YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +listings_latest ('listing',) is_lux_latest ['JOINED'] +listings_latest ('listing',) user ['ENTITY', 'JOINED'] +lux_listing_mapping ('listing',) lux_listing ['ENTITY', 'JOINED'] +users_ds_source ('listing', 'user') created_at DAY ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') created_at DAY DAY ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') created_at DAY DOW ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') created_at DAY DOY ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') created_at DAY MONTH ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') created_at DAY QUARTER ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') created_at DAY YEAR ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') created_at MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') created_at MONTH MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') created_at MONTH QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') created_at MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') created_at QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') created_at QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') created_at QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') created_at WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') created_at WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') created_at WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') created_at WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') created_at YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') created_at YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds DAY ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds DAY DAY ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds DAY DOW ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds DAY DOY ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds DAY MONTH ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds DAY QUARTER ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds DAY YEAR ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds MONTH MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds MONTH QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned DAY ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned DAY DAY ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned DAY DOW ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned DAY DOY ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned DAY MONTH ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned DAY QUARTER ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned DAY YEAR ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned MONTH MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned MONTH QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') home_state ['JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest DAY ['JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest DAY DAY ['JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest DAY DOW ['JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest DAY DOY ['JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest DAY MONTH ['JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest DAY QUARTER ['JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest DAY YEAR ['JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest MONTH MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest MONTH QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') home_state_latest ['JOINED', 'MULTI_HOP'] +views_source () listing ['ENTITY', 'LOCAL'] +views_source () metric_time DAY ['METRIC_TIME'] +views_source () metric_time DAY DAY ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time DAY DOW ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time DAY DOY ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time DAY MONTH ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time DAY QUARTER ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time DAY YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time MONTH ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time MONTH MONTH ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time MONTH QUARTER ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time QUARTER ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time WEEK ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] diff --git a/metricflow/test/snapshots/test_linkable_spec_resolver.py/str/test_cyclic_join_manifest__result0.txt b/metricflow/test/snapshots/test_linkable_spec_resolver.py/str/test_cyclic_join_manifest__result0.txt index 12ec349eab..fb5df81a38 100644 --- a/metricflow/test/snapshots/test_linkable_spec_resolver.py/str/test_cyclic_join_manifest__result0.txt +++ b/metricflow/test/snapshots/test_linkable_spec_resolver.py/str/test_cyclic_join_manifest__result0.txt @@ -1,25 +1,70 @@ -Semantic Model Entity Links Name Time Granularity Properties ----------------------- ------------------ --------------- ------------------ ------------------------------------------- -listings_latest () cyclic_entity ['ENTITY', 'LOCAL'] -listings_latest () listing ['ENTITY', 'LOCAL'] -listings_latest () metric_time DAY ['METRIC_TIME'] -listings_latest () metric_time MONTH ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] -listings_latest () metric_time QUARTER ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] -listings_latest () metric_time WEEK ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] -listings_latest () metric_time YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] -listings_latest ('cyclic_entity',) country_latest ['LOCAL'] -listings_latest ('cyclic_entity',) cyclic_entity ['ENTITY', 'LOCAL'] -listings_latest ('cyclic_entity',) ds DAY ['LOCAL'] -listings_latest ('cyclic_entity',) ds MONTH ['DERIVED_TIME_GRANULARITY', 'LOCAL'] -listings_latest ('cyclic_entity',) ds QUARTER ['DERIVED_TIME_GRANULARITY', 'LOCAL'] -listings_latest ('cyclic_entity',) ds WEEK ['DERIVED_TIME_GRANULARITY', 'LOCAL'] -listings_latest ('cyclic_entity',) ds YEAR ['DERIVED_TIME_GRANULARITY', 'LOCAL'] -listings_latest ('listing',) country_latest ['LOCAL'] -listings_latest ('listing',) ds DAY ['LOCAL'] -listings_latest ('listing',) ds MONTH ['DERIVED_TIME_GRANULARITY', 'LOCAL'] -listings_latest ('listing',) ds QUARTER ['DERIVED_TIME_GRANULARITY', 'LOCAL'] -listings_latest ('listing',) ds WEEK ['DERIVED_TIME_GRANULARITY', 'LOCAL'] -listings_latest ('listing',) ds YEAR ['DERIVED_TIME_GRANULARITY', 'LOCAL'] -listings_latest ('listing',) listing ['ENTITY', 'LOCAL'] -listings_latest_cyclic ('cyclic_entity',) capacity_latest ['JOINED'] -listings_latest_cyclic ('listing',) capacity_latest ['JOINED'] +Semantic Model Entity Links Name Time Granularity Date Part Properties +---------------------- ------------------ --------------- ------------------ ----------- ------------------------------------------- +listings_latest () cyclic_entity ['ENTITY', 'LOCAL'] +listings_latest () listing ['ENTITY', 'LOCAL'] +listings_latest () metric_time DAY ['METRIC_TIME'] +listings_latest () metric_time DAY DAY ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +listings_latest () metric_time DAY DOW ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +listings_latest () metric_time DAY DOY ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +listings_latest () metric_time DAY MONTH ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +listings_latest () metric_time DAY QUARTER ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +listings_latest () metric_time DAY YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +listings_latest () metric_time MONTH ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +listings_latest () metric_time MONTH MONTH ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +listings_latest () metric_time MONTH QUARTER ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +listings_latest () metric_time MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +listings_latest () metric_time QUARTER ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +listings_latest () metric_time QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +listings_latest () metric_time QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +listings_latest () metric_time WEEK ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +listings_latest () metric_time WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +listings_latest () metric_time WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +listings_latest () metric_time WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +listings_latest () metric_time YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +listings_latest () metric_time YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +listings_latest ('cyclic_entity',) country_latest ['LOCAL'] +listings_latest ('cyclic_entity',) cyclic_entity ['ENTITY', 'LOCAL'] +listings_latest ('cyclic_entity',) ds DAY ['LOCAL'] +listings_latest ('cyclic_entity',) ds DAY DAY ['LOCAL'] +listings_latest ('cyclic_entity',) ds DAY DOW ['LOCAL'] +listings_latest ('cyclic_entity',) ds DAY DOY ['LOCAL'] +listings_latest ('cyclic_entity',) ds DAY MONTH ['LOCAL'] +listings_latest ('cyclic_entity',) ds DAY QUARTER ['LOCAL'] +listings_latest ('cyclic_entity',) ds DAY YEAR ['LOCAL'] +listings_latest ('cyclic_entity',) ds MONTH ['DERIVED_TIME_GRANULARITY', 'LOCAL'] +listings_latest ('cyclic_entity',) ds MONTH MONTH ['DERIVED_TIME_GRANULARITY', 'LOCAL'] +listings_latest ('cyclic_entity',) ds MONTH QUARTER ['DERIVED_TIME_GRANULARITY', 'LOCAL'] +listings_latest ('cyclic_entity',) ds MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'LOCAL'] +listings_latest ('cyclic_entity',) ds QUARTER ['DERIVED_TIME_GRANULARITY', 'LOCAL'] +listings_latest ('cyclic_entity',) ds QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'LOCAL'] +listings_latest ('cyclic_entity',) ds QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'LOCAL'] +listings_latest ('cyclic_entity',) ds WEEK ['DERIVED_TIME_GRANULARITY', 'LOCAL'] +listings_latest ('cyclic_entity',) ds WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'LOCAL'] +listings_latest ('cyclic_entity',) ds WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'LOCAL'] +listings_latest ('cyclic_entity',) ds WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'LOCAL'] +listings_latest ('cyclic_entity',) ds YEAR ['DERIVED_TIME_GRANULARITY', 'LOCAL'] +listings_latest ('cyclic_entity',) ds YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'LOCAL'] +listings_latest ('listing',) country_latest ['LOCAL'] +listings_latest ('listing',) ds DAY ['LOCAL'] +listings_latest ('listing',) ds DAY DAY ['LOCAL'] +listings_latest ('listing',) ds DAY DOW ['LOCAL'] +listings_latest ('listing',) ds DAY DOY ['LOCAL'] +listings_latest ('listing',) ds DAY MONTH ['LOCAL'] +listings_latest ('listing',) ds DAY QUARTER ['LOCAL'] +listings_latest ('listing',) ds DAY YEAR ['LOCAL'] +listings_latest ('listing',) ds MONTH ['DERIVED_TIME_GRANULARITY', 'LOCAL'] +listings_latest ('listing',) ds MONTH MONTH ['DERIVED_TIME_GRANULARITY', 'LOCAL'] +listings_latest ('listing',) ds MONTH QUARTER ['DERIVED_TIME_GRANULARITY', 'LOCAL'] +listings_latest ('listing',) ds MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'LOCAL'] +listings_latest ('listing',) ds QUARTER ['DERIVED_TIME_GRANULARITY', 'LOCAL'] +listings_latest ('listing',) ds QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'LOCAL'] +listings_latest ('listing',) ds QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'LOCAL'] +listings_latest ('listing',) ds WEEK ['DERIVED_TIME_GRANULARITY', 'LOCAL'] +listings_latest ('listing',) ds WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'LOCAL'] +listings_latest ('listing',) ds WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'LOCAL'] +listings_latest ('listing',) ds WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'LOCAL'] +listings_latest ('listing',) ds YEAR ['DERIVED_TIME_GRANULARITY', 'LOCAL'] +listings_latest ('listing',) ds YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'LOCAL'] +listings_latest ('listing',) listing ['ENTITY', 'LOCAL'] +listings_latest_cyclic ('cyclic_entity',) capacity_latest ['JOINED'] +listings_latest_cyclic ('listing',) capacity_latest ['JOINED'] diff --git a/metricflow/test/snapshots/test_linkable_spec_resolver.py/str/test_metric_time_property_for_cumulative_metric__result0.txt b/metricflow/test/snapshots/test_linkable_spec_resolver.py/str/test_metric_time_property_for_cumulative_metric__result0.txt index 3442f8bc11..8b7de922e3 100644 --- a/metricflow/test/snapshots/test_linkable_spec_resolver.py/str/test_metric_time_property_for_cumulative_metric__result0.txt +++ b/metricflow/test/snapshots/test_linkable_spec_resolver.py/str/test_metric_time_property_for_cumulative_metric__result0.txt @@ -1,3 +1,3 @@ -Semantic Model Entity Links Name Time Granularity Properties ----------------- -------------- ----------- ------------------ --------------- -revenue () metric_time DAY ['METRIC_TIME'] +Semantic Model Entity Links Name Time Granularity Date Part Properties +---------------- -------------- ----------- ------------------ ----------- --------------- +revenue () metric_time DAY ['METRIC_TIME'] diff --git a/metricflow/test/snapshots/test_linkable_spec_resolver.py/str/test_metric_time_property_for_derived_metrics__result0.txt b/metricflow/test/snapshots/test_linkable_spec_resolver.py/str/test_metric_time_property_for_derived_metrics__result0.txt index 23c053de4b..9cef54b307 100644 --- a/metricflow/test/snapshots/test_linkable_spec_resolver.py/str/test_metric_time_property_for_derived_metrics__result0.txt +++ b/metricflow/test/snapshots/test_linkable_spec_resolver.py/str/test_metric_time_property_for_derived_metrics__result0.txt @@ -1,12 +1,42 @@ -Semantic Model Entity Links Name Time Granularity Properties ----------------- -------------- ----------- ------------------ ------------------------------------------- -bookings_source () metric_time DAY ['METRIC_TIME'] -bookings_source () metric_time MONTH ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] -bookings_source () metric_time QUARTER ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] -bookings_source () metric_time WEEK ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] -bookings_source () metric_time YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] -views_source () metric_time DAY ['METRIC_TIME'] -views_source () metric_time MONTH ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] -views_source () metric_time QUARTER ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] -views_source () metric_time WEEK ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] -views_source () metric_time YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +Semantic Model Entity Links Name Time Granularity Date Part Properties +---------------- -------------- ----------- ------------------ ----------- ------------------------------------------- +bookings_source () metric_time DAY ['METRIC_TIME'] +bookings_source () metric_time DAY DAY ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time DAY DOW ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time DAY DOY ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time DAY MONTH ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time DAY QUARTER ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time DAY YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time MONTH ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time MONTH MONTH ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time MONTH QUARTER ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time QUARTER ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time WEEK ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +bookings_source () metric_time YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time DAY ['METRIC_TIME'] +views_source () metric_time DAY DAY ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time DAY DOW ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time DAY DOY ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time DAY MONTH ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time DAY QUARTER ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time DAY YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time MONTH ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time MONTH MONTH ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time MONTH QUARTER ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time QUARTER ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time WEEK ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] +views_source () metric_time YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'METRIC_TIME'] diff --git a/metricflow/test/snapshots/test_linkable_spec_resolver.py/str/test_one_property__result0.txt b/metricflow/test/snapshots/test_linkable_spec_resolver.py/str/test_one_property__result0.txt index fed1028662..a1cfe5c67c 100644 --- a/metricflow/test/snapshots/test_linkable_spec_resolver.py/str/test_one_property__result0.txt +++ b/metricflow/test/snapshots/test_linkable_spec_resolver.py/str/test_one_property__result0.txt @@ -1,4 +1,4 @@ -Semantic Model Entity Links Name Time Granularity Properties ----------------- -------------- ------- ------------------ ------------------- -bookings_source () listing ['ENTITY', 'LOCAL'] -views_source () listing ['ENTITY', 'LOCAL'] +Semantic Model Entity Links Name Time Granularity Date Part Properties +---------------- -------------- ------- ------------------ ----------- ------------------- +bookings_source () listing ['ENTITY', 'LOCAL'] +views_source () listing ['ENTITY', 'LOCAL'] diff --git a/metricflow/test/snapshots/test_semantic_model_container.py/str/test_linkable_set__result0.txt b/metricflow/test/snapshots/test_semantic_model_container.py/str/test_linkable_set__result0.txt index 09c1c191ca..d0c49e26e0 100644 --- a/metricflow/test/snapshots/test_semantic_model_container.py/str/test_linkable_set__result0.txt +++ b/metricflow/test/snapshots/test_semantic_model_container.py/str/test_linkable_set__result0.txt @@ -1,31 +1,103 @@ -Semantic Model Entity Links Name Time Granularity Properties -------------------- ------------------- ----------------- ------------------ --------------------------------- -companies ('listing', 'user') company ['ENTITY', 'JOINED', 'MULTI_HOP'] -companies ('listing', 'user') company_name ['JOINED', 'MULTI_HOP'] -companies ('user',) company ['ENTITY', 'JOINED'] -companies ('user',) company_name ['JOINED'] -listings_latest ('listing',) capacity_latest ['JOINED'] -listings_latest ('listing',) country_latest ['JOINED'] -listings_latest ('listing',) created_at DAY ['JOINED'] -listings_latest ('listing',) ds DAY ['JOINED'] -listings_latest ('listing',) is_lux_latest ['JOINED'] -listings_latest ('listing',) user ['ENTITY', 'JOINED'] -lux_listing_mapping ('listing',) lux_listing ['ENTITY', 'JOINED'] -users_ds_source ('listing', 'user') created_at DAY ['JOINED', 'MULTI_HOP'] -users_ds_source ('listing', 'user') ds DAY ['JOINED', 'MULTI_HOP'] -users_ds_source ('listing', 'user') ds_partitioned DAY ['JOINED', 'MULTI_HOP'] -users_ds_source ('listing', 'user') home_state ['JOINED', 'MULTI_HOP'] -users_ds_source ('user',) created_at DAY ['JOINED'] -users_ds_source ('user',) ds DAY ['JOINED'] -users_ds_source ('user',) ds_partitioned DAY ['JOINED'] -users_ds_source ('user',) home_state ['JOINED'] -users_latest ('listing', 'user') ds_latest DAY ['JOINED', 'MULTI_HOP'] -users_latest ('listing', 'user') home_state_latest ['JOINED', 'MULTI_HOP'] -users_latest ('user',) ds_latest DAY ['JOINED'] -users_latest ('user',) home_state_latest ['JOINED'] -views_source () listing ['ENTITY', 'LOCAL'] -views_source () user ['ENTITY', 'LOCAL'] -views_source ('view',) ds DAY ['LOCAL'] -views_source ('view',) ds_partitioned DAY ['LOCAL'] -views_source ('view',) listing ['ENTITY', 'LOCAL'] -views_source ('view',) user ['ENTITY', 'LOCAL'] +Semantic Model Entity Links Name Time Granularity Date Part Properties +------------------- ------------------- ----------------- ------------------ ----------- --------------------------------- +companies ('listing', 'user') company ['ENTITY', 'JOINED', 'MULTI_HOP'] +companies ('listing', 'user') company_name ['JOINED', 'MULTI_HOP'] +companies ('user',) company ['ENTITY', 'JOINED'] +companies ('user',) company_name ['JOINED'] +listings_latest ('listing',) capacity_latest ['JOINED'] +listings_latest ('listing',) country_latest ['JOINED'] +listings_latest ('listing',) created_at DAY ['JOINED'] +listings_latest ('listing',) created_at DAY DAY ['JOINED'] +listings_latest ('listing',) created_at DAY DOW ['JOINED'] +listings_latest ('listing',) created_at DAY DOY ['JOINED'] +listings_latest ('listing',) created_at DAY MONTH ['JOINED'] +listings_latest ('listing',) created_at DAY QUARTER ['JOINED'] +listings_latest ('listing',) created_at DAY YEAR ['JOINED'] +listings_latest ('listing',) ds DAY ['JOINED'] +listings_latest ('listing',) ds DAY DAY ['JOINED'] +listings_latest ('listing',) ds DAY DOW ['JOINED'] +listings_latest ('listing',) ds DAY DOY ['JOINED'] +listings_latest ('listing',) ds DAY MONTH ['JOINED'] +listings_latest ('listing',) ds DAY QUARTER ['JOINED'] +listings_latest ('listing',) ds DAY YEAR ['JOINED'] +listings_latest ('listing',) is_lux_latest ['JOINED'] +listings_latest ('listing',) user ['ENTITY', 'JOINED'] +lux_listing_mapping ('listing',) lux_listing ['ENTITY', 'JOINED'] +users_ds_source ('listing', 'user') created_at DAY ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') created_at DAY DAY ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') created_at DAY DOW ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') created_at DAY DOY ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') created_at DAY MONTH ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') created_at DAY QUARTER ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') created_at DAY YEAR ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds DAY ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds DAY DAY ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds DAY DOW ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds DAY DOY ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds DAY MONTH ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds DAY QUARTER ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds DAY YEAR ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned DAY ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned DAY DAY ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned DAY DOW ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned DAY DOY ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned DAY MONTH ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned DAY QUARTER ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned DAY YEAR ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') home_state ['JOINED', 'MULTI_HOP'] +users_ds_source ('user',) created_at DAY ['JOINED'] +users_ds_source ('user',) created_at DAY DAY ['JOINED'] +users_ds_source ('user',) created_at DAY DOW ['JOINED'] +users_ds_source ('user',) created_at DAY DOY ['JOINED'] +users_ds_source ('user',) created_at DAY MONTH ['JOINED'] +users_ds_source ('user',) created_at DAY QUARTER ['JOINED'] +users_ds_source ('user',) created_at DAY YEAR ['JOINED'] +users_ds_source ('user',) ds DAY ['JOINED'] +users_ds_source ('user',) ds DAY DAY ['JOINED'] +users_ds_source ('user',) ds DAY DOW ['JOINED'] +users_ds_source ('user',) ds DAY DOY ['JOINED'] +users_ds_source ('user',) ds DAY MONTH ['JOINED'] +users_ds_source ('user',) ds DAY QUARTER ['JOINED'] +users_ds_source ('user',) ds DAY YEAR ['JOINED'] +users_ds_source ('user',) ds_partitioned DAY ['JOINED'] +users_ds_source ('user',) ds_partitioned DAY DAY ['JOINED'] +users_ds_source ('user',) ds_partitioned DAY DOW ['JOINED'] +users_ds_source ('user',) ds_partitioned DAY DOY ['JOINED'] +users_ds_source ('user',) ds_partitioned DAY MONTH ['JOINED'] +users_ds_source ('user',) ds_partitioned DAY QUARTER ['JOINED'] +users_ds_source ('user',) ds_partitioned DAY YEAR ['JOINED'] +users_ds_source ('user',) home_state ['JOINED'] +users_latest ('listing', 'user') ds_latest DAY ['JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest DAY DAY ['JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest DAY DOW ['JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest DAY DOY ['JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest DAY MONTH ['JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest DAY QUARTER ['JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest DAY YEAR ['JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') home_state_latest ['JOINED', 'MULTI_HOP'] +users_latest ('user',) ds_latest DAY ['JOINED'] +users_latest ('user',) ds_latest DAY DAY ['JOINED'] +users_latest ('user',) ds_latest DAY DOW ['JOINED'] +users_latest ('user',) ds_latest DAY DOY ['JOINED'] +users_latest ('user',) ds_latest DAY MONTH ['JOINED'] +users_latest ('user',) ds_latest DAY QUARTER ['JOINED'] +users_latest ('user',) ds_latest DAY YEAR ['JOINED'] +users_latest ('user',) home_state_latest ['JOINED'] +views_source () listing ['ENTITY', 'LOCAL'] +views_source () user ['ENTITY', 'LOCAL'] +views_source ('view',) ds DAY ['LOCAL'] +views_source ('view',) ds DAY DAY ['LOCAL'] +views_source ('view',) ds DAY DOW ['LOCAL'] +views_source ('view',) ds DAY DOY ['LOCAL'] +views_source ('view',) ds DAY MONTH ['LOCAL'] +views_source ('view',) ds DAY QUARTER ['LOCAL'] +views_source ('view',) ds DAY YEAR ['LOCAL'] +views_source ('view',) ds_partitioned DAY ['LOCAL'] +views_source ('view',) ds_partitioned DAY DAY ['LOCAL'] +views_source ('view',) ds_partitioned DAY DOW ['LOCAL'] +views_source ('view',) ds_partitioned DAY DOY ['LOCAL'] +views_source ('view',) ds_partitioned DAY MONTH ['LOCAL'] +views_source ('view',) ds_partitioned DAY QUARTER ['LOCAL'] +views_source ('view',) ds_partitioned DAY YEAR ['LOCAL'] +views_source ('view',) listing ['ENTITY', 'LOCAL'] +views_source ('view',) user ['ENTITY', 'LOCAL'] diff --git a/metricflow/test/snapshots/test_semantic_model_container.py/str/test_linkable_set_for_common_dimensions_in_different_models__result0.txt b/metricflow/test/snapshots/test_semantic_model_container.py/str/test_linkable_set_for_common_dimensions_in_different_models__result0.txt index 2ff65f8c34..6dbd3329a7 100644 --- a/metricflow/test/snapshots/test_semantic_model_container.py/str/test_linkable_set_for_common_dimensions_in_different_models__result0.txt +++ b/metricflow/test/snapshots/test_semantic_model_container.py/str/test_linkable_set_for_common_dimensions_in_different_models__result0.txt @@ -1,21 +1,57 @@ -Semantic Model Entity Links Name Time Granularity Properties -------------------- ------------------- ----------------- ------------------ --------------------------------- -bookings_source () listing ['ENTITY', 'LOCAL'] -bookings_source () metric_time DAY ['METRIC_TIME'] -companies ('listing', 'user') company ['ENTITY', 'JOINED', 'MULTI_HOP'] -companies ('listing', 'user') company_name ['JOINED', 'MULTI_HOP'] -listings_latest ('listing',) capacity_latest ['JOINED'] -listings_latest ('listing',) country_latest ['JOINED'] -listings_latest ('listing',) created_at DAY ['JOINED'] -listings_latest ('listing',) ds DAY ['JOINED'] -listings_latest ('listing',) is_lux_latest ['JOINED'] -listings_latest ('listing',) user ['ENTITY', 'JOINED'] -lux_listing_mapping ('listing',) lux_listing ['ENTITY', 'JOINED'] -users_ds_source ('listing', 'user') created_at DAY ['JOINED', 'MULTI_HOP'] -users_ds_source ('listing', 'user') ds DAY ['JOINED', 'MULTI_HOP'] -users_ds_source ('listing', 'user') ds_partitioned DAY ['JOINED', 'MULTI_HOP'] -users_ds_source ('listing', 'user') home_state ['JOINED', 'MULTI_HOP'] -users_latest ('listing', 'user') ds_latest DAY ['JOINED', 'MULTI_HOP'] -users_latest ('listing', 'user') home_state_latest ['JOINED', 'MULTI_HOP'] -views_source () listing ['ENTITY', 'LOCAL'] -views_source () metric_time DAY ['METRIC_TIME'] +Semantic Model Entity Links Name Time Granularity Date Part Properties +------------------- ------------------- ----------------- ------------------ ----------- --------------------------------- +bookings_source () listing ['ENTITY', 'LOCAL'] +bookings_source () metric_time DAY ['METRIC_TIME'] +companies ('listing', 'user') company ['ENTITY', 'JOINED', 'MULTI_HOP'] +companies ('listing', 'user') company_name ['JOINED', 'MULTI_HOP'] +listings_latest ('listing',) capacity_latest ['JOINED'] +listings_latest ('listing',) country_latest ['JOINED'] +listings_latest ('listing',) created_at DAY ['JOINED'] +listings_latest ('listing',) created_at DAY DAY ['JOINED'] +listings_latest ('listing',) created_at DAY DOW ['JOINED'] +listings_latest ('listing',) created_at DAY DOY ['JOINED'] +listings_latest ('listing',) created_at DAY MONTH ['JOINED'] +listings_latest ('listing',) created_at DAY QUARTER ['JOINED'] +listings_latest ('listing',) created_at DAY YEAR ['JOINED'] +listings_latest ('listing',) ds DAY ['JOINED'] +listings_latest ('listing',) ds DAY DAY ['JOINED'] +listings_latest ('listing',) ds DAY DOW ['JOINED'] +listings_latest ('listing',) ds DAY DOY ['JOINED'] +listings_latest ('listing',) ds DAY MONTH ['JOINED'] +listings_latest ('listing',) ds DAY QUARTER ['JOINED'] +listings_latest ('listing',) ds DAY YEAR ['JOINED'] +listings_latest ('listing',) is_lux_latest ['JOINED'] +listings_latest ('listing',) user ['ENTITY', 'JOINED'] +lux_listing_mapping ('listing',) lux_listing ['ENTITY', 'JOINED'] +users_ds_source ('listing', 'user') created_at DAY ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') created_at DAY DAY ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') created_at DAY DOW ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') created_at DAY DOY ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') created_at DAY MONTH ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') created_at DAY QUARTER ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') created_at DAY YEAR ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds DAY ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds DAY DAY ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds DAY DOW ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds DAY DOY ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds DAY MONTH ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds DAY QUARTER ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds DAY YEAR ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned DAY ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned DAY DAY ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned DAY DOW ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned DAY DOY ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned DAY MONTH ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned DAY QUARTER ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds_partitioned DAY YEAR ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') home_state ['JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest DAY ['JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest DAY DAY ['JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest DAY DOW ['JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest DAY DOY ['JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest DAY MONTH ['JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest DAY QUARTER ['JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest DAY YEAR ['JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') home_state_latest ['JOINED', 'MULTI_HOP'] +views_source () listing ['ENTITY', 'LOCAL'] +views_source () metric_time DAY ['METRIC_TIME'] diff --git a/metricflow/test/snapshots/test_semantic_model_container.py/tuple/test_elements_for_metric__result0.txt b/metricflow/test/snapshots/test_semantic_model_container.py/tuple/test_elements_for_metric__result0.txt index 1a6e510df2..f429e70050 100644 --- a/metricflow/test/snapshots/test_semantic_model_container.py/tuple/test_elements_for_metric__result0.txt +++ b/metricflow/test/snapshots/test_semantic_model_container.py/tuple/test_elements_for_metric__result0.txt @@ -2,28 +2,100 @@ 'listing__capacity_latest', 'listing__country_latest', 'listing__created_at__day', + 'listing__created_at__extract_day', + 'listing__created_at__extract_dow', + 'listing__created_at__extract_doy', + 'listing__created_at__extract_month', + 'listing__created_at__extract_quarter', + 'listing__created_at__extract_year', 'listing__ds__day', + 'listing__ds__extract_day', + 'listing__ds__extract_dow', + 'listing__ds__extract_doy', + 'listing__ds__extract_month', + 'listing__ds__extract_quarter', + 'listing__ds__extract_year', 'listing__is_lux_latest', 'listing__lux_listing', 'listing__user', 'listing__user__company', 'listing__user__company_name', 'listing__user__created_at__day', + 'listing__user__created_at__extract_day', + 'listing__user__created_at__extract_dow', + 'listing__user__created_at__extract_doy', + 'listing__user__created_at__extract_month', + 'listing__user__created_at__extract_quarter', + 'listing__user__created_at__extract_year', 'listing__user__ds__day', + 'listing__user__ds__extract_day', + 'listing__user__ds__extract_dow', + 'listing__user__ds__extract_doy', + 'listing__user__ds__extract_month', + 'listing__user__ds__extract_quarter', + 'listing__user__ds__extract_year', 'listing__user__ds_latest__day', + 'listing__user__ds_latest__extract_day', + 'listing__user__ds_latest__extract_dow', + 'listing__user__ds_latest__extract_doy', + 'listing__user__ds_latest__extract_month', + 'listing__user__ds_latest__extract_quarter', + 'listing__user__ds_latest__extract_year', 'listing__user__ds_partitioned__day', + 'listing__user__ds_partitioned__extract_day', + 'listing__user__ds_partitioned__extract_dow', + 'listing__user__ds_partitioned__extract_doy', + 'listing__user__ds_partitioned__extract_month', + 'listing__user__ds_partitioned__extract_quarter', + 'listing__user__ds_partitioned__extract_year', 'listing__user__home_state', 'listing__user__home_state_latest', 'user', 'user__company', 'user__company_name', 'user__created_at__day', + 'user__created_at__extract_day', + 'user__created_at__extract_dow', + 'user__created_at__extract_doy', + 'user__created_at__extract_month', + 'user__created_at__extract_quarter', + 'user__created_at__extract_year', 'user__ds__day', + 'user__ds__extract_day', + 'user__ds__extract_dow', + 'user__ds__extract_doy', + 'user__ds__extract_month', + 'user__ds__extract_quarter', + 'user__ds__extract_year', 'user__ds_latest__day', + 'user__ds_latest__extract_day', + 'user__ds_latest__extract_dow', + 'user__ds_latest__extract_doy', + 'user__ds_latest__extract_month', + 'user__ds_latest__extract_quarter', + 'user__ds_latest__extract_year', 'user__ds_partitioned__day', + 'user__ds_partitioned__extract_day', + 'user__ds_partitioned__extract_dow', + 'user__ds_partitioned__extract_doy', + 'user__ds_partitioned__extract_month', + 'user__ds_partitioned__extract_quarter', + 'user__ds_partitioned__extract_year', 'user__home_state', 'user__home_state_latest', 'view__ds__day', + 'view__ds__extract_day', + 'view__ds__extract_dow', + 'view__ds__extract_doy', + 'view__ds__extract_month', + 'view__ds__extract_quarter', + 'view__ds__extract_year', 'view__ds_partitioned__day', + 'view__ds_partitioned__extract_day', + 'view__ds_partitioned__extract_dow', + 'view__ds_partitioned__extract_doy', + 'view__ds_partitioned__extract_month', + 'view__ds_partitioned__extract_quarter', + 'view__ds_partitioned__extract_year', 'view__listing', 'view__user')