From 42c6514920fc238b56b3307a5b114af99d03d4a4 Mon Sep 17 00:00:00 2001 From: Courtney Holcomb Date: Thu, 19 Sep 2024 21:52:13 -0700 Subject: [PATCH] Add custom granularities to LinkableSpecResolver This includes a bit of a refactor to simplify the time dimension generation code. --- .../model/semantics/linkable_element_set.py | 2 - .../model/semantics/linkable_spec_resolver.py | 105 +++++++++--------- ...linkable_element_set_as_spec_set__set0.txt | 10 ++ .../str/test_all_properties__result0.txt | 20 ++++ ...le_element_set_from_join_path__result0.txt | 2 + ..._set_from_join_path_multi_hop__result0.txt | 2 + .../test_cyclic_join_manifest__result0.txt | 2 + ...linkable_elements_for_measure__result0.txt | 10 ++ ...s_for_measure_multi_hop_model__result0.txt | 1 + 9 files changed, 98 insertions(+), 56 deletions(-) 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 ca95288d04..1c1a8aa6f5 100644 --- a/metricflow-semantics/metricflow_semantics/model/semantics/linkable_element_set.py +++ b/metricflow-semantics/metricflow_semantics/model/semantics/linkable_element_set.py @@ -355,8 +355,6 @@ def _path_key_to_spec(path_key: ElementPathKey) -> LinkableInstanceSpec: ) elif path_key.element_type is LinkableElementType.TIME_DIMENSION: assert path_key.time_granularity is not None - # TODO: [custom granularity] Remove block against custom granularity values - assert not path_key.time_granularity.is_custom_granularity, "Custom granularities are not yet supported!" return TimeDimensionSpec( element_name=path_key.element_name, entity_links=path_key.entity_links, 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 f0251edd54..f5626d58f9 100644 --- a/metricflow-semantics/metricflow_semantics/model/semantics/linkable_spec_resolver.py +++ b/metricflow-semantics/metricflow_semantics/model/semantics/linkable_spec_resolver.py @@ -50,58 +50,6 @@ logger = logging.getLogger(__name__) -def _generate_linkable_time_dimensions( - semantic_model_origin: SemanticModelReference, - dimension: Dimension, - entity_links: Tuple[EntityReference, ...], - join_path: SemanticModelJoinPath, - with_properties: FrozenSet[LinkableElementProperty], -) -> Sequence[LinkableDimension]: - """Generates different versions of the given dimension, but at other valid time granularities.""" - linkable_dimensions = [] - - defined_time_granularity = ( - dimension.type_params.time_granularity if dimension.type_params else DEFAULT_TIME_GRANULARITY - ) - for time_granularity in TimeGranularity: - if time_granularity < defined_time_granularity: - continue - properties = set(with_properties) - if time_granularity != defined_time_granularity: - properties.add(LinkableElementProperty.DERIVED_TIME_GRANULARITY) - - linkable_dimensions.append( - LinkableDimension.create( - defined_in_semantic_model=semantic_model_origin, - element_name=dimension.reference.element_name, - dimension_type=DimensionType.TIME, - entity_links=entity_links, - join_path=join_path, - time_granularity=ExpandedTimeGranularity.from_time_granularity(time_granularity), - date_part=None, - properties=tuple(sorted(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.create( - defined_in_semantic_model=semantic_model_origin, - element_name=dimension.reference.element_name, - dimension_type=DimensionType.TIME, - entity_links=entity_links, - join_path=join_path, - time_granularity=ExpandedTimeGranularity.from_time_granularity(time_granularity), - date_part=date_part, - properties=frozenset(properties), - ) - ) - - return linkable_dimensions - - class ValidLinkableSpecResolver: """Figures out what linkable specs are valid for a given metric. @@ -127,6 +75,7 @@ def __init__( self._semantic_models = sorted(self._semantic_manifest.semantic_models, key=lambda x: x.name) self._join_evaluator = SemanticModelJoinEvaluator(semantic_model_lookup) self._time_spine_sources = TimeSpineSource.build_standard_time_spine_sources(self._semantic_manifest) + self._custom_granularities = TimeSpineSource.build_custom_granularities(list(self._time_spine_sources.values())) assert max_entity_links >= 0 self._max_entity_links = max_entity_links @@ -239,6 +188,54 @@ def __init__( logger.info(f"Building valid group-by-item indexes took: {time.time() - start_time:.2f}s") + def _generate_linkable_time_dimensions( + self, + semantic_model_origin: SemanticModelReference, + dimension: Dimension, + entity_links: Tuple[EntityReference, ...], + join_path: SemanticModelJoinPath, + with_properties: FrozenSet[LinkableElementProperty], + ) -> Sequence[LinkableDimension]: + """Generates different versions of the given time dimension with all compatible time granularities & date parts.""" + defined_time_granularity = ( + dimension.type_params.time_granularity if dimension.type_params else DEFAULT_TIME_GRANULARITY + ) + + def create( + time_granularity: ExpandedTimeGranularity, date_part: Optional[DatePart] = None + ) -> LinkableDimension: + properties = set(with_properties) + if time_granularity.is_custom_granularity or time_granularity.base_granularity != defined_time_granularity: + properties.add(LinkableElementProperty.DERIVED_TIME_GRANULARITY) + return LinkableDimension.create( + defined_in_semantic_model=semantic_model_origin, + element_name=dimension.reference.element_name, + dimension_type=DimensionType.TIME, + entity_links=entity_links, + join_path=join_path, + time_granularity=time_granularity, + date_part=date_part, + properties=tuple(sorted(properties)), + ) + + # Build linkable dimensions for all compatible standard granularities and date parts. + linkable_dimensions = [] + for time_granularity in TimeGranularity: + if time_granularity.to_int() < defined_time_granularity.to_int(): + continue + expanded_granularity = ExpandedTimeGranularity.from_time_granularity(time_granularity) + linkable_dimensions.append(create(expanded_granularity)) + for date_part in DatePart: + if time_granularity.to_int() <= date_part.to_int(): + linkable_dimensions.append(create(time_granularity=expanded_granularity, date_part=date_part)) + + # Build linkable dimensions for all compatible custom granularities. + for custom_grain in self._custom_granularities.values(): + if custom_grain.base_granularity.to_int() >= defined_time_granularity.to_int(): + linkable_dimensions.append(create(custom_grain)) + + return linkable_dimensions + def _metric_requires_metric_time(self, metric: Metric) -> bool: """Checks if the metric can only be queried with metric_time. Also checks input metrics. @@ -378,7 +375,7 @@ def _get_elements_in_semantic_model(self, semantic_model: SemanticModel) -> Link ) elif dimension_type is DimensionType.TIME: linkable_dimensions.extend( - _generate_linkable_time_dimensions( + self._generate_linkable_time_dimensions( semantic_model_origin=semantic_model.reference, dimension=dimension, entity_links=(entity_link,), @@ -741,7 +738,7 @@ def create_linkable_element_set_from_join_path( ) elif dimension_type == DimensionType.TIME: linkable_dimensions.extend( - _generate_linkable_time_dimensions( + self._generate_linkable_time_dimensions( semantic_model_origin=semantic_model.reference, dimension=dimension, entity_links=join_path.entity_links, diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/list/test_linkable_element_set_as_spec_set__set0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/list/test_linkable_element_set_as_spec_set__set0.txt index e8bb14b34b..4128ba415a 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/list/test_linkable_element_set_as_spec_set__set0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/list/test_linkable_element_set_as_spec_set__set0.txt @@ -80,6 +80,7 @@ 'listing__created_at__extract_year', 'listing__created_at__extract_year', 'listing__created_at__extract_year', + 'listing__created_at__martian_day', 'listing__created_at__month', 'listing__created_at__quarter', 'listing__created_at__week', @@ -104,6 +105,7 @@ 'listing__ds__extract_year', 'listing__ds__extract_year', 'listing__ds__extract_year', + 'listing__ds__martian_day', 'listing__ds__month', 'listing__ds__quarter', 'listing__ds__week', @@ -183,6 +185,7 @@ 'user__archived_at__extract_year', 'user__archived_at__extract_year', 'user__archived_at__hour', + 'user__archived_at__martian_day', 'user__archived_at__month', 'user__archived_at__quarter', 'user__archived_at__week', @@ -223,6 +226,7 @@ 'user__bio_added_ts__extract_year', 'user__bio_added_ts__extract_year', 'user__bio_added_ts__hour', + 'user__bio_added_ts__martian_day', 'user__bio_added_ts__minute', 'user__bio_added_ts__month', 'user__bio_added_ts__quarter', @@ -247,6 +251,7 @@ 'user__created_at__extract_year', 'user__created_at__extract_year', 'user__created_at__extract_year', + 'user__created_at__martian_day', 'user__created_at__month', 'user__created_at__quarter', 'user__created_at__week', @@ -268,6 +273,7 @@ 'user__ds__extract_year', 'user__ds__extract_year', 'user__ds__extract_year', + 'user__ds__martian_day', 'user__ds__month', 'user__ds__quarter', 'user__ds__week', @@ -288,6 +294,7 @@ 'user__ds_latest__extract_year', 'user__ds_latest__extract_year', 'user__ds_latest__extract_year', + 'user__ds_latest__martian_day', 'user__ds_latest__month', 'user__ds_latest__quarter', 'user__ds_latest__week', @@ -308,6 +315,7 @@ 'user__ds_partitioned__extract_year', 'user__ds_partitioned__extract_year', 'user__ds_partitioned__extract_year', + 'user__ds_partitioned__martian_day', 'user__ds_partitioned__month', 'user__ds_partitioned__quarter', 'user__ds_partitioned__week', @@ -345,6 +353,7 @@ 'user__last_login_ts__extract_year', 'user__last_login_ts__extract_year', 'user__last_login_ts__hour', + 'user__last_login_ts__martian_day', 'user__last_login_ts__minute', 'user__last_login_ts__month', 'user__last_login_ts__quarter', @@ -391,6 +400,7 @@ 'user__last_profile_edit_ts__extract_year', 'user__last_profile_edit_ts__extract_year', 'user__last_profile_edit_ts__hour', + 'user__last_profile_edit_ts__martian_day', 'user__last_profile_edit_ts__millisecond', 'user__last_profile_edit_ts__minute', 'user__last_profile_edit_ts__month', diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_all_properties__result0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_all_properties__result0.txt index c5ca278926..df27ae6e26 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_all_properties__result0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_all_properties__result0.txt @@ -30,6 +30,7 @@ Model Join-Path Entity Links ('bookings_source', 'listings_latest') ('listing',) created_at day MONTH ['JOINED'] ('bookings_source', 'listings_latest') ('listing',) created_at day QUARTER ['JOINED'] ('bookings_source', 'listings_latest') ('listing',) created_at day YEAR ['JOINED'] +('bookings_source', 'listings_latest') ('listing',) created_at martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('bookings_source', 'listings_latest') ('listing',) created_at month ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('bookings_source', 'listings_latest') ('listing',) created_at month MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('bookings_source', 'listings_latest') ('listing',) created_at month QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] @@ -50,6 +51,7 @@ Model Join-Path Entity Links ('bookings_source', 'listings_latest') ('listing',) ds day MONTH ['JOINED'] ('bookings_source', 'listings_latest') ('listing',) ds day QUARTER ['JOINED'] ('bookings_source', 'listings_latest') ('listing',) ds day YEAR ['JOINED'] +('bookings_source', 'listings_latest') ('listing',) ds martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('bookings_source', 'listings_latest') ('listing',) ds month ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('bookings_source', 'listings_latest') ('listing',) ds month MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('bookings_source', 'listings_latest') ('listing',) ds month QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] @@ -81,6 +83,7 @@ Model Join-Path Entity Links ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at hour MONTH ['JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at hour QUARTER ['JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at hour YEAR ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at month ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at month MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at month QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] @@ -108,6 +111,7 @@ Model Join-Path Entity Links ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts hour MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts hour QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts hour YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts minute ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts minute DAY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts minute DOW ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] @@ -142,6 +146,7 @@ Model Join-Path Entity Links ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at day MONTH ['JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at day QUARTER ['JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at day YEAR ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at month ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at month MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at month QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] @@ -162,6 +167,7 @@ Model Join-Path Entity Links ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds day MONTH ['JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds day QUARTER ['JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds day YEAR ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds month ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds month MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds month QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] @@ -182,6 +188,7 @@ Model Join-Path Entity Links ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned day MONTH ['JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned day QUARTER ['JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned day YEAR ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned month ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned month MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned month QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] @@ -210,6 +217,7 @@ Model Join-Path Entity Links ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts hour MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts hour QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts hour YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts minute ['JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts minute DAY ['JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts minute DOW ['JOINED', 'MULTI_HOP'] @@ -244,6 +252,7 @@ Model Join-Path Entity Links ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts hour MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts hour QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts hour YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts millisecond ['JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts millisecond DAY ['JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts millisecond DOW ['JOINED', 'MULTI_HOP'] @@ -285,6 +294,7 @@ Model Join-Path Entity Links ('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest day MONTH ['JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest day QUARTER ['JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest day YEAR ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest month ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest month MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest month QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] @@ -330,6 +340,7 @@ Model Join-Path Entity Links ('views_source', 'listings_latest') ('listing',) created_at day MONTH ['JOINED'] ('views_source', 'listings_latest') ('listing',) created_at day QUARTER ['JOINED'] ('views_source', 'listings_latest') ('listing',) created_at day YEAR ['JOINED'] +('views_source', 'listings_latest') ('listing',) created_at martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('views_source', 'listings_latest') ('listing',) created_at month ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('views_source', 'listings_latest') ('listing',) created_at month MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('views_source', 'listings_latest') ('listing',) created_at month QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] @@ -350,6 +361,7 @@ Model Join-Path Entity Links ('views_source', 'listings_latest') ('listing',) ds day MONTH ['JOINED'] ('views_source', 'listings_latest') ('listing',) ds day QUARTER ['JOINED'] ('views_source', 'listings_latest') ('listing',) ds day YEAR ['JOINED'] +('views_source', 'listings_latest') ('listing',) ds martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('views_source', 'listings_latest') ('listing',) ds month ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('views_source', 'listings_latest') ('listing',) ds month MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('views_source', 'listings_latest') ('listing',) ds month QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] @@ -381,6 +393,7 @@ Model Join-Path Entity Links ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at hour MONTH ['JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at hour QUARTER ['JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at hour YEAR ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at month ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at month MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at month QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] @@ -408,6 +421,7 @@ Model Join-Path Entity Links ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts hour MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts hour QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts hour YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts minute ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts minute DAY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts minute DOW ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] @@ -442,6 +456,7 @@ Model Join-Path Entity Links ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at day MONTH ['JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at day QUARTER ['JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at day YEAR ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at month ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at month MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at month QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] @@ -462,6 +477,7 @@ Model Join-Path Entity Links ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds day MONTH ['JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds day QUARTER ['JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds day YEAR ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds month ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds month MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds month QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] @@ -482,6 +498,7 @@ Model Join-Path Entity Links ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned day MONTH ['JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned day QUARTER ['JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned day YEAR ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned month ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned month MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned month QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] @@ -510,6 +527,7 @@ Model Join-Path Entity Links ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts hour MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts hour QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts hour YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts minute ['JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts minute DAY ['JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts minute DOW ['JOINED', 'MULTI_HOP'] @@ -544,6 +562,7 @@ Model Join-Path Entity Links ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts hour MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts hour QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts hour YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts millisecond ['JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts millisecond DAY ['JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts millisecond DOW ['JOINED', 'MULTI_HOP'] @@ -585,6 +604,7 @@ Model Join-Path Entity Links ('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest day MONTH ['JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest day QUARTER ['JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest day YEAR ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest month ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest month MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest month QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_create_linkable_element_set_from_join_path__result0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_create_linkable_element_set_from_join_path__result0.txt index d346df372d..3fde2e57be 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_create_linkable_element_set_from_join_path__result0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_create_linkable_element_set_from_join_path__result0.txt @@ -9,6 +9,7 @@ Model Join-Path Entity Links Name Time Gr ('bookings_source', 'listings_latest') ('listing',) created_at day MONTH ['JOINED'] ('bookings_source', 'listings_latest') ('listing',) created_at day QUARTER ['JOINED'] ('bookings_source', 'listings_latest') ('listing',) created_at day YEAR ['JOINED'] +('bookings_source', 'listings_latest') ('listing',) created_at martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('bookings_source', 'listings_latest') ('listing',) created_at month ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('bookings_source', 'listings_latest') ('listing',) created_at month MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('bookings_source', 'listings_latest') ('listing',) created_at month QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] @@ -29,6 +30,7 @@ Model Join-Path Entity Links Name Time Gr ('bookings_source', 'listings_latest') ('listing',) ds day MONTH ['JOINED'] ('bookings_source', 'listings_latest') ('listing',) ds day QUARTER ['JOINED'] ('bookings_source', 'listings_latest') ('listing',) ds day YEAR ['JOINED'] +('bookings_source', 'listings_latest') ('listing',) ds martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('bookings_source', 'listings_latest') ('listing',) ds month ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('bookings_source', 'listings_latest') ('listing',) ds month MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('bookings_source', 'listings_latest') ('listing',) ds month QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_create_linkable_element_set_from_join_path_multi_hop__result0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_create_linkable_element_set_from_join_path_multi_hop__result0.txt index 4d6a084908..8d632e61e1 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_create_linkable_element_set_from_join_path_multi_hop__result0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_create_linkable_element_set_from_join_path_multi_hop__result0.txt @@ -9,6 +9,7 @@ Model Join-Path Entity Links Name ('views_source', 'bookings', 'listings_latest') ('guest', 'listing') created_at day MONTH ['JOINED', 'MULTI_HOP'] ('views_source', 'bookings', 'listings_latest') ('guest', 'listing') created_at day QUARTER ['JOINED', 'MULTI_HOP'] ('views_source', 'bookings', 'listings_latest') ('guest', 'listing') created_at day YEAR ['JOINED', 'MULTI_HOP'] +('views_source', 'bookings', 'listings_latest') ('guest', 'listing') created_at martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'bookings', 'listings_latest') ('guest', 'listing') created_at month ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'bookings', 'listings_latest') ('guest', 'listing') created_at month MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'bookings', 'listings_latest') ('guest', 'listing') created_at month QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] @@ -29,6 +30,7 @@ Model Join-Path Entity Links Name ('views_source', 'bookings', 'listings_latest') ('guest', 'listing') ds day MONTH ['JOINED', 'MULTI_HOP'] ('views_source', 'bookings', 'listings_latest') ('guest', 'listing') ds day QUARTER ['JOINED', 'MULTI_HOP'] ('views_source', 'bookings', 'listings_latest') ('guest', 'listing') ds day YEAR ['JOINED', 'MULTI_HOP'] +('views_source', 'bookings', 'listings_latest') ('guest', 'listing') ds martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'bookings', 'listings_latest') ('guest', 'listing') ds month ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'bookings', 'listings_latest') ('guest', 'listing') ds month MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] ('views_source', 'bookings', 'listings_latest') ('guest', 'listing') ds month QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_cyclic_join_manifest__result0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_cyclic_join_manifest__result0.txt index 1b796ee3b8..946f6b713d 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_cyclic_join_manifest__result0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_cyclic_join_manifest__result0.txt @@ -30,6 +30,7 @@ Model Join-Path Entity Links Name ('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 martian_day ['DERIVED_TIME_GRANULARITY', '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'] @@ -51,6 +52,7 @@ Model Join-Path Entity Links Name ('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 martian_day ['DERIVED_TIME_GRANULARITY', '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'] diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_elements_for_measure__result0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_elements_for_measure__result0.txt index 56a269375b..82df8565d6 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_elements_for_measure__result0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_elements_for_measure__result0.txt @@ -217,6 +217,7 @@ Model Join-Path Entity Links ('listings_latest',) ('listing',) created_at day MONTH ['LOCAL'] ('listings_latest',) ('listing',) created_at day QUARTER ['LOCAL'] ('listings_latest',) ('listing',) created_at day YEAR ['LOCAL'] +('listings_latest',) ('listing',) created_at martian_day ['DERIVED_TIME_GRANULARITY', 'LOCAL'] ('listings_latest',) ('listing',) created_at month ['DERIVED_TIME_GRANULARITY', 'LOCAL'] ('listings_latest',) ('listing',) created_at month MONTH ['DERIVED_TIME_GRANULARITY', 'LOCAL'] ('listings_latest',) ('listing',) created_at month QUARTER ['DERIVED_TIME_GRANULARITY', 'LOCAL'] @@ -237,6 +238,7 @@ Model Join-Path Entity Links ('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 martian_day ['DERIVED_TIME_GRANULARITY', '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'] @@ -269,6 +271,7 @@ Model Join-Path Entity Links ('listings_latest', 'users_ds_source') ('user',) archived_at hour MONTH ['JOINED'] ('listings_latest', 'users_ds_source') ('user',) archived_at hour QUARTER ['JOINED'] ('listings_latest', 'users_ds_source') ('user',) archived_at hour YEAR ['JOINED'] +('listings_latest', 'users_ds_source') ('user',) archived_at martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('listings_latest', 'users_ds_source') ('user',) archived_at month ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('listings_latest', 'users_ds_source') ('user',) archived_at month MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('listings_latest', 'users_ds_source') ('user',) archived_at month QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] @@ -296,6 +299,7 @@ Model Join-Path Entity Links ('listings_latest', 'users_ds_source') ('user',) bio_added_ts hour MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('listings_latest', 'users_ds_source') ('user',) bio_added_ts hour QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('listings_latest', 'users_ds_source') ('user',) bio_added_ts hour YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('listings_latest', 'users_ds_source') ('user',) bio_added_ts minute ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('listings_latest', 'users_ds_source') ('user',) bio_added_ts minute DAY ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('listings_latest', 'users_ds_source') ('user',) bio_added_ts minute DOW ['DERIVED_TIME_GRANULARITY', 'JOINED'] @@ -330,6 +334,7 @@ Model Join-Path Entity Links ('listings_latest', 'users_ds_source') ('user',) created_at day MONTH ['JOINED'] ('listings_latest', 'users_ds_source') ('user',) created_at day QUARTER ['JOINED'] ('listings_latest', 'users_ds_source') ('user',) created_at day YEAR ['JOINED'] +('listings_latest', 'users_ds_source') ('user',) created_at martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('listings_latest', 'users_ds_source') ('user',) created_at month ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('listings_latest', 'users_ds_source') ('user',) created_at month MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('listings_latest', 'users_ds_source') ('user',) created_at month QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] @@ -350,6 +355,7 @@ Model Join-Path Entity Links ('listings_latest', 'users_ds_source') ('user',) ds day MONTH ['JOINED'] ('listings_latest', 'users_ds_source') ('user',) ds day QUARTER ['JOINED'] ('listings_latest', 'users_ds_source') ('user',) ds day YEAR ['JOINED'] +('listings_latest', 'users_ds_source') ('user',) ds martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('listings_latest', 'users_ds_source') ('user',) ds month ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('listings_latest', 'users_ds_source') ('user',) ds month MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('listings_latest', 'users_ds_source') ('user',) ds month QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] @@ -370,6 +376,7 @@ Model Join-Path Entity Links ('listings_latest', 'users_ds_source') ('user',) ds_partitioned day MONTH ['JOINED'] ('listings_latest', 'users_ds_source') ('user',) ds_partitioned day QUARTER ['JOINED'] ('listings_latest', 'users_ds_source') ('user',) ds_partitioned day YEAR ['JOINED'] +('listings_latest', 'users_ds_source') ('user',) ds_partitioned martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('listings_latest', 'users_ds_source') ('user',) ds_partitioned month ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('listings_latest', 'users_ds_source') ('user',) ds_partitioned month MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('listings_latest', 'users_ds_source') ('user',) ds_partitioned month QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] @@ -398,6 +405,7 @@ Model Join-Path Entity Links ('listings_latest', 'users_ds_source') ('user',) last_login_ts hour MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('listings_latest', 'users_ds_source') ('user',) last_login_ts hour QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('listings_latest', 'users_ds_source') ('user',) last_login_ts hour YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_login_ts martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('listings_latest', 'users_ds_source') ('user',) last_login_ts minute ['JOINED'] ('listings_latest', 'users_ds_source') ('user',) last_login_ts minute DAY ['JOINED'] ('listings_latest', 'users_ds_source') ('user',) last_login_ts minute DOW ['JOINED'] @@ -432,6 +440,7 @@ Model Join-Path Entity Links ('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts hour MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts hour QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts hour YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts millisecond ['JOINED'] ('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts millisecond DAY ['JOINED'] ('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts millisecond DOW ['JOINED'] @@ -473,6 +482,7 @@ Model Join-Path Entity Links ('listings_latest', 'users_latest') ('user',) ds_latest day MONTH ['JOINED'] ('listings_latest', 'users_latest') ('user',) ds_latest day QUARTER ['JOINED'] ('listings_latest', 'users_latest') ('user',) ds_latest day YEAR ['JOINED'] +('listings_latest', 'users_latest') ('user',) ds_latest martian_day ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('listings_latest', 'users_latest') ('user',) ds_latest month ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('listings_latest', 'users_latest') ('user',) ds_latest month MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('listings_latest', 'users_latest') ('user',) ds_latest month QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_elements_for_measure_multi_hop_model__result0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_elements_for_measure_multi_hop_model__result0.txt index dffa2a739e..21c3e92b02 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_elements_for_measure_multi_hop_model__result0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_elements_for_measure_multi_hop_model__result0.txt @@ -30,6 +30,7 @@ Model Join-Path Entity Links ('account_month_txns',) ('account_id',) ds day MONTH ['LOCAL'] ('account_month_txns',) ('account_id',) ds day QUARTER ['LOCAL'] ('account_month_txns',) ('account_id',) ds day YEAR ['LOCAL'] +('account_month_txns',) ('account_id',) ds martian_day ['DERIVED_TIME_GRANULARITY', 'LOCAL'] ('account_month_txns',) ('account_id',) ds month ['DERIVED_TIME_GRANULARITY', 'LOCAL'] ('account_month_txns',) ('account_id',) ds month MONTH ['DERIVED_TIME_GRANULARITY', 'LOCAL'] ('account_month_txns',) ('account_id',) ds month QUARTER ['DERIVED_TIME_GRANULARITY', 'LOCAL']