From b72ac67b5b61c75d31f1d1c6534e2b02679b687f Mon Sep 17 00:00:00 2001 From: Courtney Holcomb Date: Tue, 30 Jul 2024 14:06:35 -0700 Subject: [PATCH] Add test time spines for sub-daily granularity (#1358) Add test time spines for sub-daily granularity I added as much data as seemed reasonable to include manually, and figure we can focus tests to those time ranges. And we always have the flexibility to add more data later. I included one time spine per sub-daily grain so that we could be sure to test the syntax for each grain against each engine that supports it. Snapshot changes are separated into isolated commits for easier review. They only include the following changes: - Node ID changes due to new time spine source nodes - Time spine table alias changes due to new time spine source nodes --- .../unreleased/Features-20240727-081106.yaml | 6 + .../model/semantics/linkable_spec_resolver.py | 24 +- .../metric_time_default_granularity.py | 14 +- .../specs/time_dimension_spec.py | 7 +- .../shared/project_configuration.yaml | 37 + .../simple_manifest/metrics.yaml | 19 - .../semantic_models/user_sm_source.yaml | 17 + ...lable_group_by_items__no_metrics__set0.txt | 42 + ...linkable_element_set_as_spec_set__set0.txt | 156 ++- .../str/test_all_properties__result0.txt | 904 ++++++++++++------ ...me_in_query_filter__no_metrics__result.txt | 2 +- .../dict/test_get_names__result0.txt | 4 + ...linkable_elements_for_measure__result0.txt | 156 ++- ...linkable_elements_for_metrics__result0.txt | 262 +++-- ...imensions_in_different_models__result0.txt | 272 +++--- ...elements_for_no_metrics_query__result0.txt | 47 +- ...ilters_in_multi_metric_query__result_0.txt | 2 +- ...ons_for_defined_where_filter__result_0.txt | 2 +- metricflow/dataflow/builder/node_evaluator.py | 11 +- metricflow/dataset/convert_semantic_model.py | 4 +- .../dataflow/builder/test_node_data_set.py | 5 +- .../fixtures/dataflow_fixtures.py | 30 +- .../simple_model/dim_users.yaml | 33 +- .../time_spine_table/mf_time_spine_hour.yaml | 42 + .../mf_time_spine_microsecond.yaml | 37 + .../mf_time_spine_millisecond.yaml | 36 + .../mf_time_spine_minute.yaml | 37 + .../mf_time_spine_nanosecond.yaml | 36 + .../mf_time_spine_second.yaml | 36 + tests_metricflow/integration/conftest.py | 4 +- .../test_cases/itest_dimensions.yaml | 24 + .../integration/test_cases/itest_metrics.yaml | 12 - .../integration/test_configured_cases.py | 3 +- .../query_rendering/compare_rendered_query.py | 2 +- .../test_granularity_date_part_rendering.py | 52 + .../test_metric_filter_rendering.py | 1 - .../query_rendering/test_query_rendering.py | 6 - ...nversion_count_with_no_group_by__plan0.xml | 116 +-- ...timespine_and_fill_nulls_with_0__plan0.xml | 116 +-- .../test_conversion_rate__plan0.xml | 116 +-- ...n_rate_with_constant_properties__plan0.xml | 116 +-- ...onversion_rate_with_no_group_by__plan0.xml | 116 +-- ...est_conversion_rate_with_window__plan0.xml | 116 +-- .../DataflowPlan/test_cyclic_join__dfp_0.xml | 6 +- .../test_common_semantic_model__dfp_0.xml | 16 +- ...indow_or_grain_with_metric_time__dfp_0.xml | 4 +- ...ow_or_grain_without_metric_time__dfp_0.xml | 4 +- ...e_metric_with_non_default_grain__dfp_0.xml | 4 +- ...t_cumulative_metric_with_window__dfp_0.xml | 4 +- ...e_metric_with_non_default_grain__dfp_0.xml | 4 +- ..._derived_metric_offset_to_grain__dfp_0.xml | 8 +- ...st_derived_metric_offset_window__dfp_0.xml | 4 +- ..._metric_offset_with_granularity__dfp_0.xml | 4 +- ...erived_offset_cumulative_metric__dfp_0.xml | 4 +- ...dimensions_with_time_constraint__dfp_0.xml | 6 +- .../test_distinct_values_plan__dfp_0.xml | 2 +- ..._distinct_values_plan_with_join__dfp_0.xml | 4 +- ..._if_no_time_dimension_requested__dfp_0.xml | 4 +- ...in_to_time_spine_derived_metric__dfp_0.xml | 8 +- ...join_to_time_spine_with_filters__dfp_0.xml | 4 +- ..._to_time_spine_with_metric_time__dfp_0.xml | 4 +- ...time_spine_with_non_metric_time__dfp_0.xml | 4 +- .../DataflowPlan/test_joined_plan__dfp_0.xml | 8 +- .../test_limit_rows_plan__dfp_0.xml | 4 +- .../test_measure_constraint_plan__dfp_0.xml | 20 +- ...traint_with_reused_measure_plan__dfp_0.xml | 8 +- ...t_metric_in_metric_where_filter__dfp_0.xml | 8 +- ...st_metric_in_query_where_filter__dfp_0.xml | 8 +- .../test_metric_time_only__dfp_0.xml | 4 +- .../test_metric_time_quarter__dfp_0.xml | 4 +- ...tric_time_with_other_dimensions__dfp_0.xml | 8 +- .../test_min_max_metric_time__dfp_0.xml | 4 +- .../test_min_max_metric_time_week__dfp_0.xml | 4 +- .../test_min_max_only_categorical__dfp_0.xml | 2 +- .../test_min_max_only_time__dfp_0.xml | 2 +- .../test_min_max_only_time_year__dfp_0.xml | 2 +- ...mantic_model_ratio_metrics_plan__dfp_0.xml | 16 +- .../test_multihop_join_plan__dfp_0.xml | 12 +- .../test_multiple_metrics_plan__dfp_0.xml | 8 +- ...erived_metric_with_outer_offset__dfp_0.xml | 4 +- ...ry_have_different_granularities__dfp_0.xml | 4 +- ...ry_have_different_granularities__dfp_0.xml | 8 +- .../test_order_by_plan__dfp_0.xml | 4 +- .../test_primary_entity_dimension__dfp_0.xml | 4 +- .../DataflowPlan/test_simple_plan__dfp_0.xml | 4 +- ...mantic_model_ratio_metrics_plan__dfp_0.xml | 16 +- .../test_where_constrained_plan__dfp_0.xml | 8 +- ...constrained_plan_time_dimension__dfp_0.xml | 4 +- ...ained_with_common_linkable_plan__dfp_0.xml | 8 +- ...o_from_multiple_semantic_models__plan0.xml | 96 +- ...on_with_joined_where_constraint__plan0.xml | 50 +- .../test_dimensions_requiring_join__plan0.xml | 50 +- ...values_with_a_join_and_a_filter__plan0.xml | 50 +- .../test_dimensions_requiring_join__plan0.xml | 50 +- .../test_sub_daily_dimension__plan0.sql | 187 ++++ ...t_sub_daily_dimension__plan0_optimized.sql | 7 + .../test_sub_daily_metric_time__plan0.sql | 59 ++ ...sub_daily_metric_time__plan0_optimized.sql | 8 + .../test_sub_daily_dimension__plan0.sql | 187 ++++ ...t_sub_daily_dimension__plan0_optimized.sql | 7 + .../test_sub_daily_metric_time__plan0.sql | 59 ++ ...sub_daily_metric_time__plan0_optimized.sql | 8 + .../test_sub_daily_dimension__plan0.sql | 187 ++++ ...t_sub_daily_dimension__plan0_optimized.sql | 7 + .../test_sub_daily_metric_time__plan0.sql | 59 ++ ...sub_daily_metric_time__plan0_optimized.sql | 8 + .../test_sub_daily_dimension__plan0.sql | 187 ++++ ...t_sub_daily_dimension__plan0_optimized.sql | 7 + .../test_sub_daily_metric_time__plan0.sql | 59 ++ ...sub_daily_metric_time__plan0_optimized.sql | 8 + .../test_sub_daily_dimension__plan0.sql | 187 ++++ ...t_sub_daily_dimension__plan0_optimized.sql | 7 + .../test_sub_daily_metric_time__plan0.sql | 59 ++ ...sub_daily_metric_time__plan0_optimized.sql | 8 + .../test_sub_daily_dimension__plan0.sql | 187 ++++ ...t_sub_daily_dimension__plan0_optimized.sql | 7 + .../test_sub_daily_metric_time__plan0.sql | 59 ++ ...sub_daily_metric_time__plan0_optimized.sql | 8 + .../Trino/test_sub_daily_dimension__plan0.sql | 187 ++++ ...t_sub_daily_dimension__plan0_optimized.sql | 7 + .../test_sub_daily_metric_time__plan0.sql | 59 ++ ...sub_daily_metric_time__plan0_optimized.sql | 8 + ...dimensions_with_time_constraint__plan0.sql | 24 +- ..._with_time_constraint__plan0_optimized.sql | 6 +- .../BigQuery/test_metric_time_only__plan0.sql | 24 +- ...test_metric_time_only__plan0_optimized.sql | 2 +- .../test_metric_time_quarter_alone__plan0.sql | 24 +- ...ic_time_quarter_alone__plan0_optimized.sql | 2 +- ...tric_time_with_other_dimensions__plan0.sql | 24 +- ...with_other_dimensions__plan0_optimized.sql | 4 +- ...dimensions_with_time_constraint__plan0.sql | 24 +- ..._with_time_constraint__plan0_optimized.sql | 8 +- .../test_metric_time_only__plan0.sql | 24 +- ...test_metric_time_only__plan0_optimized.sql | 2 +- .../test_metric_time_quarter_alone__plan0.sql | 24 +- ...ic_time_quarter_alone__plan0_optimized.sql | 2 +- ...tric_time_with_other_dimensions__plan0.sql | 24 +- ...with_other_dimensions__plan0_optimized.sql | 6 +- ...dimensions_with_time_constraint__plan0.sql | 24 +- ..._with_time_constraint__plan0_optimized.sql | 8 +- .../DuckDB/test_metric_time_only__plan0.sql | 24 +- ...test_metric_time_only__plan0_optimized.sql | 2 +- .../test_metric_time_quarter_alone__plan0.sql | 24 +- ...ic_time_quarter_alone__plan0_optimized.sql | 2 +- ...tric_time_with_other_dimensions__plan0.sql | 24 +- ...with_other_dimensions__plan0_optimized.sql | 6 +- ...dimensions_with_time_constraint__plan0.sql | 24 +- ..._with_time_constraint__plan0_optimized.sql | 8 +- .../Postgres/test_metric_time_only__plan0.sql | 24 +- ...test_metric_time_only__plan0_optimized.sql | 2 +- .../test_metric_time_quarter_alone__plan0.sql | 24 +- ...ic_time_quarter_alone__plan0_optimized.sql | 2 +- ...tric_time_with_other_dimensions__plan0.sql | 24 +- ...with_other_dimensions__plan0_optimized.sql | 6 +- ...dimensions_with_time_constraint__plan0.sql | 24 +- ..._with_time_constraint__plan0_optimized.sql | 8 +- .../Redshift/test_metric_time_only__plan0.sql | 24 +- ...test_metric_time_only__plan0_optimized.sql | 2 +- .../test_metric_time_quarter_alone__plan0.sql | 24 +- ...ic_time_quarter_alone__plan0_optimized.sql | 2 +- ...tric_time_with_other_dimensions__plan0.sql | 24 +- ...with_other_dimensions__plan0_optimized.sql | 6 +- ...dimensions_with_time_constraint__plan0.sql | 24 +- ..._with_time_constraint__plan0_optimized.sql | 8 +- .../test_metric_time_only__plan0.sql | 24 +- ...test_metric_time_only__plan0_optimized.sql | 2 +- .../test_metric_time_quarter_alone__plan0.sql | 24 +- ...ic_time_quarter_alone__plan0_optimized.sql | 2 +- ...tric_time_with_other_dimensions__plan0.sql | 24 +- ...with_other_dimensions__plan0_optimized.sql | 6 +- ...dimensions_with_time_constraint__plan0.sql | 24 +- ..._with_time_constraint__plan0_optimized.sql | 8 +- .../Trino/test_metric_time_only__plan0.sql | 24 +- ...test_metric_time_only__plan0_optimized.sql | 2 +- .../test_metric_time_quarter_alone__plan0.sql | 24 +- ...ic_time_quarter_alone__plan0_optimized.sql | 2 +- ...tric_time_with_other_dimensions__plan0.sql | 24 +- ...with_other_dimensions__plan0_optimized.sql | 6 +- ...dimensions_with_time_constraint__plan0.xml | 80 +- .../test_metric_time_only__plan0.xml | 30 +- .../test_metric_time_quarter_alone__plan0.xml | 30 +- ...tric_time_with_other_dimensions__plan0.xml | 80 +- .../list/test_list_dimensions__result0.txt | 4 + ...rsion_metric_predicate_pushdown__dfp_0.xml | 18 +- ...ative_metric_predicate_pushdown__dfp_0.xml | 8 +- ...spine_metric_predicate_pushdown__dfp_0.xml | 16 +- ...ost_agg_join_predicate_pushdown__dfp_0.xml | 16 +- ...ffset_metric_predicate_pushdown__dfp_0.xml | 16 +- ...imple_join_categorical_pushdown__dfp_0.xml | 8 +- ..._time_pushdown_with_two_targets__dfp_0.xml | 8 +- .../test_min_max_metric_time__plan0.sql | 24 +- ...t_min_max_metric_time__plan0_optimized.sql | 2 +- .../test_min_max_metric_time_week__plan0.sql | 24 +- ..._max_metric_time_week__plan0_optimized.sql | 2 +- .../BigQuery/test_partitioned_join__plan0.sql | 108 +++ .../test_min_max_metric_time__plan0.sql | 24 +- ...t_min_max_metric_time__plan0_optimized.sql | 2 +- .../test_min_max_metric_time_week__plan0.sql | 24 +- ..._max_metric_time_week__plan0_optimized.sql | 2 +- .../test_partitioned_join__plan0.sql | 108 +++ .../test_min_max_metric_time__plan0.sql | 24 +- ...t_min_max_metric_time__plan0_optimized.sql | 2 +- .../test_min_max_metric_time_week__plan0.sql | 24 +- ..._max_metric_time_week__plan0_optimized.sql | 2 +- .../DuckDB/test_partitioned_join__plan0.sql | 108 +++ .../test_min_max_metric_time__plan0.sql | 24 +- ...t_min_max_metric_time__plan0_optimized.sql | 2 +- .../test_min_max_metric_time_week__plan0.sql | 24 +- ..._max_metric_time_week__plan0_optimized.sql | 2 +- .../Postgres/test_partitioned_join__plan0.sql | 108 +++ .../test_min_max_metric_time__plan0.sql | 24 +- ...t_min_max_metric_time__plan0_optimized.sql | 2 +- .../test_min_max_metric_time_week__plan0.sql | 24 +- ..._max_metric_time_week__plan0_optimized.sql | 2 +- .../Redshift/test_partitioned_join__plan0.sql | 108 +++ .../test_min_max_metric_time__plan0.sql | 24 +- ...t_min_max_metric_time__plan0_optimized.sql | 2 +- .../test_min_max_metric_time_week__plan0.sql | 24 +- ..._max_metric_time_week__plan0_optimized.sql | 2 +- .../test_partitioned_join__plan0.sql | 108 +++ .../Trino/test_min_max_metric_time__plan0.sql | 24 +- ...t_min_max_metric_time__plan0_optimized.sql | 2 +- .../test_min_max_metric_time_week__plan0.sql | 24 +- ..._max_metric_time_week__plan0_optimized.sql | 2 +- .../Trino/test_partitioned_join__plan0.sql | 108 +++ ...2_metrics_from_1_semantic_model__dfp_0.xml | 16 +- ..._metrics_from_2_semantic_models__dfp_0.xml | 8 +- ...o_metrics_from_1_semantic_model__dfp_0.xml | 16 +- ..._metrics_from_2_semantic_models__dfp_0.xml | 12 +- ...constrained_metric_not_combined__dfp_0.xml | 8 +- .../test_derived_metric__dfp_0.xml | 8 +- ..._metric_with_non_derived_metric__dfp_0.xml | 12 +- .../test_duplicate_measures__dfp_0.xml | 8 +- .../test_nested_derived_metric__dfp_0.xml | 16 +- 234 files changed, 5769 insertions(+), 2050 deletions(-) create mode 100644 .changes/unreleased/Features-20240727-081106.yaml create mode 100644 tests_metricflow/fixtures/source_table_snapshots/time_spine_table/mf_time_spine_hour.yaml create mode 100644 tests_metricflow/fixtures/source_table_snapshots/time_spine_table/mf_time_spine_microsecond.yaml create mode 100644 tests_metricflow/fixtures/source_table_snapshots/time_spine_table/mf_time_spine_millisecond.yaml create mode 100644 tests_metricflow/fixtures/source_table_snapshots/time_spine_table/mf_time_spine_minute.yaml create mode 100644 tests_metricflow/fixtures/source_table_snapshots/time_spine_table/mf_time_spine_nanosecond.yaml create mode 100644 tests_metricflow/fixtures/source_table_snapshots/time_spine_table/mf_time_spine_second.yaml create mode 100644 tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_dimension__plan0.sql create mode 100644 tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_dimension__plan0_optimized.sql create mode 100644 tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_metric_time__plan0.sql create mode 100644 tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_metric_time__plan0_optimized.sql create mode 100644 tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_dimension__plan0.sql create mode 100644 tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_dimension__plan0_optimized.sql create mode 100644 tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_metric_time__plan0.sql create mode 100644 tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_metric_time__plan0_optimized.sql create mode 100644 tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_dimension__plan0.sql create mode 100644 tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_dimension__plan0_optimized.sql create mode 100644 tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_metric_time__plan0.sql create mode 100644 tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_metric_time__plan0_optimized.sql create mode 100644 tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_dimension__plan0.sql create mode 100644 tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_dimension__plan0_optimized.sql create mode 100644 tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_metric_time__plan0.sql create mode 100644 tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_metric_time__plan0_optimized.sql create mode 100644 tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_dimension__plan0.sql create mode 100644 tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_dimension__plan0_optimized.sql create mode 100644 tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_metric_time__plan0.sql create mode 100644 tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_metric_time__plan0_optimized.sql create mode 100644 tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_dimension__plan0.sql create mode 100644 tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_dimension__plan0_optimized.sql create mode 100644 tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_metric_time__plan0.sql create mode 100644 tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_metric_time__plan0_optimized.sql create mode 100644 tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_dimension__plan0.sql create mode 100644 tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_dimension__plan0_optimized.sql create mode 100644 tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_metric_time__plan0.sql create mode 100644 tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_metric_time__plan0_optimized.sql diff --git a/.changes/unreleased/Features-20240727-081106.yaml b/.changes/unreleased/Features-20240727-081106.yaml new file mode 100644 index 0000000000..d83fed7648 --- /dev/null +++ b/.changes/unreleased/Features-20240727-081106.yaml @@ -0,0 +1,6 @@ +kind: Features +body: Enable sub-daily queries without metrics. +time: 2024-07-27T08:11:06.357653-07:00 +custom: + Author: courtneyholcomb + Issue: "1359" 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 7da7d635a5..3afb0ea84a 100644 --- a/metricflow-semantics/metricflow_semantics/model/semantics/linkable_spec_resolver.py +++ b/metricflow-semantics/metricflow_semantics/model/semantics/linkable_spec_resolver.py @@ -40,6 +40,7 @@ from metricflow_semantics.model.semantics.linkable_element_set import LinkableElementSet from metricflow_semantics.model.semantics.semantic_model_join_evaluator import SemanticModelJoinEvaluator from metricflow_semantics.specs.time_dimension_spec import DEFAULT_TIME_GRANULARITY +from metricflow_semantics.time.time_spine_source import TimeSpineSource if TYPE_CHECKING: from metricflow_semantics.model.semantics.semantic_model_lookup import SemanticModelLookup @@ -124,6 +125,7 @@ def __init__( # Sort semantic models by name for consistency in building derived objects. 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.create_from_manifest(self._semantic_manifest) assert max_entity_links >= 0 self._max_entity_links = max_entity_links @@ -454,6 +456,7 @@ def _get_metric_time_elements(self, measure_reference: Optional[MeasureReference on what aggregation time dimension was used to define the measure. """ measure_semantic_model: Optional[SemanticModel] = None + defined_granularity: Optional[TimeGranularity] = None if measure_reference: measure_semantic_model = self._get_semantic_model_for_measure(measure_reference) measure_agg_time_dimension_reference = measure_semantic_model.checked_agg_time_dimension_for_measure( @@ -463,15 +466,20 @@ def _get_metric_time_elements(self, measure_reference: Optional[MeasureReference semantic_model=measure_semantic_model, time_dimension_reference=measure_agg_time_dimension_reference, ) + possible_metric_time_granularities = tuple( + time_granularity + for time_granularity in TimeGranularity + if defined_granularity.is_smaller_than_or_equal(time_granularity) + ) else: - defined_granularity = DEFAULT_TIME_GRANULARITY - - # It's possible to aggregate measures to coarser time granularities (except with cumulative metrics). - possible_metric_time_granularities = tuple( - time_granularity - for time_granularity in TimeGranularity - if defined_granularity.is_smaller_than_or_equal(time_granularity) - ) + # If querying metric_time without metrics, will query from time spines. + # Defaults to DAY granularity if available in time spines, else smallest available granularity. + min_time_spine_granularity = min(self._time_spine_sources.keys()) + possible_metric_time_granularities = tuple( + time_granularity + for time_granularity in TimeGranularity + if min_time_spine_granularity.is_smaller_than_or_equal(time_granularity) + ) # For each of the possible time granularities, create a LinkableDimension. path_key_to_linkable_dimensions: Dict[ElementPathKey, List[LinkableDimension]] = defaultdict(list) diff --git a/metricflow-semantics/metricflow_semantics/specs/patterns/metric_time_default_granularity.py b/metricflow-semantics/metricflow_semantics/specs/patterns/metric_time_default_granularity.py index eeae9299fc..8c3a2499f1 100644 --- a/metricflow-semantics/metricflow_semantics/specs/patterns/metric_time_default_granularity.py +++ b/metricflow-semantics/metricflow_semantics/specs/patterns/metric_time_default_granularity.py @@ -10,6 +10,7 @@ from metricflow_semantics.specs.patterns.spec_pattern import SpecPattern from metricflow_semantics.specs.spec_set import group_specs_by_type from metricflow_semantics.specs.time_dimension_spec import ( + DEFAULT_TIME_GRANULARITY, TimeDimensionSpec, TimeDimensionSpecComparisonKey, TimeDimensionSpecField, @@ -47,10 +48,13 @@ def __init__(self, max_metric_default_time_granularity: Optional[TimeGranularity def match(self, candidate_specs: Sequence[InstanceSpec]) -> Sequence[InstanceSpec]: spec_set = group_specs_by_type(candidate_specs) - # If there are no metrics or metric_time specs in the query, skip this filter. - if not (self._max_metric_default_time_granularity and spec_set.metric_time_specs): + # If there are no metric_time specs in the query, skip this filter. + if not spec_set.metric_time_specs: return candidate_specs + # If there are metrics in the query, use max metric default. For no-metric queries, use standard default. + default_granularity = self._max_metric_default_time_granularity or DEFAULT_TIME_GRANULARITY + spec_key_to_grains: Dict[TimeDimensionSpecComparisonKey, Set[TimeGranularity]] = defaultdict(set) spec_key_to_specs: Dict[TimeDimensionSpecComparisonKey, Tuple[TimeDimensionSpec, ...]] = defaultdict(tuple) for metric_time_spec in spec_set.metric_time_specs: @@ -60,10 +64,8 @@ def match(self, candidate_specs: Sequence[InstanceSpec]) -> Sequence[InstanceSpe matched_metric_time_specs: Tuple[TimeDimensionSpec, ...] = () for spec_key, time_grains in spec_key_to_grains.items(): - if self._max_metric_default_time_granularity in time_grains: - matched_metric_time_specs += ( - spec_key_to_specs[spec_key][0].with_grain(self._max_metric_default_time_granularity), - ) + if default_granularity in time_grains: + matched_metric_time_specs += (spec_key_to_specs[spec_key][0].with_grain(default_granularity),) else: # If default_granularity is not in the available options, then time granularity was specified in the request # and a default is not needed here. Pass all options through for this spec key. diff --git a/metricflow-semantics/metricflow_semantics/specs/time_dimension_spec.py b/metricflow-semantics/metricflow_semantics/specs/time_dimension_spec.py index 6f47e161c1..5f23c0e20f 100644 --- a/metricflow-semantics/metricflow_semantics/specs/time_dimension_spec.py +++ b/metricflow-semantics/metricflow_semantics/specs/time_dimension_spec.py @@ -101,7 +101,12 @@ def without_first_entity_link(self) -> TimeDimensionSpec: # noqa: D102 @property def without_entity_links(self) -> TimeDimensionSpec: # noqa: D102 - return TimeDimensionSpec.from_name(self.element_name) + return TimeDimensionSpec( + element_name=self.element_name, + time_granularity=self.time_granularity, + date_part=self.date_part, + entity_links=(), + ) @staticmethod def from_name(name: str) -> TimeDimensionSpec: # noqa: D102 diff --git a/metricflow-semantics/metricflow_semantics/test_helpers/semantic_manifest_yamls/shared/project_configuration.yaml b/metricflow-semantics/metricflow_semantics/test_helpers/semantic_manifest_yamls/shared/project_configuration.yaml index 7ca0c2ae9f..56156ce0f0 100644 --- a/metricflow-semantics/metricflow_semantics/test_helpers/semantic_manifest_yamls/shared/project_configuration.yaml +++ b/metricflow-semantics/metricflow_semantics/test_helpers/semantic_manifest_yamls/shared/project_configuration.yaml @@ -5,3 +5,40 @@ project_configuration: - location: $source_schema.mf_time_spine column_name: ds grain: day + time_spines: + - node_relation: + alias: mf_time_spine_nanosecond + schema_name: $source_schema + primary_column: + name: ts + time_granularity: nanosecond + - node_relation: + alias: mf_time_spine_microsecond + schema_name: $source_schema + primary_column: + name: ts + time_granularity: microsecond + - node_relation: + alias: mf_time_spine_millisecond + schema_name: $source_schema + primary_column: + name: ts + time_granularity: millisecond + - node_relation: + alias: mf_time_spine_second + schema_name: $source_schema + primary_column: + name: ts + time_granularity: second + - node_relation: + alias: mf_time_spine_minute + schema_name: $source_schema + primary_column: + name: ts + time_granularity: minute + - node_relation: + alias: mf_time_spine_hour + schema_name: $source_schema + primary_column: + name: ts + time_granularity: hour diff --git a/metricflow-semantics/metricflow_semantics/test_helpers/semantic_manifest_yamls/simple_manifest/metrics.yaml b/metricflow-semantics/metricflow_semantics/test_helpers/semantic_manifest_yamls/simple_manifest/metrics.yaml index aa3545865d..6d9116f015 100644 --- a/metricflow-semantics/metricflow_semantics/test_helpers/semantic_manifest_yamls/simple_manifest/metrics.yaml +++ b/metricflow-semantics/metricflow_semantics/test_helpers/semantic_manifest_yamls/simple_manifest/metrics.yaml @@ -783,22 +783,3 @@ metric: name: listings filter: "{{ Metric('views', ['listing']) }} > 10" time_granularity: week ---- -metric: - name: bookings_before_dec_20_2019 - description: Bookings up to the end of 2022 - type: simple - type_params: - measure: bookings - filter: "{{ TimeDimension('metric_time') }} < '2012-12-20'" ---- -metric: - name: bookings_between_dec_18_2019_and_dec_20_2019 - description: Bookings starting in 2020. Used to test a metric with different types of ambiguous filters in on its input metric. - type: derived - type_params: - expr: bookings_before_dec_20_2019 - metrics: - - name: bookings_before_dec_20_2019 - filter: "{{ TimeDimension('metric_time') }} > '2019-12-18'" - time_granularity: week diff --git a/metricflow-semantics/metricflow_semantics/test_helpers/semantic_manifest_yamls/simple_manifest/semantic_models/user_sm_source.yaml b/metricflow-semantics/metricflow_semantics/test_helpers/semantic_manifest_yamls/simple_manifest/semantic_models/user_sm_source.yaml index 56336491ff..b0db8c59f1 100644 --- a/metricflow-semantics/metricflow_semantics/test_helpers/semantic_manifest_yamls/simple_manifest/semantic_models/user_sm_source.yaml +++ b/metricflow-semantics/metricflow_semantics/test_helpers/semantic_manifest_yamls/simple_manifest/semantic_models/user_sm_source.yaml @@ -23,6 +23,23 @@ semantic_model: time_granularity: day - name: home_state type: categorical + - name: last_profile_edit_ts + type: time + type_params: + time_granularity: millisecond + - name: bio_added_ts + type: time + type_params: + time_granularity: second + - name: last_login_ts + type: time + type_params: + time_granularity: minute + - name: archived_at + type: time + type_params: + time_granularity: hour + entities: - name: user diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__no_metrics__set0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__no_metrics__set0.txt index 3f3066a685..81ebfcea27 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__no_metrics__set0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__no_metrics__set0.txt @@ -6,13 +6,55 @@ "TimeDimension('metric_time', 'day', date_part_name='month')", "TimeDimension('metric_time', 'day', date_part_name='quarter')", "TimeDimension('metric_time', 'day', date_part_name='year')", + "TimeDimension('metric_time', 'hour')", + "TimeDimension('metric_time', 'hour', date_part_name='day')", + "TimeDimension('metric_time', 'hour', date_part_name='dow')", + "TimeDimension('metric_time', 'hour', date_part_name='doy')", + "TimeDimension('metric_time', 'hour', date_part_name='month')", + "TimeDimension('metric_time', 'hour', date_part_name='quarter')", + "TimeDimension('metric_time', 'hour', date_part_name='year')", + "TimeDimension('metric_time', 'microsecond')", + "TimeDimension('metric_time', 'microsecond', date_part_name='day')", + "TimeDimension('metric_time', 'microsecond', date_part_name='dow')", + "TimeDimension('metric_time', 'microsecond', date_part_name='doy')", + "TimeDimension('metric_time', 'microsecond', date_part_name='month')", + "TimeDimension('metric_time', 'microsecond', date_part_name='quarter')", + "TimeDimension('metric_time', 'microsecond', date_part_name='year')", + "TimeDimension('metric_time', 'millisecond')", + "TimeDimension('metric_time', 'millisecond', date_part_name='day')", + "TimeDimension('metric_time', 'millisecond', date_part_name='dow')", + "TimeDimension('metric_time', 'millisecond', date_part_name='doy')", + "TimeDimension('metric_time', 'millisecond', date_part_name='month')", + "TimeDimension('metric_time', 'millisecond', date_part_name='quarter')", + "TimeDimension('metric_time', 'millisecond', date_part_name='year')", + "TimeDimension('metric_time', 'minute')", + "TimeDimension('metric_time', 'minute', date_part_name='day')", + "TimeDimension('metric_time', 'minute', date_part_name='dow')", + "TimeDimension('metric_time', 'minute', date_part_name='doy')", + "TimeDimension('metric_time', 'minute', date_part_name='month')", + "TimeDimension('metric_time', 'minute', date_part_name='quarter')", + "TimeDimension('metric_time', 'minute', date_part_name='year')", "TimeDimension('metric_time', 'month')", "TimeDimension('metric_time', 'month', date_part_name='month')", "TimeDimension('metric_time', 'month', date_part_name='quarter')", "TimeDimension('metric_time', 'month', date_part_name='year')", + "TimeDimension('metric_time', 'nanosecond')", + "TimeDimension('metric_time', 'nanosecond', date_part_name='day')", + "TimeDimension('metric_time', 'nanosecond', date_part_name='dow')", + "TimeDimension('metric_time', 'nanosecond', date_part_name='doy')", + "TimeDimension('metric_time', 'nanosecond', date_part_name='month')", + "TimeDimension('metric_time', 'nanosecond', date_part_name='quarter')", + "TimeDimension('metric_time', 'nanosecond', date_part_name='year')", "TimeDimension('metric_time', 'quarter')", "TimeDimension('metric_time', 'quarter', date_part_name='quarter')", "TimeDimension('metric_time', 'quarter', date_part_name='year')", + "TimeDimension('metric_time', 'second')", + "TimeDimension('metric_time', 'second', date_part_name='day')", + "TimeDimension('metric_time', 'second', date_part_name='dow')", + "TimeDimension('metric_time', 'second', date_part_name='doy')", + "TimeDimension('metric_time', 'second', date_part_name='month')", + "TimeDimension('metric_time', 'second', date_part_name='quarter')", + "TimeDimension('metric_time', 'second', date_part_name='year')", "TimeDimension('metric_time', 'week')", "TimeDimension('metric_time', 'week', date_part_name='month')", "TimeDimension('metric_time', 'week', date_part_name='quarter')", 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 2f48fe86a4..321d452252 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 @@ -20,8 +20,6 @@ 'listing__booking__listing__booking_value_sub_instant', 'listing__booking__listing__booking_value_sub_instant_add_10', 'listing__booking__listing__bookings', - 'listing__booking__listing__bookings_before_dec_20_2019', - 'listing__booking__listing__bookings_between_dec_18_2019_and_dec_20_2019', 'listing__booking__listing__bookings_fill_nulls_with_0', 'listing__booking__listing__bookings_fill_nulls_with_0_without_time_spine', 'listing__booking__listing__bookings_join_to_time_spine', @@ -56,8 +54,6 @@ 'listing__booking_value_sub_instant', 'listing__booking_value_sub_instant_add_10', 'listing__bookings', - 'listing__bookings_before_dec_20_2019', - 'listing__bookings_between_dec_18_2019_and_dec_20_2019', 'listing__bookings_fill_nulls_with_0', 'listing__bookings_fill_nulls_with_0_without_time_spine', 'listing__bookings_join_to_time_spine', @@ -163,6 +159,74 @@ 'user__account__user__regional_starting_balance_ratios', 'user__account__user__total_account_balance_first_day', 'user__active_listings', + 'user__archived_at__day', + 'user__archived_at__extract_day', + 'user__archived_at__extract_day', + 'user__archived_at__extract_dow', + 'user__archived_at__extract_dow', + 'user__archived_at__extract_doy', + 'user__archived_at__extract_doy', + 'user__archived_at__extract_month', + 'user__archived_at__extract_month', + 'user__archived_at__extract_month', + 'user__archived_at__extract_month', + 'user__archived_at__extract_quarter', + 'user__archived_at__extract_quarter', + 'user__archived_at__extract_quarter', + 'user__archived_at__extract_quarter', + 'user__archived_at__extract_quarter', + 'user__archived_at__extract_year', + 'user__archived_at__extract_year', + 'user__archived_at__extract_year', + 'user__archived_at__extract_year', + 'user__archived_at__extract_year', + 'user__archived_at__extract_year', + 'user__archived_at__hour', + 'user__archived_at__month', + 'user__archived_at__quarter', + 'user__archived_at__week', + 'user__archived_at__year', + 'user__bio_added_ts__day', + 'user__bio_added_ts__extract_day', + 'user__bio_added_ts__extract_day', + 'user__bio_added_ts__extract_day', + 'user__bio_added_ts__extract_day', + 'user__bio_added_ts__extract_dow', + 'user__bio_added_ts__extract_dow', + 'user__bio_added_ts__extract_dow', + 'user__bio_added_ts__extract_dow', + 'user__bio_added_ts__extract_doy', + 'user__bio_added_ts__extract_doy', + 'user__bio_added_ts__extract_doy', + 'user__bio_added_ts__extract_doy', + 'user__bio_added_ts__extract_month', + 'user__bio_added_ts__extract_month', + 'user__bio_added_ts__extract_month', + 'user__bio_added_ts__extract_month', + 'user__bio_added_ts__extract_month', + 'user__bio_added_ts__extract_month', + 'user__bio_added_ts__extract_quarter', + 'user__bio_added_ts__extract_quarter', + 'user__bio_added_ts__extract_quarter', + 'user__bio_added_ts__extract_quarter', + 'user__bio_added_ts__extract_quarter', + 'user__bio_added_ts__extract_quarter', + 'user__bio_added_ts__extract_quarter', + 'user__bio_added_ts__extract_year', + 'user__bio_added_ts__extract_year', + 'user__bio_added_ts__extract_year', + 'user__bio_added_ts__extract_year', + 'user__bio_added_ts__extract_year', + 'user__bio_added_ts__extract_year', + 'user__bio_added_ts__extract_year', + 'user__bio_added_ts__extract_year', + 'user__bio_added_ts__hour', + 'user__bio_added_ts__minute', + 'user__bio_added_ts__month', + 'user__bio_added_ts__quarter', + 'user__bio_added_ts__second', + 'user__bio_added_ts__week', + 'user__bio_added_ts__year', 'user__company', 'user__company_name', 'user__created_at__day', @@ -250,6 +314,88 @@ 'user__home_state_latest', 'user__identity_verifications', 'user__largest_listing', + 'user__last_login_ts__day', + 'user__last_login_ts__extract_day', + 'user__last_login_ts__extract_day', + 'user__last_login_ts__extract_day', + 'user__last_login_ts__extract_dow', + 'user__last_login_ts__extract_dow', + 'user__last_login_ts__extract_dow', + 'user__last_login_ts__extract_doy', + 'user__last_login_ts__extract_doy', + 'user__last_login_ts__extract_doy', + 'user__last_login_ts__extract_month', + 'user__last_login_ts__extract_month', + 'user__last_login_ts__extract_month', + 'user__last_login_ts__extract_month', + 'user__last_login_ts__extract_month', + 'user__last_login_ts__extract_quarter', + 'user__last_login_ts__extract_quarter', + 'user__last_login_ts__extract_quarter', + 'user__last_login_ts__extract_quarter', + 'user__last_login_ts__extract_quarter', + 'user__last_login_ts__extract_quarter', + 'user__last_login_ts__extract_year', + 'user__last_login_ts__extract_year', + 'user__last_login_ts__extract_year', + 'user__last_login_ts__extract_year', + 'user__last_login_ts__extract_year', + 'user__last_login_ts__extract_year', + 'user__last_login_ts__extract_year', + 'user__last_login_ts__hour', + 'user__last_login_ts__minute', + 'user__last_login_ts__month', + 'user__last_login_ts__quarter', + 'user__last_login_ts__week', + 'user__last_login_ts__year', + 'user__last_profile_edit_ts__day', + 'user__last_profile_edit_ts__extract_day', + 'user__last_profile_edit_ts__extract_day', + 'user__last_profile_edit_ts__extract_day', + 'user__last_profile_edit_ts__extract_day', + 'user__last_profile_edit_ts__extract_day', + 'user__last_profile_edit_ts__extract_dow', + 'user__last_profile_edit_ts__extract_dow', + 'user__last_profile_edit_ts__extract_dow', + 'user__last_profile_edit_ts__extract_dow', + 'user__last_profile_edit_ts__extract_dow', + 'user__last_profile_edit_ts__extract_doy', + 'user__last_profile_edit_ts__extract_doy', + 'user__last_profile_edit_ts__extract_doy', + 'user__last_profile_edit_ts__extract_doy', + 'user__last_profile_edit_ts__extract_doy', + 'user__last_profile_edit_ts__extract_month', + 'user__last_profile_edit_ts__extract_month', + 'user__last_profile_edit_ts__extract_month', + 'user__last_profile_edit_ts__extract_month', + 'user__last_profile_edit_ts__extract_month', + 'user__last_profile_edit_ts__extract_month', + 'user__last_profile_edit_ts__extract_month', + 'user__last_profile_edit_ts__extract_quarter', + 'user__last_profile_edit_ts__extract_quarter', + 'user__last_profile_edit_ts__extract_quarter', + 'user__last_profile_edit_ts__extract_quarter', + 'user__last_profile_edit_ts__extract_quarter', + 'user__last_profile_edit_ts__extract_quarter', + 'user__last_profile_edit_ts__extract_quarter', + 'user__last_profile_edit_ts__extract_quarter', + 'user__last_profile_edit_ts__extract_year', + 'user__last_profile_edit_ts__extract_year', + 'user__last_profile_edit_ts__extract_year', + 'user__last_profile_edit_ts__extract_year', + 'user__last_profile_edit_ts__extract_year', + 'user__last_profile_edit_ts__extract_year', + 'user__last_profile_edit_ts__extract_year', + '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__millisecond', + 'user__last_profile_edit_ts__minute', + 'user__last_profile_edit_ts__month', + 'user__last_profile_edit_ts__quarter', + 'user__last_profile_edit_ts__second', + 'user__last_profile_edit_ts__week', + 'user__last_profile_edit_ts__year', 'user__listing__user__active_listings', 'user__listing__user__approximate_continuous_booking_value_p99', 'user__listing__user__approximate_discrete_booking_value_p99', @@ -266,8 +412,6 @@ 'user__listing__user__booking_value_sub_instant', 'user__listing__user__booking_value_sub_instant_add_10', 'user__listing__user__bookings', - 'user__listing__user__bookings_before_dec_20_2019', - 'user__listing__user__bookings_between_dec_18_2019_and_dec_20_2019', 'user__listing__user__bookings_fill_nulls_with_0', 'user__listing__user__bookings_fill_nulls_with_0_without_time_spine', 'user__listing__user__bookings_join_to_time_spine', 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 5ade8cd35d..cba715b557 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 @@ -1,302 +1,602 @@ -Model Join-Path 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'] -('bookings_source', 'listings_latest') ('listing',) capacity_latest ['JOINED'] -('bookings_source', 'listings_latest') ('listing',) country_latest ['JOINED'] -('bookings_source', 'listings_latest') ('listing',) created_at DAY ['JOINED'] -('bookings_source', 'listings_latest') ('listing',) created_at DAY DAY ['JOINED'] -('bookings_source', 'listings_latest') ('listing',) created_at DAY DOW ['JOINED'] -('bookings_source', 'listings_latest') ('listing',) created_at DAY DOY ['JOINED'] -('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 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'] -('bookings_source', 'listings_latest') ('listing',) created_at MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('bookings_source', 'listings_latest') ('listing',) created_at QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('bookings_source', 'listings_latest') ('listing',) created_at QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('bookings_source', 'listings_latest') ('listing',) created_at QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('bookings_source', 'listings_latest') ('listing',) created_at WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('bookings_source', 'listings_latest') ('listing',) created_at WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('bookings_source', 'listings_latest') ('listing',) created_at WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('bookings_source', 'listings_latest') ('listing',) created_at WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('bookings_source', 'listings_latest') ('listing',) created_at YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('bookings_source', 'listings_latest') ('listing',) created_at YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('bookings_source', 'listings_latest') ('listing',) ds DAY ['JOINED'] -('bookings_source', 'listings_latest') ('listing',) ds DAY DAY ['JOINED'] -('bookings_source', 'listings_latest') ('listing',) ds DAY DOW ['JOINED'] -('bookings_source', 'listings_latest') ('listing',) ds DAY DOY ['JOINED'] -('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 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'] -('bookings_source', 'listings_latest') ('listing',) ds MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('bookings_source', 'listings_latest') ('listing',) ds QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('bookings_source', 'listings_latest') ('listing',) ds QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('bookings_source', 'listings_latest') ('listing',) ds QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('bookings_source', 'listings_latest') ('listing',) ds WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('bookings_source', 'listings_latest') ('listing',) ds WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('bookings_source', 'listings_latest') ('listing',) ds WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('bookings_source', 'listings_latest') ('listing',) ds WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('bookings_source', 'listings_latest') ('listing',) ds YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('bookings_source', 'listings_latest') ('listing',) ds YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('bookings_source', 'listings_latest') ('listing',) is_lux_latest ['JOINED'] -('bookings_source', 'listings_latest') ('listing',) user ['ENTITY', 'JOINED'] -('bookings_source', 'listings_latest', 'companies') ('listing', 'user') company ['ENTITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'companies') ('listing', 'user') company_name ['JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY ['JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY DAY ['JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY DOW ['JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY DOY ['JOINED', 'MULTI_HOP'] -('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 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'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY ['JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY DAY ['JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY DOW ['JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY DOY ['JOINED', 'MULTI_HOP'] -('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 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'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY ['JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY DAY ['JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY DOW ['JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY DOY ['JOINED', 'MULTI_HOP'] -('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 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'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') home_state ['JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY ['JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY DAY ['JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY DOW ['JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY DOY ['JOINED', 'MULTI_HOP'] -('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 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'] -('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') home_state_latest ['JOINED', 'MULTI_HOP'] -('bookings_source', 'lux_listing_mapping') ('listing',) lux_listing ['ENTITY', 'JOINED'] -('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'] -('views_source', 'listings_latest') ('listing',) capacity_latest ['JOINED'] -('views_source', 'listings_latest') ('listing',) country_latest ['JOINED'] -('views_source', 'listings_latest') ('listing',) created_at DAY ['JOINED'] -('views_source', 'listings_latest') ('listing',) created_at DAY DAY ['JOINED'] -('views_source', 'listings_latest') ('listing',) created_at DAY DOW ['JOINED'] -('views_source', 'listings_latest') ('listing',) created_at DAY DOY ['JOINED'] -('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 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'] -('views_source', 'listings_latest') ('listing',) created_at MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('views_source', 'listings_latest') ('listing',) created_at QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('views_source', 'listings_latest') ('listing',) created_at QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('views_source', 'listings_latest') ('listing',) created_at QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('views_source', 'listings_latest') ('listing',) created_at WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('views_source', 'listings_latest') ('listing',) created_at WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('views_source', 'listings_latest') ('listing',) created_at WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('views_source', 'listings_latest') ('listing',) created_at WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('views_source', 'listings_latest') ('listing',) created_at YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('views_source', 'listings_latest') ('listing',) created_at YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('views_source', 'listings_latest') ('listing',) ds DAY ['JOINED'] -('views_source', 'listings_latest') ('listing',) ds DAY DAY ['JOINED'] -('views_source', 'listings_latest') ('listing',) ds DAY DOW ['JOINED'] -('views_source', 'listings_latest') ('listing',) ds DAY DOY ['JOINED'] -('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 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'] -('views_source', 'listings_latest') ('listing',) ds MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('views_source', 'listings_latest') ('listing',) ds QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('views_source', 'listings_latest') ('listing',) ds QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('views_source', 'listings_latest') ('listing',) ds QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('views_source', 'listings_latest') ('listing',) ds WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('views_source', 'listings_latest') ('listing',) ds WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('views_source', 'listings_latest') ('listing',) ds WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('views_source', 'listings_latest') ('listing',) ds WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('views_source', 'listings_latest') ('listing',) ds YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('views_source', 'listings_latest') ('listing',) ds YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] -('views_source', 'listings_latest') ('listing',) is_lux_latest ['JOINED'] -('views_source', 'listings_latest') ('listing',) user ['ENTITY', 'JOINED'] -('views_source', 'listings_latest', 'companies') ('listing', 'user') company ['ENTITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'companies') ('listing', 'user') company_name ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY DAY ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY DOW ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY DOY ['JOINED', 'MULTI_HOP'] -('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 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'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY DAY ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY DOW ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY DOY ['JOINED', 'MULTI_HOP'] -('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 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'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY DAY ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY DOW ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY DOY ['JOINED', 'MULTI_HOP'] -('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 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'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') home_state ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY DAY ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY DOW ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY DOY ['JOINED', 'MULTI_HOP'] -('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 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'] -('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_latest') ('listing', 'user') home_state_latest ['JOINED', 'MULTI_HOP'] -('views_source', 'lux_listing_mapping') ('listing',) lux_listing ['ENTITY', 'JOINED'] +Model Join-Path 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'] +('bookings_source', 'listings_latest') ('listing',) capacity_latest ['JOINED'] +('bookings_source', 'listings_latest') ('listing',) country_latest ['JOINED'] +('bookings_source', 'listings_latest') ('listing',) created_at DAY ['JOINED'] +('bookings_source', 'listings_latest') ('listing',) created_at DAY DAY ['JOINED'] +('bookings_source', 'listings_latest') ('listing',) created_at DAY DOW ['JOINED'] +('bookings_source', 'listings_latest') ('listing',) created_at DAY DOY ['JOINED'] +('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 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'] +('bookings_source', 'listings_latest') ('listing',) created_at MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('bookings_source', 'listings_latest') ('listing',) created_at QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('bookings_source', 'listings_latest') ('listing',) created_at QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('bookings_source', 'listings_latest') ('listing',) created_at QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('bookings_source', 'listings_latest') ('listing',) created_at WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('bookings_source', 'listings_latest') ('listing',) created_at WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('bookings_source', 'listings_latest') ('listing',) created_at WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('bookings_source', 'listings_latest') ('listing',) created_at WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('bookings_source', 'listings_latest') ('listing',) created_at YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('bookings_source', 'listings_latest') ('listing',) created_at YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('bookings_source', 'listings_latest') ('listing',) ds DAY ['JOINED'] +('bookings_source', 'listings_latest') ('listing',) ds DAY DAY ['JOINED'] +('bookings_source', 'listings_latest') ('listing',) ds DAY DOW ['JOINED'] +('bookings_source', 'listings_latest') ('listing',) ds DAY DOY ['JOINED'] +('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 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'] +('bookings_source', 'listings_latest') ('listing',) ds MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('bookings_source', 'listings_latest') ('listing',) ds QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('bookings_source', 'listings_latest') ('listing',) ds QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('bookings_source', 'listings_latest') ('listing',) ds QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('bookings_source', 'listings_latest') ('listing',) ds WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('bookings_source', 'listings_latest') ('listing',) ds WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('bookings_source', 'listings_latest') ('listing',) ds WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('bookings_source', 'listings_latest') ('listing',) ds WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('bookings_source', 'listings_latest') ('listing',) ds YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('bookings_source', 'listings_latest') ('listing',) ds YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('bookings_source', 'listings_latest') ('listing',) is_lux_latest ['JOINED'] +('bookings_source', 'listings_latest') ('listing',) user ['ENTITY', 'JOINED'] +('bookings_source', 'listings_latest', 'companies') ('listing', 'user') company ['ENTITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'companies') ('listing', 'user') company_name ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at DAY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at DAY DAY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at DAY DOW ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at DAY DOY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at DAY MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at DAY QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at DAY YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at HOUR ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at HOUR DAY ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at HOUR DOW ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at HOUR DOY ['JOINED', 'MULTI_HOP'] +('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 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'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts DAY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts DAY DAY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts DAY DOW ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts DAY DOY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts DAY MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts DAY QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts DAY YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts HOUR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts HOUR DAY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts HOUR DOW ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts HOUR DOY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('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 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'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts MINUTE DOY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts MINUTE MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts MINUTE QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts MINUTE YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts MONTH MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts MONTH QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND DAY ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND DOW ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND DOY ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND MONTH ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND QUARTER ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND YEAR ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY DAY ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY DOW ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY DOY ['JOINED', 'MULTI_HOP'] +('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 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'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY DAY ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY DOW ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY DOY ['JOINED', 'MULTI_HOP'] +('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 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'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY DAY ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY DOW ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY DOY ['JOINED', 'MULTI_HOP'] +('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 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'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') home_state ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts DAY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts DAY DAY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts DAY DOW ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts DAY DOY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts DAY MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts DAY QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts DAY YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts HOUR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts HOUR DAY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts HOUR DOW ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts HOUR DOY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('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 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'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts MINUTE DOY ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts MINUTE MONTH ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts MINUTE QUARTER ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts MINUTE YEAR ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts MONTH MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts MONTH QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts DAY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts DAY DAY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts DAY DOW ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts DAY DOY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts DAY MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts DAY QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts DAY YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts HOUR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts HOUR DAY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts HOUR DOW ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts HOUR DOY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('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 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'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MILLISECOND DOY ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MILLISECOND MONTH ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MILLISECOND QUARTER ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MILLISECOND YEAR ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MINUTE ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MINUTE DAY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MINUTE DOW ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MINUTE DOY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MINUTE MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MINUTE QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MINUTE YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MONTH MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MONTH QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts SECOND ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts SECOND DAY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts SECOND DOW ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts SECOND DOY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts SECOND MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts SECOND QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts SECOND YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY DAY ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY DOW ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY DOY ['JOINED', 'MULTI_HOP'] +('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 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'] +('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') home_state_latest ['JOINED', 'MULTI_HOP'] +('bookings_source', 'lux_listing_mapping') ('listing',) lux_listing ['ENTITY', 'JOINED'] +('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'] +('views_source', 'listings_latest') ('listing',) capacity_latest ['JOINED'] +('views_source', 'listings_latest') ('listing',) country_latest ['JOINED'] +('views_source', 'listings_latest') ('listing',) created_at DAY ['JOINED'] +('views_source', 'listings_latest') ('listing',) created_at DAY DAY ['JOINED'] +('views_source', 'listings_latest') ('listing',) created_at DAY DOW ['JOINED'] +('views_source', 'listings_latest') ('listing',) created_at DAY DOY ['JOINED'] +('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 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'] +('views_source', 'listings_latest') ('listing',) created_at MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('views_source', 'listings_latest') ('listing',) created_at QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('views_source', 'listings_latest') ('listing',) created_at QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('views_source', 'listings_latest') ('listing',) created_at QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('views_source', 'listings_latest') ('listing',) created_at WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('views_source', 'listings_latest') ('listing',) created_at WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('views_source', 'listings_latest') ('listing',) created_at WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('views_source', 'listings_latest') ('listing',) created_at WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('views_source', 'listings_latest') ('listing',) created_at YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('views_source', 'listings_latest') ('listing',) created_at YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('views_source', 'listings_latest') ('listing',) ds DAY ['JOINED'] +('views_source', 'listings_latest') ('listing',) ds DAY DAY ['JOINED'] +('views_source', 'listings_latest') ('listing',) ds DAY DOW ['JOINED'] +('views_source', 'listings_latest') ('listing',) ds DAY DOY ['JOINED'] +('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 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'] +('views_source', 'listings_latest') ('listing',) ds MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('views_source', 'listings_latest') ('listing',) ds QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('views_source', 'listings_latest') ('listing',) ds QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('views_source', 'listings_latest') ('listing',) ds QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('views_source', 'listings_latest') ('listing',) ds WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('views_source', 'listings_latest') ('listing',) ds WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('views_source', 'listings_latest') ('listing',) ds WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('views_source', 'listings_latest') ('listing',) ds WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('views_source', 'listings_latest') ('listing',) ds YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('views_source', 'listings_latest') ('listing',) ds YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('views_source', 'listings_latest') ('listing',) is_lux_latest ['JOINED'] +('views_source', 'listings_latest') ('listing',) user ['ENTITY', 'JOINED'] +('views_source', 'listings_latest', 'companies') ('listing', 'user') company ['ENTITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'companies') ('listing', 'user') company_name ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at DAY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at DAY DAY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at DAY DOW ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at DAY DOY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at DAY MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at DAY QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at DAY YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at HOUR ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at HOUR DAY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at HOUR DOW ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at HOUR DOY ['JOINED', 'MULTI_HOP'] +('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 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'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts DAY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts DAY DAY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts DAY DOW ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts DAY DOY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts DAY MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts DAY QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts DAY YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts HOUR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts HOUR DAY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts HOUR DOW ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts HOUR DOY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('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 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'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts MINUTE DOY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts MINUTE MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts MINUTE QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts MINUTE YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts MONTH MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts MONTH QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND DAY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND DOW ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND DOY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND MONTH ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND QUARTER ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND YEAR ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY DAY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY DOW ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY DOY ['JOINED', 'MULTI_HOP'] +('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 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'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY DAY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY DOW ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY DOY ['JOINED', 'MULTI_HOP'] +('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 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'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY DAY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY DOW ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY DOY ['JOINED', 'MULTI_HOP'] +('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 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'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') home_state ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts DAY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts DAY DAY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts DAY DOW ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts DAY DOY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts DAY MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts DAY QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts DAY YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts HOUR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts HOUR DAY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts HOUR DOW ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts HOUR DOY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('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 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'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts MINUTE DOY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts MINUTE MONTH ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts MINUTE QUARTER ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts MINUTE YEAR ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts MONTH MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts MONTH QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts DAY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts DAY DAY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts DAY DOW ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts DAY DOY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts DAY MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts DAY QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts DAY YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts HOUR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts HOUR DAY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts HOUR DOW ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts HOUR DOY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('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 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'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MILLISECOND DOY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MILLISECOND MONTH ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MILLISECOND QUARTER ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MILLISECOND YEAR ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MINUTE ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MINUTE DAY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MINUTE DOW ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MINUTE DOY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MINUTE MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MINUTE QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MINUTE YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MONTH MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MONTH QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts SECOND ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts SECOND DAY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts SECOND DOW ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts SECOND DOY ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts SECOND MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts SECOND QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts SECOND YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY DAY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY DOW ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY DOY ['JOINED', 'MULTI_HOP'] +('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 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'] +('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_latest') ('listing', 'user') home_state_latest ['JOINED', 'MULTI_HOP'] +('views_source', 'lux_listing_mapping') ('listing',) lux_listing ['ENTITY', 'JOINED'] diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__no_metrics__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__no_metrics__result.txt index ac202ecaf3..98dd8771e6 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__no_metrics__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__no_metrics__result.txt @@ -8,7 +8,7 @@ GroupByItemResolution( time_granularity=DAY, ): ( LinkableDimension( - properties=(METRIC_TIME,), + properties=(DERIVED_TIME_GRANULARITY, METRIC_TIME), element_name='metric_time', dimension_type=TIME, join_path=SemanticModelJoinPath( diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/dict/test_get_names__result0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/dict/test_get_names__result0.txt index 2d1f6dcfa7..b7da0d4916 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/dict/test_get_names__result0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/dict/test_get_names__result0.txt @@ -1,6 +1,8 @@ { 'dimension_references': [ 'account_type', + 'archived_at', + 'bio_added_ts', 'capacity_latest', 'company_name', 'country_latest', @@ -12,6 +14,8 @@ 'home_state_latest', 'is_instant', 'is_lux_latest', + 'last_login_ts', + 'last_profile_edit_ts', 'paid_at', 'referrer_id', 'verification_type', 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 bda0664dfa..a9b388b32b 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 @@ -36,8 +36,6 @@ Model Join-Path Entity Links ('listings_latest',) ("('listing',)", "('booking', 'listing')") booking_value_sub_instant ['JOINED', 'METRIC'] ('listings_latest',) ("('listing',)", "('booking', 'listing')") booking_value_sub_instant_add_10 ['JOINED', 'METRIC'] ('listings_latest',) ("('listing',)", "('booking', 'listing')") bookings ['JOINED', 'METRIC'] -('listings_latest',) ("('listing',)", "('booking', 'listing')") bookings_before_dec_20_2019 ['JOINED', 'METRIC'] -('listings_latest',) ("('listing',)", "('booking', 'listing')") bookings_between_dec_18_2019_and_dec_20_2019 ['JOINED', 'METRIC'] ('listings_latest',) ("('listing',)", "('booking', 'listing')") bookings_fill_nulls_with_0 ['JOINED', 'METRIC'] ('listings_latest',) ("('listing',)", "('booking', 'listing')") bookings_fill_nulls_with_0_without_time_spine ['JOINED', 'METRIC'] ('listings_latest',) ("('listing',)", "('booking', 'listing')") bookings_join_to_time_spine ['JOINED', 'METRIC'] @@ -79,8 +77,6 @@ Model Join-Path Entity Links ('listings_latest',) ("('listing',)", "('listing',)") booking_value_sub_instant ['JOINED', 'METRIC'] ('listings_latest',) ("('listing',)", "('listing',)") booking_value_sub_instant_add_10 ['JOINED', 'METRIC'] ('listings_latest',) ("('listing',)", "('listing',)") bookings ['JOINED', 'METRIC'] -('listings_latest',) ("('listing',)", "('listing',)") bookings_before_dec_20_2019 ['JOINED', 'METRIC'] -('listings_latest',) ("('listing',)", "('listing',)") bookings_between_dec_18_2019_and_dec_20_2019 ['JOINED', 'METRIC'] ('listings_latest',) ("('listing',)", "('listing',)") bookings_fill_nulls_with_0 ['JOINED', 'METRIC'] ('listings_latest',) ("('listing',)", "('listing',)") bookings_fill_nulls_with_0_without_time_spine ['JOINED', 'METRIC'] ('listings_latest',) ("('listing',)", "('listing',)") bookings_join_to_time_spine ['JOINED', 'METRIC'] @@ -140,8 +136,6 @@ Model Join-Path Entity Links ('listings_latest',) ("('user',)", "('listing', 'user')") booking_value_sub_instant ['JOINED', 'METRIC'] ('listings_latest',) ("('user',)", "('listing', 'user')") booking_value_sub_instant_add_10 ['JOINED', 'METRIC'] ('listings_latest',) ("('user',)", "('listing', 'user')") bookings ['JOINED', 'METRIC'] -('listings_latest',) ("('user',)", "('listing', 'user')") bookings_before_dec_20_2019 ['JOINED', 'METRIC'] -('listings_latest',) ("('user',)", "('listing', 'user')") bookings_between_dec_18_2019_and_dec_20_2019 ['JOINED', 'METRIC'] ('listings_latest',) ("('user',)", "('listing', 'user')") bookings_fill_nulls_with_0 ['JOINED', 'METRIC'] ('listings_latest',) ("('user',)", "('listing', 'user')") bookings_fill_nulls_with_0_without_time_spine ['JOINED', 'METRIC'] ('listings_latest',) ("('user',)", "('listing', 'user')") bookings_join_to_time_spine ['JOINED', 'METRIC'] @@ -254,6 +248,74 @@ Model Join-Path Entity Links ('listings_latest', 'companies') ('user',) company ['ENTITY', 'JOINED'] ('listings_latest', 'companies') ('user',) company_name ['JOINED'] ('listings_latest', 'lux_listing_mapping') ('listing',) lux_listing ['ENTITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) archived_at DAY ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) archived_at DAY DAY ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) archived_at DAY DOW ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) archived_at DAY DOY ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) archived_at DAY MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) archived_at DAY QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) archived_at DAY YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) archived_at HOUR ['JOINED'] +('listings_latest', 'users_ds_source') ('user',) archived_at HOUR DAY ['JOINED'] +('listings_latest', 'users_ds_source') ('user',) archived_at HOUR DOW ['JOINED'] +('listings_latest', 'users_ds_source') ('user',) archived_at HOUR DOY ['JOINED'] +('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 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'] +('listings_latest', 'users_ds_source') ('user',) archived_at MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) archived_at QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) archived_at QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) archived_at QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) archived_at WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) archived_at WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) archived_at WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) archived_at WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) archived_at YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) archived_at YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts DAY ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts DAY DAY ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts DAY DOW ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts DAY DOY ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts DAY MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts DAY QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts DAY YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts HOUR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts HOUR DAY ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts HOUR DOW ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts HOUR DOY ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('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 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'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts MINUTE DOY ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts MINUTE MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts MINUTE QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts MINUTE YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts MONTH MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts MONTH QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts SECOND ['JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts SECOND DAY ['JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts SECOND DOW ['JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts SECOND DOY ['JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts SECOND MONTH ['JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts SECOND QUARTER ['JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts SECOND YEAR ['JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) bio_added_ts YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('listings_latest', 'users_ds_source') ('user',) created_at DAY ['JOINED'] ('listings_latest', 'users_ds_source') ('user',) created_at DAY DAY ['JOINED'] ('listings_latest', 'users_ds_source') ('user',) created_at DAY DOW ['JOINED'] @@ -315,6 +377,88 @@ Model Join-Path Entity Links ('listings_latest', 'users_ds_source') ('user',) ds_partitioned YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('listings_latest', 'users_ds_source') ('user',) ds_partitioned YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('listings_latest', 'users_ds_source') ('user',) home_state ['JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_login_ts DAY ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_login_ts DAY DAY ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_login_ts DAY DOW ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_login_ts DAY DOY ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_login_ts DAY MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_login_ts DAY QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_login_ts DAY YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_login_ts HOUR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_login_ts HOUR DAY ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_login_ts HOUR DOW ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_login_ts HOUR DOY ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('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 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'] +('listings_latest', 'users_ds_source') ('user',) last_login_ts MINUTE DOY ['JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_login_ts MINUTE MONTH ['JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_login_ts MINUTE QUARTER ['JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_login_ts MINUTE YEAR ['JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_login_ts MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_login_ts MONTH MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_login_ts MONTH QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_login_ts MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_login_ts QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_login_ts QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_login_ts QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_login_ts WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_login_ts WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_login_ts WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_login_ts WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_login_ts YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_login_ts YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts DAY ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts DAY DAY ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts DAY DOW ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts DAY DOY ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts DAY MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts DAY QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts DAY YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts HOUR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts HOUR DAY ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts HOUR DOW ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts HOUR DOY ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('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 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'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts MILLISECOND DOY ['JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts MILLISECOND MONTH ['JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts MILLISECOND QUARTER ['JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts MILLISECOND YEAR ['JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts MINUTE ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts MINUTE DAY ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts MINUTE DOW ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts MINUTE DOY ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts MINUTE MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts MINUTE QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts MINUTE YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts MONTH MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts MONTH QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts MONTH YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts QUARTER QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts QUARTER YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts SECOND ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts SECOND DAY ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts SECOND DOW ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts SECOND DOY ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts SECOND MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts SECOND QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts SECOND YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts WEEK MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts WEEK QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts WEEK YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] +('listings_latest', 'users_ds_source') ('user',) last_profile_edit_ts YEAR YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED'] ('listings_latest', 'users_latest') ('user',) ds_latest DAY ['JOINED'] ('listings_latest', 'users_latest') ('user',) ds_latest DAY DAY ['JOINED'] ('listings_latest', 'users_latest') ('user',) ds_latest DAY DOW ['JOINED'] diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_elements_for_metrics__result0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_elements_for_metrics__result0.txt index 39a66bae59..9e424ad035 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_elements_for_metrics__result0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_elements_for_metrics__result0.txt @@ -1,103 +1,159 @@ -Model Join-Path Entity Links Name Time Granularity Date Part Properties ------------------------------------------------------- ------------------- ----------------- ------------------ ----------- --------------------------------- -('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'] -('views_source', 'companies') ('user',) company ['ENTITY', 'JOINED'] -('views_source', 'companies') ('user',) company_name ['JOINED'] -('views_source', 'listings_latest') ('listing',) capacity_latest ['JOINED'] -('views_source', 'listings_latest') ('listing',) country_latest ['JOINED'] -('views_source', 'listings_latest') ('listing',) created_at DAY ['JOINED'] -('views_source', 'listings_latest') ('listing',) created_at DAY DAY ['JOINED'] -('views_source', 'listings_latest') ('listing',) created_at DAY DOW ['JOINED'] -('views_source', 'listings_latest') ('listing',) created_at DAY DOY ['JOINED'] -('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',) ds DAY ['JOINED'] -('views_source', 'listings_latest') ('listing',) ds DAY DAY ['JOINED'] -('views_source', 'listings_latest') ('listing',) ds DAY DOW ['JOINED'] -('views_source', 'listings_latest') ('listing',) ds DAY DOY ['JOINED'] -('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',) is_lux_latest ['JOINED'] -('views_source', 'listings_latest') ('listing',) user ['ENTITY', 'JOINED'] -('views_source', 'listings_latest', 'companies') ('listing', 'user') company ['ENTITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'companies') ('listing', 'user') company_name ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY DAY ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY DOW ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY DOY ['JOINED', 'MULTI_HOP'] -('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') ds DAY ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY DAY ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY DOW ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY DOY ['JOINED', 'MULTI_HOP'] -('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_partitioned DAY ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY DAY ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY DOW ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY DOY ['JOINED', 'MULTI_HOP'] -('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') home_state ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY DAY ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY DOW ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY DOY ['JOINED', 'MULTI_HOP'] -('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') home_state_latest ['JOINED', 'MULTI_HOP'] -('views_source', 'lux_listing_mapping') ('listing',) lux_listing ['ENTITY', 'JOINED'] -('views_source', 'users_ds_source') ('user',) created_at DAY ['JOINED'] -('views_source', 'users_ds_source') ('user',) created_at DAY DAY ['JOINED'] -('views_source', 'users_ds_source') ('user',) created_at DAY DOW ['JOINED'] -('views_source', 'users_ds_source') ('user',) created_at DAY DOY ['JOINED'] -('views_source', 'users_ds_source') ('user',) created_at DAY MONTH ['JOINED'] -('views_source', 'users_ds_source') ('user',) created_at DAY QUARTER ['JOINED'] -('views_source', 'users_ds_source') ('user',) created_at DAY YEAR ['JOINED'] -('views_source', 'users_ds_source') ('user',) ds DAY ['JOINED'] -('views_source', 'users_ds_source') ('user',) ds DAY DAY ['JOINED'] -('views_source', 'users_ds_source') ('user',) ds DAY DOW ['JOINED'] -('views_source', 'users_ds_source') ('user',) ds DAY DOY ['JOINED'] -('views_source', 'users_ds_source') ('user',) ds DAY MONTH ['JOINED'] -('views_source', 'users_ds_source') ('user',) ds DAY QUARTER ['JOINED'] -('views_source', 'users_ds_source') ('user',) ds DAY YEAR ['JOINED'] -('views_source', 'users_ds_source') ('user',) ds_partitioned DAY ['JOINED'] -('views_source', 'users_ds_source') ('user',) ds_partitioned DAY DAY ['JOINED'] -('views_source', 'users_ds_source') ('user',) ds_partitioned DAY DOW ['JOINED'] -('views_source', 'users_ds_source') ('user',) ds_partitioned DAY DOY ['JOINED'] -('views_source', 'users_ds_source') ('user',) ds_partitioned DAY MONTH ['JOINED'] -('views_source', 'users_ds_source') ('user',) ds_partitioned DAY QUARTER ['JOINED'] -('views_source', 'users_ds_source') ('user',) ds_partitioned DAY YEAR ['JOINED'] -('views_source', 'users_ds_source') ('user',) home_state ['JOINED'] -('views_source', 'users_latest') ('user',) ds_latest DAY ['JOINED'] -('views_source', 'users_latest') ('user',) ds_latest DAY DAY ['JOINED'] -('views_source', 'users_latest') ('user',) ds_latest DAY DOW ['JOINED'] -('views_source', 'users_latest') ('user',) ds_latest DAY DOY ['JOINED'] -('views_source', 'users_latest') ('user',) ds_latest DAY MONTH ['JOINED'] -('views_source', 'users_latest') ('user',) ds_latest DAY QUARTER ['JOINED'] -('views_source', 'users_latest') ('user',) ds_latest DAY YEAR ['JOINED'] -('views_source', 'users_latest') ('user',) home_state_latest ['JOINED'] +Model Join-Path Entity Links Name Time Granularity Date Part Properties +------------------------------------------------------ ------------------- -------------------- ------------------ ----------- --------------------------------- +('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'] +('views_source', 'companies') ('user',) company ['ENTITY', 'JOINED'] +('views_source', 'companies') ('user',) company_name ['JOINED'] +('views_source', 'listings_latest') ('listing',) capacity_latest ['JOINED'] +('views_source', 'listings_latest') ('listing',) country_latest ['JOINED'] +('views_source', 'listings_latest') ('listing',) created_at DAY ['JOINED'] +('views_source', 'listings_latest') ('listing',) created_at DAY DAY ['JOINED'] +('views_source', 'listings_latest') ('listing',) created_at DAY DOW ['JOINED'] +('views_source', 'listings_latest') ('listing',) created_at DAY DOY ['JOINED'] +('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',) ds DAY ['JOINED'] +('views_source', 'listings_latest') ('listing',) ds DAY DAY ['JOINED'] +('views_source', 'listings_latest') ('listing',) ds DAY DOW ['JOINED'] +('views_source', 'listings_latest') ('listing',) ds DAY DOY ['JOINED'] +('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',) is_lux_latest ['JOINED'] +('views_source', 'listings_latest') ('listing',) user ['ENTITY', 'JOINED'] +('views_source', 'listings_latest', 'companies') ('listing', 'user') company ['ENTITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'companies') ('listing', 'user') company_name ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at HOUR ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at HOUR DAY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at HOUR DOW ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at HOUR DOY ['JOINED', 'MULTI_HOP'] +('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') bio_added_ts SECOND ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND DAY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND DOW ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND DOY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND MONTH ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND QUARTER ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND YEAR ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY DAY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY DOW ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY DOY ['JOINED', 'MULTI_HOP'] +('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') ds DAY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY DAY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY DOW ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY DOY ['JOINED', 'MULTI_HOP'] +('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_partitioned DAY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY DAY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY DOW ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY DOY ['JOINED', 'MULTI_HOP'] +('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') home_state ['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'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts MINUTE DOY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts MINUTE MONTH ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts MINUTE QUARTER ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts MINUTE YEAR ['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'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MILLISECOND DOY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MILLISECOND MONTH ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MILLISECOND QUARTER ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MILLISECOND YEAR ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY DAY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY DOW ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY DOY ['JOINED', 'MULTI_HOP'] +('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') home_state_latest ['JOINED', 'MULTI_HOP'] +('views_source', 'lux_listing_mapping') ('listing',) lux_listing ['ENTITY', 'JOINED'] +('views_source', 'users_ds_source') ('user',) archived_at HOUR ['JOINED'] +('views_source', 'users_ds_source') ('user',) archived_at HOUR DAY ['JOINED'] +('views_source', 'users_ds_source') ('user',) archived_at HOUR DOW ['JOINED'] +('views_source', 'users_ds_source') ('user',) archived_at HOUR DOY ['JOINED'] +('views_source', 'users_ds_source') ('user',) archived_at HOUR MONTH ['JOINED'] +('views_source', 'users_ds_source') ('user',) archived_at HOUR QUARTER ['JOINED'] +('views_source', 'users_ds_source') ('user',) archived_at HOUR YEAR ['JOINED'] +('views_source', 'users_ds_source') ('user',) bio_added_ts SECOND ['JOINED'] +('views_source', 'users_ds_source') ('user',) bio_added_ts SECOND DAY ['JOINED'] +('views_source', 'users_ds_source') ('user',) bio_added_ts SECOND DOW ['JOINED'] +('views_source', 'users_ds_source') ('user',) bio_added_ts SECOND DOY ['JOINED'] +('views_source', 'users_ds_source') ('user',) bio_added_ts SECOND MONTH ['JOINED'] +('views_source', 'users_ds_source') ('user',) bio_added_ts SECOND QUARTER ['JOINED'] +('views_source', 'users_ds_source') ('user',) bio_added_ts SECOND YEAR ['JOINED'] +('views_source', 'users_ds_source') ('user',) created_at DAY ['JOINED'] +('views_source', 'users_ds_source') ('user',) created_at DAY DAY ['JOINED'] +('views_source', 'users_ds_source') ('user',) created_at DAY DOW ['JOINED'] +('views_source', 'users_ds_source') ('user',) created_at DAY DOY ['JOINED'] +('views_source', 'users_ds_source') ('user',) created_at DAY MONTH ['JOINED'] +('views_source', 'users_ds_source') ('user',) created_at DAY QUARTER ['JOINED'] +('views_source', 'users_ds_source') ('user',) created_at DAY YEAR ['JOINED'] +('views_source', 'users_ds_source') ('user',) ds DAY ['JOINED'] +('views_source', 'users_ds_source') ('user',) ds DAY DAY ['JOINED'] +('views_source', 'users_ds_source') ('user',) ds DAY DOW ['JOINED'] +('views_source', 'users_ds_source') ('user',) ds DAY DOY ['JOINED'] +('views_source', 'users_ds_source') ('user',) ds DAY MONTH ['JOINED'] +('views_source', 'users_ds_source') ('user',) ds DAY QUARTER ['JOINED'] +('views_source', 'users_ds_source') ('user',) ds DAY YEAR ['JOINED'] +('views_source', 'users_ds_source') ('user',) ds_partitioned DAY ['JOINED'] +('views_source', 'users_ds_source') ('user',) ds_partitioned DAY DAY ['JOINED'] +('views_source', 'users_ds_source') ('user',) ds_partitioned DAY DOW ['JOINED'] +('views_source', 'users_ds_source') ('user',) ds_partitioned DAY DOY ['JOINED'] +('views_source', 'users_ds_source') ('user',) ds_partitioned DAY MONTH ['JOINED'] +('views_source', 'users_ds_source') ('user',) ds_partitioned DAY QUARTER ['JOINED'] +('views_source', 'users_ds_source') ('user',) ds_partitioned DAY YEAR ['JOINED'] +('views_source', 'users_ds_source') ('user',) home_state ['JOINED'] +('views_source', 'users_ds_source') ('user',) last_login_ts MINUTE ['JOINED'] +('views_source', 'users_ds_source') ('user',) last_login_ts MINUTE DAY ['JOINED'] +('views_source', 'users_ds_source') ('user',) last_login_ts MINUTE DOW ['JOINED'] +('views_source', 'users_ds_source') ('user',) last_login_ts MINUTE DOY ['JOINED'] +('views_source', 'users_ds_source') ('user',) last_login_ts MINUTE MONTH ['JOINED'] +('views_source', 'users_ds_source') ('user',) last_login_ts MINUTE QUARTER ['JOINED'] +('views_source', 'users_ds_source') ('user',) last_login_ts MINUTE YEAR ['JOINED'] +('views_source', 'users_ds_source') ('user',) last_profile_edit_ts MILLISECOND ['JOINED'] +('views_source', 'users_ds_source') ('user',) last_profile_edit_ts MILLISECOND DAY ['JOINED'] +('views_source', 'users_ds_source') ('user',) last_profile_edit_ts MILLISECOND DOW ['JOINED'] +('views_source', 'users_ds_source') ('user',) last_profile_edit_ts MILLISECOND DOY ['JOINED'] +('views_source', 'users_ds_source') ('user',) last_profile_edit_ts MILLISECOND MONTH ['JOINED'] +('views_source', 'users_ds_source') ('user',) last_profile_edit_ts MILLISECOND QUARTER ['JOINED'] +('views_source', 'users_ds_source') ('user',) last_profile_edit_ts MILLISECOND YEAR ['JOINED'] +('views_source', 'users_latest') ('user',) ds_latest DAY ['JOINED'] +('views_source', 'users_latest') ('user',) ds_latest DAY DAY ['JOINED'] +('views_source', 'users_latest') ('user',) ds_latest DAY DOW ['JOINED'] +('views_source', 'users_latest') ('user',) ds_latest DAY DOY ['JOINED'] +('views_source', 'users_latest') ('user',) ds_latest DAY MONTH ['JOINED'] +('views_source', 'users_latest') ('user',) ds_latest DAY QUARTER ['JOINED'] +('views_source', 'users_latest') ('user',) ds_latest DAY YEAR ['JOINED'] +('views_source', 'users_latest') ('user',) home_state_latest ['JOINED'] diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_set_for_common_dimensions_in_different_models__result0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_set_for_common_dimensions_in_different_models__result0.txt index 4bb311eb3b..7652399b70 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_set_for_common_dimensions_in_different_models__result0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_set_for_common_dimensions_in_different_models__result0.txt @@ -1,108 +1,164 @@ -Model Join-Path Entity Links Name Time Granularity Date Part Properties ---------------------------------------------------------- ------------------- ----------------- ------------------ ----------- --------------------------------- -('bookings_source',) () listing ['ENTITY', 'LOCAL'] -('bookings_source',) () metric_time DAY ['METRIC_TIME'] -('bookings_source', 'listings_latest') ('listing',) capacity_latest ['JOINED'] -('bookings_source', 'listings_latest') ('listing',) country_latest ['JOINED'] -('bookings_source', 'listings_latest') ('listing',) created_at DAY ['JOINED'] -('bookings_source', 'listings_latest') ('listing',) created_at DAY DAY ['JOINED'] -('bookings_source', 'listings_latest') ('listing',) created_at DAY DOW ['JOINED'] -('bookings_source', 'listings_latest') ('listing',) created_at DAY DOY ['JOINED'] -('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',) ds DAY ['JOINED'] -('bookings_source', 'listings_latest') ('listing',) ds DAY DAY ['JOINED'] -('bookings_source', 'listings_latest') ('listing',) ds DAY DOW ['JOINED'] -('bookings_source', 'listings_latest') ('listing',) ds DAY DOY ['JOINED'] -('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',) is_lux_latest ['JOINED'] -('bookings_source', 'listings_latest') ('listing',) user ['ENTITY', 'JOINED'] -('bookings_source', 'listings_latest', 'companies') ('listing', 'user') company ['ENTITY', 'JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'companies') ('listing', 'user') company_name ['JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY ['JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY DAY ['JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY DOW ['JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY DOY ['JOINED', 'MULTI_HOP'] -('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') ds DAY ['JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY DAY ['JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY DOW ['JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY DOY ['JOINED', 'MULTI_HOP'] -('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_partitioned DAY ['JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY DAY ['JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY DOW ['JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY DOY ['JOINED', 'MULTI_HOP'] -('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') home_state ['JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY ['JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY DAY ['JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY DOW ['JOINED', 'MULTI_HOP'] -('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY DOY ['JOINED', 'MULTI_HOP'] -('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') home_state_latest ['JOINED', 'MULTI_HOP'] -('bookings_source', 'lux_listing_mapping') ('listing',) lux_listing ['ENTITY', 'JOINED'] -('views_source',) () listing ['ENTITY', 'LOCAL'] -('views_source',) () metric_time DAY ['METRIC_TIME'] -('views_source', 'listings_latest') ('listing',) capacity_latest ['JOINED'] -('views_source', 'listings_latest') ('listing',) country_latest ['JOINED'] -('views_source', 'listings_latest') ('listing',) created_at DAY ['JOINED'] -('views_source', 'listings_latest') ('listing',) created_at DAY DAY ['JOINED'] -('views_source', 'listings_latest') ('listing',) created_at DAY DOW ['JOINED'] -('views_source', 'listings_latest') ('listing',) created_at DAY DOY ['JOINED'] -('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',) ds DAY ['JOINED'] -('views_source', 'listings_latest') ('listing',) ds DAY DAY ['JOINED'] -('views_source', 'listings_latest') ('listing',) ds DAY DOW ['JOINED'] -('views_source', 'listings_latest') ('listing',) ds DAY DOY ['JOINED'] -('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',) is_lux_latest ['JOINED'] -('views_source', 'listings_latest') ('listing',) user ['ENTITY', 'JOINED'] -('views_source', 'listings_latest', 'companies') ('listing', 'user') company ['ENTITY', 'JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'companies') ('listing', 'user') company_name ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY DAY ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY DOW ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY DOY ['JOINED', 'MULTI_HOP'] -('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') ds DAY ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY DAY ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY DOW ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY DOY ['JOINED', 'MULTI_HOP'] -('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_partitioned DAY ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY DAY ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY DOW ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY DOY ['JOINED', 'MULTI_HOP'] -('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') home_state ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY DAY ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY DOW ['JOINED', 'MULTI_HOP'] -('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY DOY ['JOINED', 'MULTI_HOP'] -('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') home_state_latest ['JOINED', 'MULTI_HOP'] -('views_source', 'lux_listing_mapping') ('listing',) lux_listing ['ENTITY', 'JOINED'] +Model Join-Path Entity Links Name Time Granularity Date Part Properties +--------------------------------------------------------- ------------------- -------------------- ------------------ ----------- --------------------------------- +('bookings_source',) () listing ['ENTITY', 'LOCAL'] +('bookings_source',) () metric_time DAY ['METRIC_TIME'] +('bookings_source', 'listings_latest') ('listing',) capacity_latest ['JOINED'] +('bookings_source', 'listings_latest') ('listing',) country_latest ['JOINED'] +('bookings_source', 'listings_latest') ('listing',) created_at DAY ['JOINED'] +('bookings_source', 'listings_latest') ('listing',) created_at DAY DAY ['JOINED'] +('bookings_source', 'listings_latest') ('listing',) created_at DAY DOW ['JOINED'] +('bookings_source', 'listings_latest') ('listing',) created_at DAY DOY ['JOINED'] +('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',) ds DAY ['JOINED'] +('bookings_source', 'listings_latest') ('listing',) ds DAY DAY ['JOINED'] +('bookings_source', 'listings_latest') ('listing',) ds DAY DOW ['JOINED'] +('bookings_source', 'listings_latest') ('listing',) ds DAY DOY ['JOINED'] +('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',) is_lux_latest ['JOINED'] +('bookings_source', 'listings_latest') ('listing',) user ['ENTITY', 'JOINED'] +('bookings_source', 'listings_latest', 'companies') ('listing', 'user') company ['ENTITY', 'JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'companies') ('listing', 'user') company_name ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at HOUR ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at HOUR DAY ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at HOUR DOW ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at HOUR DOY ['JOINED', 'MULTI_HOP'] +('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') bio_added_ts SECOND ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND DAY ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND DOW ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND DOY ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND MONTH ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND QUARTER ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND YEAR ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY DAY ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY DOW ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY DOY ['JOINED', 'MULTI_HOP'] +('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') ds DAY ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY DAY ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY DOW ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY DOY ['JOINED', 'MULTI_HOP'] +('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_partitioned DAY ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY DAY ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY DOW ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY DOY ['JOINED', 'MULTI_HOP'] +('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') home_state ['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'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts MINUTE DOY ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts MINUTE MONTH ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts MINUTE QUARTER ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts MINUTE YEAR ['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'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MILLISECOND DOY ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MILLISECOND MONTH ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MILLISECOND QUARTER ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MILLISECOND YEAR ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY DAY ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY DOW ['JOINED', 'MULTI_HOP'] +('bookings_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY DOY ['JOINED', 'MULTI_HOP'] +('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') home_state_latest ['JOINED', 'MULTI_HOP'] +('bookings_source', 'lux_listing_mapping') ('listing',) lux_listing ['ENTITY', 'JOINED'] +('views_source',) () listing ['ENTITY', 'LOCAL'] +('views_source',) () metric_time DAY ['METRIC_TIME'] +('views_source', 'listings_latest') ('listing',) capacity_latest ['JOINED'] +('views_source', 'listings_latest') ('listing',) country_latest ['JOINED'] +('views_source', 'listings_latest') ('listing',) created_at DAY ['JOINED'] +('views_source', 'listings_latest') ('listing',) created_at DAY DAY ['JOINED'] +('views_source', 'listings_latest') ('listing',) created_at DAY DOW ['JOINED'] +('views_source', 'listings_latest') ('listing',) created_at DAY DOY ['JOINED'] +('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',) ds DAY ['JOINED'] +('views_source', 'listings_latest') ('listing',) ds DAY DAY ['JOINED'] +('views_source', 'listings_latest') ('listing',) ds DAY DOW ['JOINED'] +('views_source', 'listings_latest') ('listing',) ds DAY DOY ['JOINED'] +('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',) is_lux_latest ['JOINED'] +('views_source', 'listings_latest') ('listing',) user ['ENTITY', 'JOINED'] +('views_source', 'listings_latest', 'companies') ('listing', 'user') company ['ENTITY', 'JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'companies') ('listing', 'user') company_name ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at HOUR ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at HOUR DAY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at HOUR DOW ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') archived_at HOUR DOY ['JOINED', 'MULTI_HOP'] +('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') bio_added_ts SECOND ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND DAY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND DOW ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND DOY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND MONTH ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND QUARTER ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') bio_added_ts SECOND YEAR ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY DAY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY DOW ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') created_at DAY DOY ['JOINED', 'MULTI_HOP'] +('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') ds DAY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY DAY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY DOW ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds DAY DOY ['JOINED', 'MULTI_HOP'] +('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_partitioned DAY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY DAY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY DOW ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') ds_partitioned DAY DOY ['JOINED', 'MULTI_HOP'] +('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') home_state ['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'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts MINUTE DOY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts MINUTE MONTH ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts MINUTE QUARTER ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_login_ts MINUTE YEAR ['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'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MILLISECOND DOY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MILLISECOND MONTH ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MILLISECOND QUARTER ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_ds_source') ('listing', 'user') last_profile_edit_ts MILLISECOND YEAR ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY DAY ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY DOW ['JOINED', 'MULTI_HOP'] +('views_source', 'listings_latest', 'users_latest') ('listing', 'user') ds_latest DAY DOY ['JOINED', 'MULTI_HOP'] +('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') home_state_latest ['JOINED', 'MULTI_HOP'] +('views_source', 'lux_listing_mapping') ('listing',) lux_listing ['ENTITY', 'JOINED'] diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/tuple/test_linkable_elements_for_no_metrics_query__result0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/tuple/test_linkable_elements_for_no_metrics_query__result0.txt index 7cf20ab18e..d27aa93bbf 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/tuple/test_linkable_elements_for_no_metrics_query__result0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/tuple/test_linkable_elements_for_no_metrics_query__result0.txt @@ -59,8 +59,6 @@ 'company__listing__user__company__booking_value_sub_instant', 'company__listing__user__company__booking_value_sub_instant_add_10', 'company__listing__user__company__bookings', - 'company__listing__user__company__bookings_before_dec_20_2019', - 'company__listing__user__company__bookings_between_dec_18_2019_and_dec_20_2019', 'company__listing__user__company__bookings_fill_nulls_with_0', 'company__listing__user__company__bookings_fill_nulls_with_0_without_time_spine', 'company__listing__user__company__bookings_join_to_time_spine', @@ -127,8 +125,6 @@ 'guest__booking__guest__booking_value_sub_instant', 'guest__booking__guest__booking_value_sub_instant_add_10', 'guest__booking__guest__bookings', - 'guest__booking__guest__bookings_before_dec_20_2019', - 'guest__booking__guest__bookings_between_dec_18_2019_and_dec_20_2019', 'guest__booking__guest__bookings_fill_nulls_with_0', 'guest__booking__guest__bookings_fill_nulls_with_0_without_time_spine', 'guest__booking__guest__bookings_join_to_time_spine', @@ -162,8 +158,6 @@ 'guest__booking_value_sub_instant', 'guest__booking_value_sub_instant_add_10', 'guest__bookings', - 'guest__bookings_before_dec_20_2019', - 'guest__bookings_between_dec_18_2019_and_dec_20_2019', 'guest__bookings_fill_nulls_with_0', 'guest__bookings_fill_nulls_with_0_without_time_spine', 'guest__bookings_join_to_time_spine', @@ -208,8 +202,6 @@ 'host__booking__host__booking_value_sub_instant', 'host__booking__host__booking_value_sub_instant_add_10', 'host__booking__host__bookings', - 'host__booking__host__bookings_before_dec_20_2019', - 'host__booking__host__bookings_between_dec_18_2019_and_dec_20_2019', 'host__booking__host__bookings_fill_nulls_with_0', 'host__booking__host__bookings_fill_nulls_with_0_without_time_spine', 'host__booking__host__bookings_join_to_time_spine', @@ -243,8 +235,6 @@ 'host__booking_value_sub_instant', 'host__booking_value_sub_instant_add_10', 'host__bookings', - 'host__bookings_before_dec_20_2019', - 'host__bookings_between_dec_18_2019_and_dec_20_2019', 'host__bookings_fill_nulls_with_0', 'host__bookings_fill_nulls_with_0_without_time_spine', 'host__bookings_join_to_time_spine', @@ -290,8 +280,6 @@ 'listing__booking__listing__booking_value_sub_instant', 'listing__booking__listing__booking_value_sub_instant_add_10', 'listing__booking__listing__bookings', - 'listing__booking__listing__bookings_before_dec_20_2019', - 'listing__booking__listing__bookings_between_dec_18_2019_and_dec_20_2019', 'listing__booking__listing__bookings_fill_nulls_with_0', 'listing__booking__listing__bookings_fill_nulls_with_0_without_time_spine', 'listing__booking__listing__bookings_join_to_time_spine', @@ -326,8 +314,6 @@ 'listing__booking_value_sub_instant', 'listing__booking_value_sub_instant_add_10', 'listing__bookings', - 'listing__bookings_before_dec_20_2019', - 'listing__bookings_between_dec_18_2019_and_dec_20_2019', 'listing__bookings_fill_nulls_with_0', 'listing__bookings_fill_nulls_with_0_without_time_spine', 'listing__bookings_join_to_time_spine', @@ -399,8 +385,6 @@ 'lux_listing__listing__lux_listing__booking_value_sub_instant', 'lux_listing__listing__lux_listing__booking_value_sub_instant_add_10', 'lux_listing__listing__lux_listing__bookings', - 'lux_listing__listing__lux_listing__bookings_before_dec_20_2019', - 'lux_listing__listing__lux_listing__bookings_between_dec_18_2019_and_dec_20_2019', 'lux_listing__listing__lux_listing__bookings_fill_nulls_with_0', 'lux_listing__listing__lux_listing__bookings_fill_nulls_with_0_without_time_spine', 'lux_listing__listing__lux_listing__bookings_join_to_time_spine', @@ -435,7 +419,6 @@ 'lux_listing__listing__lux_listing__twice_bookings_fill_nulls_with_0_without_time_spine', 'lux_listing__listing__lux_listing__views', 'lux_listing__listing__lux_listing__views_times_booking_value', - 'metric_time__day', 'revenue_instance__ds__day', 'revenue_instance__ds__extract_day', 'revenue_instance__ds__extract_dow', @@ -461,6 +444,20 @@ 'user__account__user__regional_starting_balance_ratios', 'user__account__user__total_account_balance_first_day', 'user__active_listings', + 'user__archived_at__extract_day', + 'user__archived_at__extract_dow', + 'user__archived_at__extract_doy', + 'user__archived_at__extract_month', + 'user__archived_at__extract_quarter', + 'user__archived_at__extract_year', + 'user__archived_at__hour', + 'user__bio_added_ts__extract_day', + 'user__bio_added_ts__extract_dow', + 'user__bio_added_ts__extract_doy', + 'user__bio_added_ts__extract_month', + 'user__bio_added_ts__extract_quarter', + 'user__bio_added_ts__extract_year', + 'user__bio_added_ts__second', 'user__company', 'user__company_name', 'user__created_at__day', @@ -496,6 +493,20 @@ 'user__home_state_latest', 'user__identity_verifications', 'user__largest_listing', + 'user__last_login_ts__extract_day', + 'user__last_login_ts__extract_dow', + 'user__last_login_ts__extract_doy', + 'user__last_login_ts__extract_month', + 'user__last_login_ts__extract_quarter', + 'user__last_login_ts__extract_year', + 'user__last_login_ts__minute', + 'user__last_profile_edit_ts__extract_day', + 'user__last_profile_edit_ts__extract_dow', + 'user__last_profile_edit_ts__extract_doy', + 'user__last_profile_edit_ts__extract_month', + 'user__last_profile_edit_ts__extract_quarter', + 'user__last_profile_edit_ts__extract_year', + 'user__last_profile_edit_ts__millisecond', 'user__listing__user__active_listings', 'user__listing__user__approximate_continuous_booking_value_p99', 'user__listing__user__approximate_discrete_booking_value_p99', @@ -512,8 +523,6 @@ 'user__listing__user__booking_value_sub_instant', 'user__listing__user__booking_value_sub_instant_add_10', 'user__listing__user__bookings', - 'user__listing__user__bookings_before_dec_20_2019', - 'user__listing__user__bookings_between_dec_18_2019_and_dec_20_2019', 'user__listing__user__bookings_fill_nulls_with_0', 'user__listing__user__bookings_fill_nulls_with_0_without_time_spine', 'user__listing__user__bookings_join_to_time_spine', diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_suggestions.py/str/test_suggestions_for_defined_filters_in_multi_metric_query__result_0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_suggestions.py/str/test_suggestions_for_defined_filters_in_multi_metric_query__result_0.txt index c2032697c8..8d6db7c744 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_suggestions.py/str/test_suggestions_for_defined_filters_in_multi_metric_query__result_0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_suggestions.py/str/test_suggestions_for_defined_filters_in_multi_metric_query__result_0.txt @@ -18,8 +18,8 @@ Error #1: "TimeDimension('listing__created_at', 'day')", "Dimension('listing__is_lux_latest')", "TimeDimension('listing__ds', 'day')", + "TimeDimension('user__archived_at', 'hour')", "TimeDimension('user__created_at', 'day')", - "TimeDimension('user__ds_latest', 'day')", ] Query Input: diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_suggestions.py/str/test_suggestions_for_defined_where_filter__result_0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_suggestions.py/str/test_suggestions_for_defined_where_filter__result_0.txt index 0bbbe1a1a0..ae82301f75 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_suggestions.py/str/test_suggestions_for_defined_where_filter__result_0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_suggestions.py/str/test_suggestions_for_defined_where_filter__result_0.txt @@ -19,7 +19,7 @@ Error #1: "Dimension('listing__is_lux_latest')", "TimeDimension('listing__ds', 'day')", "Dimension('listing__country_latest')", - "TimeDimension('user__created_at', 'day')", + "TimeDimension('user__archived_at', 'hour')", ] Query Input: diff --git a/metricflow/dataflow/builder/node_evaluator.py b/metricflow/dataflow/builder/node_evaluator.py index d22533be75..b5a11fb2e8 100644 --- a/metricflow/dataflow/builder/node_evaluator.py +++ b/metricflow/dataflow/builder/node_evaluator.py @@ -200,14 +200,19 @@ def _find_joinable_candidate_nodes_that_can_satisfy_linkable_specs( candidates_for_join: List[JoinLinkableInstancesRecipe] = [] left_node_spec_set = left_node_instance_set.spec_set for right_node in self._nodes_available_for_joins: + data_set_in_right_node: SqlDataSet = self._node_data_set_resolver.get_output_data_set(right_node) + linkable_specs_in_right_node = data_set_in_right_node.instance_set.spec_set.linkable_specs + # If right node is time spine source node, use cross join. if right_node in self._time_spine_nodes: - needed_metric_time_specs = group_specs_by_type(needed_linkable_specs).metric_time_specs + satisfiable_metric_time_specs = [ + spec for spec in linkable_specs_in_right_node if spec in needed_linkable_specs + ] candidates_for_join.append( JoinLinkableInstancesRecipe( node_to_join=right_node, join_on_entity=None, - satisfiable_linkable_specs=list(needed_metric_time_specs), + satisfiable_linkable_specs=list(satisfiable_metric_time_specs), join_on_partition_dimensions=(), join_on_partition_time_dimensions=(), join_type=SqlJoinType.CROSS_JOIN, @@ -215,8 +220,6 @@ def _find_joinable_candidate_nodes_that_can_satisfy_linkable_specs( ) continue - data_set_in_right_node: SqlDataSet = self._node_data_set_resolver.get_output_data_set(right_node) - linkable_specs_in_right_node = data_set_in_right_node.instance_set.spec_set.linkable_specs entity_specs_in_right_node = data_set_in_right_node.instance_set.spec_set.entity_specs # For each unlinked entity in the data set, create a candidate for joining. diff --git a/metricflow/dataset/convert_semantic_model.py b/metricflow/dataset/convert_semantic_model.py index 198bdbce87..3304aefce3 100644 --- a/metricflow/dataset/convert_semantic_model.py +++ b/metricflow/dataset/convert_semantic_model.py @@ -104,7 +104,7 @@ def _create_time_dimension_instance( self, element_name: str, entity_links: Tuple[EntityReference, ...], - time_granularity: TimeGranularity = DEFAULT_TIME_GRANULARITY, + time_granularity: TimeGranularity, date_part: Optional[DatePart] = None, semantic_model_name: Optional[str] = None, ) -> TimeDimensionInstance: @@ -332,7 +332,7 @@ def _build_time_dimension_instances_and_columns( ) -> Tuple[List[TimeDimensionInstance], List[SqlSelectColumn]]: time_dimension_instances: List[TimeDimensionInstance] = [] select_columns: List[SqlSelectColumn] = [] - # Add time dimensions with a smaller granularity for ease in query resolution + # Add time dimensions with a larger granularity for ease in query resolution for time_granularity in TimeGranularity: if time_granularity.to_int() > defined_time_granularity.to_int(): time_dimension_instance = self._create_time_dimension_instance( diff --git a/tests_metricflow/dataflow/builder/test_node_data_set.py b/tests_metricflow/dataflow/builder/test_node_data_set.py index 1402472277..86bc84d7d5 100644 --- a/tests_metricflow/dataflow/builder/test_node_data_set.py +++ b/tests_metricflow/dataflow/builder/test_node_data_set.py @@ -5,6 +5,7 @@ from _pytest.fixtures import FixtureRequest from dbt_semantic_interfaces.references import SemanticModelElementReference +from dbt_semantic_interfaces.type_enums.time_granularity import TimeGranularity from metricflow_semantics.aggregation_properties import AggregationState from metricflow_semantics.instances import ( InstanceSet, @@ -38,7 +39,7 @@ def test_no_parent_node_data_set( simple_semantic_manifest_lookup: SemanticManifestLookup, - time_spine_source: TimeSpineSource, + time_spine_sources: Mapping[TimeGranularity, TimeSpineSource], ) -> None: """Tests getting the data set from a single node.""" resolver: DataflowPlanNodeOutputDataSetResolver = DataflowPlanNodeOutputDataSetResolver( @@ -93,7 +94,7 @@ def test_joined_node_data_set( mf_test_configuration: MetricFlowTestConfiguration, mf_engine_test_fixture_mapping: Mapping[SemanticManifestSetup, MetricFlowEngineTestFixture], simple_semantic_manifest_lookup: SemanticManifestLookup, - time_spine_source: TimeSpineSource, + time_spine_sources: Mapping[TimeGranularity, TimeSpineSource], ) -> None: """Tests getting the data set from a dataflow plan with a join.""" resolver: DataflowPlanNodeOutputDataSetResolver = DataflowPlanNodeOutputDataSetResolver( diff --git a/tests_metricflow/fixtures/dataflow_fixtures.py b/tests_metricflow/fixtures/dataflow_fixtures.py index 76604df857..571d86972d 100644 --- a/tests_metricflow/fixtures/dataflow_fixtures.py +++ b/tests_metricflow/fixtures/dataflow_fixtures.py @@ -3,6 +3,7 @@ from typing import Mapping import pytest +from dbt_semantic_interfaces.type_enums.time_granularity import TimeGranularity from metricflow_semantics.query.query_parser import MetricFlowQueryParser from metricflow_semantics.specs.column_assoc import ColumnAssociationResolver from metricflow_semantics.test_helpers.config_helpers import MetricFlowTestConfiguration @@ -90,7 +91,30 @@ def scd_query_parser( # noqa: D103 @pytest.fixture(scope="session") -def time_spine_source( # noqa: D103 +def time_spine_sources( # noqa: D103 sql_client: SqlClient, mf_test_configuration: MetricFlowTestConfiguration # noqa: F811 -) -> TimeSpineSource: - return TimeSpineSource(schema_name=mf_test_configuration.mf_source_schema, table_name="mf_time_spine") +) -> Mapping[TimeGranularity, TimeSpineSource]: + legacy_time_spine_grain = TimeGranularity.DAY + time_spine_base_table_name = "mf_time_spine" + print("expected schema name:", mf_test_configuration.mf_source_schema) + # Legacy time spine + time_spine_sources = { + legacy_time_spine_grain: TimeSpineSource( + schema_name=mf_test_configuration.mf_source_schema, table_name=time_spine_base_table_name + ) + } + # Current time spines + for granularity in TimeGranularity: + if ( + granularity in sql_client.sql_engine_type.unsupported_granularities + or granularity.to_int() >= legacy_time_spine_grain.to_int() + ): + continue + time_spine_sources[granularity] = TimeSpineSource( + schema_name=mf_test_configuration.mf_source_schema, + table_name=f"{time_spine_base_table_name}_{granularity.value}", + time_column_name="ts", + time_column_granularity=granularity, + ) + + return time_spine_sources diff --git a/tests_metricflow/fixtures/source_table_snapshots/simple_model/dim_users.yaml b/tests_metricflow/fixtures/source_table_snapshots/simple_model/dim_users.yaml index f471960d30..430b76b49c 100644 --- a/tests_metricflow/fixtures/source_table_snapshots/simple_model/dim_users.yaml +++ b/tests_metricflow/fixtures/source_table_snapshots/simple_model/dim_users.yaml @@ -11,16 +11,25 @@ table_snapshot: type: STRING - name: home_state type: STRING + - name: last_profile_edit_ts + type: TIME + - name: bio_added_ts + type: TIME + - name: last_login_ts + type: TIME + - name: archived_at + type: TIME + rows: - - ["2020-01-01", "2020-01-01", "2019-03-03", "u0004114", "CA"] - - ["2020-01-01", "2020-01-01", "2019-04-03", "u1612112", "CA"] - - ["2020-01-01", "2020-01-01", "2017-03-03", "u0005432", "TX"] - - ["2020-01-01", "2020-01-01", "2013-03-03", "u0003452", "HI"] - - ["2020-01-01", "2020-01-01", "2014-03-03", "u0003154", "MD"] - - ["2020-01-01", "2020-01-01", "2015-03-03", "u0003141", "NY"] - - ["2020-01-02", "2020-01-02", "2019-03-03", "u0004114", "CA"] - - ["2020-01-02", "2020-01-02", "2019-04-03", "u1612112", "WA"] - - ["2020-01-02", "2020-01-02", "2017-03-03", "u0005432", "TX"] - - ["2020-01-02", "2020-01-02", "2013-03-03", "u0003452", "HI"] - - ["2020-01-02", "2020-01-02", "2014-03-03", "u0003154", "MD"] - - ["2020-01-02", "2020-01-02", "2015-03-03", "u0003141", "NY"] + - ["2020-01-01", "2020-01-01", "2019-03-03", "u0004114", "CA", "2020-01-01 00:00:00.000", "2020-01-01 00:00:00", "2020-01-01 00:00:00", "2020-01-01 01:00:00"] + - ["2020-01-01", "2020-01-01", "2019-04-03", "u1612112", "CA", "2020-01-01 00:00:00.001", "2020-01-01 00:00:01", "2020-01-01 00:01:00", "2020-01-01 02:00:00"] + - ["2020-01-01", "2020-01-01", "2017-03-03", "u0005432", "TX", "2020-01-01 00:00:00.002", "2020-01-01 00:00:02", "2020-01-01 00:02:00", "2020-01-01 03:00:00"] + - ["2020-01-01", "2020-01-01", "2013-03-03", "u0003452", "HI", "2020-01-01 00:00:00.003", "2020-01-01 00:00:03", "2020-01-01 00:03:00", "2020-01-01 04:00:00"] + - ["2020-01-01", "2020-01-01", "2014-03-03", "u0003154", "MD", "2020-01-01 00:00:00.004", "2020-01-01 00:00:04", "2020-01-01 00:04:00", "2020-01-01 05:00:00"] + - ["2020-01-01", "2020-01-01", "2015-03-03", "u0003141", "NY", "2020-01-01 00:00:00.005", "2020-01-01 00:00:05", "2020-01-01 00:05:00", "2020-01-01 06:00:00"] + - ["2020-01-02", "2020-01-02", "2019-03-03", "u0004114", "CA", "2020-01-01 00:00:00.006", "2020-01-01 00:00:06", "2020-01-01 00:06:00", "2020-01-01 07:00:00"] + - ["2020-01-02", "2020-01-02", "2019-04-03", "u1612112", "WA", "2020-01-01 00:00:00.007", "2020-01-01 00:00:07", "2020-01-01 00:07:00", "2020-01-01 08:00:00"] + - ["2020-01-02", "2020-01-02", "2017-03-03", "u0005432", "TX", "2020-01-01 00:00:00.008", "2020-01-01 00:00:08", "2020-01-01 00:08:00", "2020-01-01 09:00:00"] + - ["2020-01-02", "2020-01-02", "2013-03-03", "u0003452", "HI", "2020-01-01 00:00:00.009", "2020-01-01 00:00:09", "2020-01-01 00:09:00", "2020-01-01 10:00:00"] + - ["2020-01-02", "2020-01-02", "2014-03-03", "u0003154", "MD", "2020-01-01 00:00:00.010", "2020-01-01 00:00:10", "2020-01-01 00:10:00", "2020-01-01 11:00:00"] + - ["2020-01-02", "2020-01-02", "2015-03-03", "u0003141", "NY", "2020-01-01 00:00:00.011", "2020-01-01 00:00:11", "2020-01-01 00:11:00", "2020-01-01 12:00:00"] diff --git a/tests_metricflow/fixtures/source_table_snapshots/time_spine_table/mf_time_spine_hour.yaml b/tests_metricflow/fixtures/source_table_snapshots/time_spine_table/mf_time_spine_hour.yaml new file mode 100644 index 0000000000..fb56561d49 --- /dev/null +++ b/tests_metricflow/fixtures/source_table_snapshots/time_spine_table/mf_time_spine_hour.yaml @@ -0,0 +1,42 @@ +table_snapshot: + table_name: mf_time_spine_hour + column_definitions: + - name: ts + type: TIME + rows: + - ["2020-01-01 01:00:00"] + - ["2020-01-01 02:00:00"] + - ["2020-01-01 03:00:00"] + - ["2020-01-01 04:00:00"] + - ["2020-01-01 05:00:00"] + - ["2020-01-01 06:00:00"] + - ["2020-01-01 07:00:00"] + - ["2020-01-01 08:00:00"] + - ["2020-01-01 09:00:00"] + - ["2020-01-01 010:00:00"] + - ["2020-01-01 11:00:00"] + - ["2020-01-01 12:00:00"] + - ["2020-01-02 01:00:00"] + - ["2020-01-02 02:00:00"] + - ["2020-01-02 03:00:00"] + - ["2020-01-02 04:00:00"] + - ["2020-01-02 05:00:00"] + - ["2020-01-02 06:00:00"] + - ["2020-01-02 07:00:00"] + - ["2020-01-02 08:00:00"] + - ["2020-01-02 09:00:00"] + - ["2020-01-02 010:00:00"] + - ["2020-01-02 11:00:00"] + - ["2020-01-02 12:00:00"] + - ["2020-01-03 01:00:00"] + - ["2020-01-03 02:00:00"] + - ["2020-01-03 03:00:00"] + - ["2020-01-03 04:00:00"] + - ["2020-01-03 05:00:00"] + - ["2020-01-03 06:00:00"] + - ["2020-01-03 07:00:00"] + - ["2020-01-03 08:00:00"] + - ["2020-01-03 09:00:00"] + - ["2020-01-03 010:00:00"] + - ["2020-01-03 11:00:00"] + - ["2020-01-03 12:00:00"] diff --git a/tests_metricflow/fixtures/source_table_snapshots/time_spine_table/mf_time_spine_microsecond.yaml b/tests_metricflow/fixtures/source_table_snapshots/time_spine_table/mf_time_spine_microsecond.yaml new file mode 100644 index 0000000000..c009928882 --- /dev/null +++ b/tests_metricflow/fixtures/source_table_snapshots/time_spine_table/mf_time_spine_microsecond.yaml @@ -0,0 +1,37 @@ +table_snapshot: + table_name: mf_time_spine_microsecond + column_definitions: + - name: ts + type: TIME + rows: + - ["2020-01-01 00:00:00.000000"] + - ["2020-01-01 00:00:00.000001"] + - ["2020-01-01 00:00:00.000002"] + - ["2020-01-01 00:00:00.000003"] + - ["2020-01-01 00:00:00.000004"] + - ["2020-01-01 00:00:00.000005"] + - ["2020-01-01 00:00:00.000006"] + - ["2020-01-01 00:00:00.000007"] + - ["2020-01-01 00:00:00.000008"] + - ["2020-01-01 00:00:00.000009"] + - ["2020-01-01 00:00:00.000010"] + - ["2020-01-01 00:00:00.000011"] + - ["2020-01-01 00:00:00.000012"] + - ["2020-01-01 00:00:00.000013"] + - ["2020-01-01 00:00:00.000014"] + - ["2020-01-01 00:00:00.000015"] + - ["2020-01-01 00:00:00.000016"] + - ["2020-01-01 00:00:00.000017"] + - ["2020-01-01 00:00:00.000018"] + - ["2020-01-01 00:00:00.000019"] + - ["2020-01-01 00:00:00.000020"] + - ["2020-01-01 00:00:00.000021"] + - ["2020-01-01 00:00:00.000022"] + - ["2020-01-01 00:00:00.000023"] + - ["2020-01-01 00:00:00.000024"] + - ["2020-01-01 00:00:00.000025"] + - ["2020-01-01 00:00:00.000026"] + - ["2020-01-01 00:00:00.000027"] + - ["2020-01-01 00:00:00.000028"] + - ["2020-01-01 00:00:00.000029"] + - ["2020-01-01 00:00:00.000030"] diff --git a/tests_metricflow/fixtures/source_table_snapshots/time_spine_table/mf_time_spine_millisecond.yaml b/tests_metricflow/fixtures/source_table_snapshots/time_spine_table/mf_time_spine_millisecond.yaml new file mode 100644 index 0000000000..4853717090 --- /dev/null +++ b/tests_metricflow/fixtures/source_table_snapshots/time_spine_table/mf_time_spine_millisecond.yaml @@ -0,0 +1,36 @@ +table_snapshot: + table_name: mf_time_spine_millisecond + column_definitions: + - name: ts + type: TIME + rows: + - ["2020-01-01 00:00:00.001"] + - ["2020-01-01 00:00:00.002"] + - ["2020-01-01 00:00:00.003"] + - ["2020-01-01 00:00:00.004"] + - ["2020-01-01 00:00:00.005"] + - ["2020-01-01 00:00:00.006"] + - ["2020-01-01 00:00:00.007"] + - ["2020-01-01 00:00:00.008"] + - ["2020-01-01 00:00:00.009"] + - ["2020-01-01 00:00:00.010"] + - ["2020-01-01 00:00:00.011"] + - ["2020-01-01 00:00:00.012"] + - ["2020-01-01 00:00:00.013"] + - ["2020-01-01 00:00:00.014"] + - ["2020-01-01 00:00:00.015"] + - ["2020-01-01 00:00:00.016"] + - ["2020-01-01 00:00:00.017"] + - ["2020-01-01 00:00:00.018"] + - ["2020-01-01 00:00:00.019"] + - ["2020-01-01 00:00:00.020"] + - ["2020-01-01 00:00:00.021"] + - ["2020-01-01 00:00:00.022"] + - ["2020-01-01 00:00:00.023"] + - ["2020-01-01 00:00:00.024"] + - ["2020-01-01 00:00:00.025"] + - ["2020-01-01 00:00:00.026"] + - ["2020-01-01 00:00:00.027"] + - ["2020-01-01 00:00:00.028"] + - ["2020-01-01 00:00:00.029"] + - ["2020-01-01 00:00:00.030"] diff --git a/tests_metricflow/fixtures/source_table_snapshots/time_spine_table/mf_time_spine_minute.yaml b/tests_metricflow/fixtures/source_table_snapshots/time_spine_table/mf_time_spine_minute.yaml new file mode 100644 index 0000000000..063038276c --- /dev/null +++ b/tests_metricflow/fixtures/source_table_snapshots/time_spine_table/mf_time_spine_minute.yaml @@ -0,0 +1,37 @@ +table_snapshot: + table_name: mf_time_spine_minute + column_definitions: + - name: ts + type: TIME + rows: + - ["2020-01-01 00:00:00"] + - ["2020-01-01 00:01:00"] + - ["2020-01-01 00:02:00"] + - ["2020-01-01 00:03:00"] + - ["2020-01-01 00:04:00"] + - ["2020-01-01 00:05:00"] + - ["2020-01-01 00:06:00"] + - ["2020-01-01 00:07:00"] + - ["2020-01-01 00:08:00"] + - ["2020-01-01 00:09:00"] + - ["2020-01-01 00:10:00"] + - ["2020-01-01 00:11:00"] + - ["2020-01-01 00:12:00"] + - ["2020-01-01 00:13:00"] + - ["2020-01-01 00:14:00"] + - ["2020-01-01 00:15:00"] + - ["2020-01-01 00:16:00"] + - ["2020-01-01 00:17:00"] + - ["2020-01-01 00:18:00"] + - ["2020-01-01 00:19:00"] + - ["2020-01-01 00:20:00"] + - ["2020-01-01 00:21:00"] + - ["2020-01-01 00:22:00"] + - ["2020-01-01 00:23:00"] + - ["2020-01-01 00:24:00"] + - ["2020-01-01 00:25:00"] + - ["2020-01-01 00:26:00"] + - ["2020-01-01 00:27:00"] + - ["2020-01-01 00:28:00"] + - ["2020-01-01 00:29:00"] + - ["2020-01-01 00:30:00"] diff --git a/tests_metricflow/fixtures/source_table_snapshots/time_spine_table/mf_time_spine_nanosecond.yaml b/tests_metricflow/fixtures/source_table_snapshots/time_spine_table/mf_time_spine_nanosecond.yaml new file mode 100644 index 0000000000..e63ddd16ad --- /dev/null +++ b/tests_metricflow/fixtures/source_table_snapshots/time_spine_table/mf_time_spine_nanosecond.yaml @@ -0,0 +1,36 @@ +table_snapshot: + table_name: mf_time_spine_nanosecond + column_definitions: + - name: ts + type: TIME + rows: + - ["2020-01-01 00:00:00.000000001"] + - ["2020-01-01 00:00:00.000000002"] + - ["2020-01-01 00:00:00.000000003"] + - ["2020-01-01 00:00:00.000000004"] + - ["2020-01-01 00:00:00.000000005"] + - ["2020-01-01 00:00:00.000000006"] + - ["2020-01-01 00:00:00.000000007"] + - ["2020-01-01 00:00:00.000000008"] + - ["2020-01-01 00:00:00.000000009"] + - ["2020-01-01 00:00:00.000000010"] + - ["2020-01-01 00:00:00.000000011"] + - ["2020-01-01 00:00:00.000000012"] + - ["2020-01-01 00:00:00.000000013"] + - ["2020-01-01 00:00:00.000000014"] + - ["2020-01-01 00:00:00.000000015"] + - ["2020-01-01 00:00:00.000000016"] + - ["2020-01-01 00:00:00.000000017"] + - ["2020-01-01 00:00:00.000000018"] + - ["2020-01-01 00:00:00.000000019"] + - ["2020-01-01 00:00:00.000000020"] + - ["2020-01-01 00:00:00.000000021"] + - ["2020-01-01 00:00:00.000000022"] + - ["2020-01-01 00:00:00.000000023"] + - ["2020-01-01 00:00:00.000000024"] + - ["2020-01-01 00:00:00.000000025"] + - ["2020-01-01 00:00:00.000000026"] + - ["2020-01-01 00:00:00.000000027"] + - ["2020-01-01 00:00:00.000000028"] + - ["2020-01-01 00:00:00.000000029"] + - ["2020-01-01 00:00:00.000000030"] diff --git a/tests_metricflow/fixtures/source_table_snapshots/time_spine_table/mf_time_spine_second.yaml b/tests_metricflow/fixtures/source_table_snapshots/time_spine_table/mf_time_spine_second.yaml new file mode 100644 index 0000000000..5d1d193481 --- /dev/null +++ b/tests_metricflow/fixtures/source_table_snapshots/time_spine_table/mf_time_spine_second.yaml @@ -0,0 +1,36 @@ +table_snapshot: + table_name: mf_time_spine_second + column_definitions: + - name: ts + type: TIME + rows: + - ["2020-01-01 00:00:01"] + - ["2020-01-01 00:00:02"] + - ["2020-01-01 00:00:03"] + - ["2020-01-01 00:00:04"] + - ["2020-01-01 00:00:05"] + - ["2020-01-01 00:00:06"] + - ["2020-01-01 00:00:07"] + - ["2020-01-01 00:00:08"] + - ["2020-01-01 00:00:09"] + - ["2020-01-01 00:00:10"] + - ["2020-01-01 00:00:11"] + - ["2020-01-01 00:00:12"] + - ["2020-01-01 00:00:13"] + - ["2020-01-01 00:00:14"] + - ["2020-01-01 00:00:15"] + - ["2020-01-01 00:00:16"] + - ["2020-01-01 00:00:17"] + - ["2020-01-01 00:00:18"] + - ["2020-01-01 00:00:19"] + - ["2020-01-01 00:00:20"] + - ["2020-01-01 00:00:21"] + - ["2020-01-01 00:00:22"] + - ["2020-01-01 00:00:23"] + - ["2020-01-01 00:00:24"] + - ["2020-01-01 00:00:25"] + - ["2020-01-01 00:00:26"] + - ["2020-01-01 00:00:27"] + - ["2020-01-01 00:00:28"] + - ["2020-01-01 00:00:29"] + - ["2020-01-01 00:00:30"] diff --git a/tests_metricflow/integration/conftest.py b/tests_metricflow/integration/conftest.py index 7fef0e7567..5c0da3bdb1 100644 --- a/tests_metricflow/integration/conftest.py +++ b/tests_metricflow/integration/conftest.py @@ -1,9 +1,11 @@ from __future__ import annotations from dataclasses import dataclass +from typing import Mapping import pytest from dbt_semantic_interfaces.test_utils import as_datetime +from dbt_semantic_interfaces.type_enums.time_granularity import TimeGranularity from metricflow_semantics.model.semantic_manifest_lookup import SemanticManifestLookup from metricflow_semantics.specs.dunder_column_association_resolver import DunderColumnAssociationResolver from metricflow_semantics.test_helpers.config_helpers import MetricFlowTestConfiguration @@ -29,7 +31,7 @@ def it_helpers( # noqa: D103 sql_client: SqlClient, create_source_tables: bool, simple_semantic_manifest_lookup: SemanticManifestLookup, - time_spine_source: TimeSpineSource, + time_spine_sources: Mapping[TimeGranularity, TimeSpineSource], mf_test_configuration: MetricFlowTestConfiguration, ) -> IntegrationTestHelpers: return IntegrationTestHelpers( diff --git a/tests_metricflow/integration/test_cases/itest_dimensions.yaml b/tests_metricflow/integration/test_cases/itest_dimensions.yaml index 7cc89a5b43..54d6632927 100644 --- a/tests_metricflow/integration/test_cases/itest_dimensions.yaml +++ b/tests_metricflow/integration/test_cases/itest_dimensions.yaml @@ -370,3 +370,27 @@ integration_test: ) outer_subq WHERE listing__bookings > 2 GROUP BY listing +--- +integration_test: + name: sub_daily_metric_time + description: Query metric_time alone with a sub-daily granularity + model: SIMPLE_MODEL + group_bys: ["metric_time__hour"] + check_query: | + SELECT + {{ render_date_trunc("ts", TimeGranularity.HOUR) }} AS metric_time__hour + FROM {{ source_schema }}.mf_time_spine_hour + GROUP BY + {{ render_date_trunc("ts", TimeGranularity.HOUR) }} +--- +integration_test: + name: sub_daily_time_dimension + description: Query a time dimension alone with a sub-daily granularity + model: SIMPLE_MODEL + group_bys: ["user__bio_added_ts__second"] + check_query: | + SELECT + {{ render_date_trunc("bio_added_ts", TimeGranularity.SECOND) }} AS user__bio_added_ts__second + FROM {{ source_schema }}.dim_users + GROUP BY + {{ render_date_trunc("bio_added_ts", TimeGranularity.SECOND) }} diff --git a/tests_metricflow/integration/test_cases/itest_metrics.yaml b/tests_metricflow/integration/test_cases/itest_metrics.yaml index 7c6e96f8f6..52b805f9ea 100644 --- a/tests_metricflow/integration/test_cases/itest_metrics.yaml +++ b/tests_metricflow/integration/test_cases/itest_metrics.yaml @@ -2215,15 +2215,3 @@ integration_test: GROUP BY {{ render_date_trunc("ds", TimeGranularity.DAY) }} ) a ON b.ds = a.ds WHERE {{ render_between_time_constraint("b.ds", "2020-01-03", "2020-01-03") }} ---- -integration_test: - name: metric_time_filter_on_input_metric - description: Test a metric with a filter defined on its input metric. - model: SIMPLE_MODEL - metrics: ["bookings_between_dec_18_2019_and_dec_20_2019"] - check_query: | - SELECT - SUM(1) AS bookings_between_dec_18_2019_and_dec_20_2019 - FROM {{ source_schema }}.fct_bookings - WHERE ({{ render_date_trunc("ds", TimeGranularity.DAY) }} < '2012-12-20') - AND ({{ render_date_trunc("ds", TimeGranularity.WEEK) }} > '2019-12-18') diff --git a/tests_metricflow/integration/test_configured_cases.py b/tests_metricflow/integration/test_configured_cases.py index 2193c9d1d5..1a781ebdf9 100644 --- a/tests_metricflow/integration/test_configured_cases.py +++ b/tests_metricflow/integration/test_configured_cases.py @@ -235,13 +235,14 @@ def test_case( name: str, mf_test_configuration: MetricFlowTestConfiguration, mf_engine_test_fixture_mapping: Mapping[SemanticManifestSetup, MetricFlowEngineTestFixture], - time_spine_source: TimeSpineSource, + time_spine_sources: Mapping[TimeGranularity, TimeSpineSource], sql_client: SqlClient, create_source_tables: bool, ) -> None: """Runs all integration tests configured in the test case YAML directory.""" case = CONFIGURED_INTEGRATION_TESTS_REPOSITORY.get_test_case(name) logger.info(f"Running integration test case: '{case.name}' from file '{case.file_path}'") + time_spine_source = time_spine_sources[TimeGranularity.DAY] missing_required_features = filter_not_supported_features(sql_client, case.required_features) if missing_required_features: diff --git a/tests_metricflow/query_rendering/compare_rendered_query.py b/tests_metricflow/query_rendering/compare_rendered_query.py index b1651a9cac..c0ce374111 100644 --- a/tests_metricflow/query_rendering/compare_rendered_query.py +++ b/tests_metricflow/query_rendering/compare_rendered_query.py @@ -23,10 +23,10 @@ def render_and_check( dataflow_to_sql_converter: DataflowToSqlQueryPlanConverter, sql_client: SqlClient, query_spec: MetricFlowQuerySpec, - is_distinct_values_plan: bool = False, ) -> None: """Renders an engine-specific query output from a given query, in both basic and optimized forms.""" # Build and convert dataflow plan without optimizers + is_distinct_values_plan = not query_spec.metric_specs if is_distinct_values_plan: base_plan = dataflow_plan_builder.build_plan_for_distinct_values(query_spec=query_spec) else: diff --git a/tests_metricflow/query_rendering/test_granularity_date_part_rendering.py b/tests_metricflow/query_rendering/test_granularity_date_part_rendering.py index ef9ba71f0b..d675db12b1 100644 --- a/tests_metricflow/query_rendering/test_granularity_date_part_rendering.py +++ b/tests_metricflow/query_rendering/test_granularity_date_part_rendering.py @@ -8,10 +8,12 @@ import pytest from _pytest.fixtures import FixtureRequest +from dbt_semantic_interfaces.references import EntityReference from dbt_semantic_interfaces.type_enums.date_part import DatePart from dbt_semantic_interfaces.type_enums.time_granularity import TimeGranularity from metricflow_semantics.specs.metric_spec import MetricSpec from metricflow_semantics.specs.query_spec import MetricFlowQuerySpec +from metricflow_semantics.specs.time_dimension_spec import TimeDimensionSpec from metricflow_semantics.test_helpers.config_helpers import MetricFlowTestConfiguration from metricflow.dataflow.builder.dataflow_plan_builder import DataflowPlanBuilder @@ -99,3 +101,53 @@ def test_offset_window_with_date_part( # noqa: D103 dataflow_plan_builder=dataflow_plan_builder, query_spec=query_spec, ) + + +@pytest.mark.sql_engine_snapshot +def test_sub_daily_metric_time( # noqa: D103 + request: FixtureRequest, + mf_test_configuration: MetricFlowTestConfiguration, + dataflow_plan_builder: DataflowPlanBuilder, + dataflow_to_sql_converter: DataflowToSqlQueryPlanConverter, + sql_client: SqlClient, +) -> None: + query_spec = MetricFlowQuerySpec( + time_dimension_specs=(DataSet.metric_time_dimension_spec(time_granularity=TimeGranularity.MILLISECOND),), + ) + + render_and_check( + request=request, + mf_test_configuration=mf_test_configuration, + dataflow_to_sql_converter=dataflow_to_sql_converter, + sql_client=sql_client, + dataflow_plan_builder=dataflow_plan_builder, + query_spec=query_spec, + ) + + +@pytest.mark.sql_engine_snapshot +def test_sub_daily_dimension( # noqa: D103 + request: FixtureRequest, + mf_test_configuration: MetricFlowTestConfiguration, + dataflow_plan_builder: DataflowPlanBuilder, + dataflow_to_sql_converter: DataflowToSqlQueryPlanConverter, + sql_client: SqlClient, +) -> None: + query_spec = MetricFlowQuerySpec( + time_dimension_specs=( + TimeDimensionSpec( + element_name="bio_added_ts", + time_granularity=TimeGranularity.SECOND, + entity_links=(EntityReference("user"),), + ), + ), + ) + + render_and_check( + request=request, + mf_test_configuration=mf_test_configuration, + dataflow_to_sql_converter=dataflow_to_sql_converter, + sql_client=sql_client, + dataflow_plan_builder=dataflow_plan_builder, + query_spec=query_spec, + ) diff --git a/tests_metricflow/query_rendering/test_metric_filter_rendering.py b/tests_metricflow/query_rendering/test_metric_filter_rendering.py index 0cd3728c32..a2ce2e2e6d 100644 --- a/tests_metricflow/query_rendering/test_metric_filter_rendering.py +++ b/tests_metricflow/query_rendering/test_metric_filter_rendering.py @@ -226,7 +226,6 @@ def test_distinct_values_query_with_metric_filter( sql_client=sql_client, dataflow_plan_builder=dataflow_plan_builder, query_spec=query_spec, - is_distinct_values_plan=True, ) diff --git a/tests_metricflow/query_rendering/test_query_rendering.py b/tests_metricflow/query_rendering/test_query_rendering.py index 26a02adce5..b96c5786d2 100644 --- a/tests_metricflow/query_rendering/test_query_rendering.py +++ b/tests_metricflow/query_rendering/test_query_rendering.py @@ -178,7 +178,6 @@ def test_distinct_values( sql_client=sql_client, dataflow_plan_builder=dataflow_plan_builder, query_spec=query_spec, - is_distinct_values_plan=True, ) @@ -457,7 +456,6 @@ def test_min_max_only_categorical( sql_client=sql_client, dataflow_plan_builder=dataflow_plan_builder, query_spec=query_spec, - is_distinct_values_plan=True, ) @@ -488,7 +486,6 @@ def test_min_max_only_time( sql_client=sql_client, dataflow_plan_builder=dataflow_plan_builder, query_spec=query_spec, - is_distinct_values_plan=True, ) @@ -519,7 +516,6 @@ def test_min_max_only_time_quarter( sql_client=sql_client, dataflow_plan_builder=dataflow_plan_builder, query_spec=query_spec, - is_distinct_values_plan=True, ) @@ -544,7 +540,6 @@ def test_min_max_metric_time( sql_client=sql_client, dataflow_plan_builder=dataflow_plan_builder, query_spec=query_spec, - is_distinct_values_plan=True, ) @@ -569,5 +564,4 @@ def test_min_max_metric_time_week( sql_client=sql_client, dataflow_plan_builder=dataflow_plan_builder, query_spec=query_spec, - is_distinct_values_plan=True, ) diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_count_with_no_group_by__plan0.xml b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_count_with_no_group_by__plan0.xml index b192c249c4..433ca59f13 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_count_with_no_group_by__plan0.xml +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_count_with_no_group_by__plan0.xml @@ -244,138 +244,138 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -699,147 +699,147 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.xml b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.xml index 4bc0b4751a..e68ffaf1c3 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.xml +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.xml @@ -326,147 +326,147 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -865,147 +865,147 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate__plan0.xml b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate__plan0.xml index e084fc9484..5b8f534958 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate__plan0.xml +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate__plan0.xml @@ -272,138 +272,138 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -758,147 +758,147 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate_with_constant_properties__plan0.xml b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate_with_constant_properties__plan0.xml index 38e58f30c1..e25cc35467 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate_with_constant_properties__plan0.xml +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate_with_constant_properties__plan0.xml @@ -295,138 +295,138 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -818,147 +818,147 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate_with_no_group_by__plan0.xml b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate_with_no_group_by__plan0.xml index 394fb65ee4..8ac0024a40 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate_with_no_group_by__plan0.xml +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate_with_no_group_by__plan0.xml @@ -247,138 +247,138 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -702,147 +702,147 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate_with_window__plan0.xml b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate_with_window__plan0.xml index b1810bd898..aa50779402 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate_with_window__plan0.xml +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate_with_window__plan0.xml @@ -295,138 +295,138 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -806,147 +806,147 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/tests_metricflow/snapshots/test_cyclic_join.py/DataflowPlan/test_cyclic_join__dfp_0.xml b/tests_metricflow/snapshots/test_cyclic_join.py/DataflowPlan/test_cyclic_join__dfp_0.xml index e913b52a4b..ae541e136e 100644 --- a/tests_metricflow/snapshots/test_cyclic_join.py/DataflowPlan/test_cyclic_join__dfp_0.xml +++ b/tests_metricflow/snapshots/test_cyclic_join.py/DataflowPlan/test_cyclic_join__dfp_0.xml @@ -36,11 +36,11 @@ - + - + @@ -53,7 +53,7 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_common_semantic_model__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_common_semantic_model__dfp_0.xml index 0fe093d825..fef8f21032 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_common_semantic_model__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_common_semantic_model__dfp_0.xml @@ -42,11 +42,11 @@ - + - + @@ -59,11 +59,11 @@ - + - + @@ -110,11 +110,11 @@ - + - + @@ -127,11 +127,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_no_window_or_grain_with_metric_time__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_no_window_or_grain_with_metric_time__dfp_0.xml index 914569e512..bf54d2fce4 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_no_window_or_grain_with_metric_time__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_no_window_or_grain_with_metric_time__dfp_0.xml @@ -22,11 +22,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_no_window_or_grain_without_metric_time__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_no_window_or_grain_without_metric_time__dfp_0.xml index 33f9fc76f8..0db2f56fd7 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_no_window_or_grain_without_metric_time__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_no_window_or_grain_without_metric_time__dfp_0.xml @@ -16,11 +16,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_with_non_default_grain__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_with_non_default_grain__dfp_0.xml index 4352536fd0..67442fc6af 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_with_non_default_grain__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_with_non_default_grain__dfp_0.xml @@ -34,11 +34,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_with_window__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_with_window__dfp_0.xml index 1283d92943..244821dae7 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_with_window__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_with_window__dfp_0.xml @@ -23,11 +23,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_cumulative_metric_with_non_default_grain__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_cumulative_metric_with_non_default_grain__dfp_0.xml index e7e2471f97..bdae25ff6b 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_cumulative_metric_with_non_default_grain__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_cumulative_metric_with_non_default_grain__dfp_0.xml @@ -38,11 +38,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_to_grain__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_to_grain__dfp_0.xml index bc7da98f3e..1e6217f25c 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_to_grain__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_to_grain__dfp_0.xml @@ -24,11 +24,11 @@ - + - + @@ -61,11 +61,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_window__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_window__dfp_0.xml index b7b0209d66..f1a363e216 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_window__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_window__dfp_0.xml @@ -36,11 +36,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_with_granularity__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_with_granularity__dfp_0.xml index d9ca9b4480..91f4aac2d3 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_with_granularity__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_with_granularity__dfp_0.xml @@ -36,11 +36,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_offset_cumulative_metric__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_offset_cumulative_metric__dfp_0.xml index 30aa24a5f4..67373508a6 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_offset_cumulative_metric__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_offset_cumulative_metric__dfp_0.xml @@ -42,11 +42,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_dimensions_with_time_constraint__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_dimensions_with_time_constraint__dfp_0.xml index 415f19bcf2..18a280f887 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_dimensions_with_time_constraint__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_dimensions_with_time_constraint__dfp_0.xml @@ -21,7 +21,7 @@ - + @@ -31,11 +31,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan__dfp_0.xml index 4096dc93bd..1e8196b582 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan__dfp_0.xml @@ -67,7 +67,7 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan_with_join__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan_with_join__dfp_0.xml index 90f3ed7004..8ca7a32b85 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan_with_join__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan_with_join__dfp_0.xml @@ -81,7 +81,7 @@ - + @@ -92,7 +92,7 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_dont_join_to_time_spine_if_no_time_dimension_requested__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_dont_join_to_time_spine_if_no_time_dimension_requested__dfp_0.xml index ca3d0e8227..7760e7b9c3 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_dont_join_to_time_spine_if_no_time_dimension_requested__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_dont_join_to_time_spine_if_no_time_dimension_requested__dfp_0.xml @@ -16,11 +16,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_derived_metric__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_derived_metric__dfp_0.xml index b0302f1ac3..3ecf955c35 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_derived_metric__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_derived_metric__dfp_0.xml @@ -34,11 +34,11 @@ - + - + @@ -86,11 +86,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_filters__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_filters__dfp_0.xml index 621594973f..668ed3edad 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_filters__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_filters__dfp_0.xml @@ -147,11 +147,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_metric_time__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_metric_time__dfp_0.xml index 7cab7e01e1..8894c05413 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_metric_time__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_metric_time__dfp_0.xml @@ -27,11 +27,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_non_metric_time__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_non_metric_time__dfp_0.xml index 5b498724ca..e176f164e6 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_non_metric_time__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_non_metric_time__dfp_0.xml @@ -22,11 +22,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_joined_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_joined_plan__dfp_0.xml index 227386e31b..dd95dca8e0 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_joined_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_joined_plan__dfp_0.xml @@ -47,11 +47,11 @@ - + - + @@ -64,11 +64,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_limit_rows_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_limit_rows_plan__dfp_0.xml index e0db8bfde2..58fe24e376 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_limit_rows_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_limit_rows_plan__dfp_0.xml @@ -21,11 +21,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_plan__dfp_0.xml index 8aaf8772a7..01ef085957 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_plan__dfp_0.xml @@ -162,12 +162,12 @@ - + - + @@ -180,12 +180,12 @@ - + - + @@ -348,12 +348,12 @@ - + - + @@ -366,12 +366,12 @@ - + - + @@ -397,11 +397,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_with_reused_measure_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_with_reused_measure_plan__dfp_0.xml index 94c67d5965..e186ee1481 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_with_reused_measure_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_with_reused_measure_plan__dfp_0.xml @@ -124,11 +124,11 @@ - + - + @@ -152,11 +152,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_in_metric_where_filter__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_in_metric_where_filter__dfp_0.xml index 010e620781..355d69e546 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_in_metric_where_filter__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_in_metric_where_filter__dfp_0.xml @@ -67,11 +67,11 @@ - + - + @@ -102,12 +102,12 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_in_query_where_filter__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_in_query_where_filter__dfp_0.xml index b0a31a473c..26a64602d6 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_in_query_where_filter__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_in_query_where_filter__dfp_0.xml @@ -93,11 +93,11 @@ - + - + @@ -128,12 +128,12 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_only__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_only__dfp_0.xml index 66cab34841..0d0b8c95fe 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_only__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_only__dfp_0.xml @@ -9,11 +9,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_quarter__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_quarter__dfp_0.xml index 8681109851..a7ec17768a 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_quarter__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_quarter__dfp_0.xml @@ -9,11 +9,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_with_other_dimensions__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_with_other_dimensions__dfp_0.xml index d57c92a51c..c98504cdc4 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_with_other_dimensions__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_with_other_dimensions__dfp_0.xml @@ -27,7 +27,7 @@ - + @@ -38,11 +38,11 @@ - + - + @@ -55,7 +55,7 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_metric_time__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_metric_time__dfp_0.xml index 72b29b2006..527a7bd36b 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_metric_time__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_metric_time__dfp_0.xml @@ -12,11 +12,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_metric_time_week__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_metric_time_week__dfp_0.xml index 5a86800a4e..61fd7ad0b7 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_metric_time_week__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_metric_time_week__dfp_0.xml @@ -12,11 +12,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_categorical__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_categorical__dfp_0.xml index 86684220f1..5886aada0e 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_categorical__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_categorical__dfp_0.xml @@ -16,7 +16,7 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_time__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_time__dfp_0.xml index 758d3d0c59..16301f285f 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_time__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_time__dfp_0.xml @@ -17,7 +17,7 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_time_year__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_time_year__dfp_0.xml index 724432836d..7f4200ead4 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_time_year__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_time_year__dfp_0.xml @@ -17,7 +17,7 @@ - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multi_semantic_model_ratio_metrics_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multi_semantic_model_ratio_metrics_plan__dfp_0.xml index b29c93a7e8..4f2fe013fa 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multi_semantic_model_ratio_metrics_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multi_semantic_model_ratio_metrics_plan__dfp_0.xml @@ -47,11 +47,11 @@ - + - + @@ -64,11 +64,11 @@ - + - + @@ -115,11 +115,11 @@ - + - + @@ -132,11 +132,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multihop_join_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multihop_join_plan__dfp_0.xml index f53e7c0ce1..25d62e8faa 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multihop_join_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multihop_join_plan__dfp_0.xml @@ -52,11 +52,11 @@ - + - + @@ -97,11 +97,11 @@ - + - + @@ -328,11 +328,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multiple_metrics_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multiple_metrics_plan__dfp_0.xml index d2867a667f..439a216e2e 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multiple_metrics_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multiple_metrics_plan__dfp_0.xml @@ -25,11 +25,11 @@ - + - + @@ -57,11 +57,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_nested_derived_metric_with_outer_offset__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_nested_derived_metric_with_outer_offset__dfp_0.xml index 83552ed2f4..278978a74c 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_nested_derived_metric_with_outer_offset__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_nested_derived_metric_with_outer_offset__dfp_0.xml @@ -53,11 +53,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_to_grain_metric_filter_and_query_have_different_granularities__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_to_grain_metric_filter_and_query_have_different_granularities__dfp_0.xml index ba790537f8..22af651f78 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_to_grain_metric_filter_and_query_have_different_granularities__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_to_grain_metric_filter_and_query_have_different_granularities__dfp_0.xml @@ -146,11 +146,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_window_metric_filter_and_query_have_different_granularities__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_window_metric_filter_and_query_have_different_granularities__dfp_0.xml index f013299c7a..0d99a4a2e3 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_window_metric_filter_and_query_have_different_granularities__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_window_metric_filter_and_query_have_different_granularities__dfp_0.xml @@ -150,11 +150,11 @@ - + - + @@ -258,11 +258,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_order_by_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_order_by_plan__dfp_0.xml index 7ba932194b..3354f7bf20 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_order_by_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_order_by_plan__dfp_0.xml @@ -27,11 +27,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_primary_entity_dimension__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_primary_entity_dimension__dfp_0.xml index cf479cd665..39c81616f4 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_primary_entity_dimension__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_primary_entity_dimension__dfp_0.xml @@ -21,11 +21,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_simple_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_simple_plan__dfp_0.xml index cf479cd665..39c81616f4 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_simple_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_simple_plan__dfp_0.xml @@ -21,11 +21,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_single_semantic_model_ratio_metrics_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_single_semantic_model_ratio_metrics_plan__dfp_0.xml index 959067757b..61675b49ee 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_single_semantic_model_ratio_metrics_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_single_semantic_model_ratio_metrics_plan__dfp_0.xml @@ -47,11 +47,11 @@ - + - + @@ -64,11 +64,11 @@ - + - + @@ -115,11 +115,11 @@ - + - + @@ -132,11 +132,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan__dfp_0.xml index 6478d60801..55109326af 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan__dfp_0.xml @@ -163,11 +163,11 @@ - + - + @@ -180,11 +180,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan_time_dimension__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan_time_dimension__dfp_0.xml index 4fe0d5461f..4226540ce0 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan_time_dimension__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan_time_dimension__dfp_0.xml @@ -102,11 +102,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_with_common_linkable_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_with_common_linkable_plan__dfp_0.xml index 7109d76f6d..4c900a8ec5 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_with_common_linkable_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_with_common_linkable_plan__dfp_0.xml @@ -141,11 +141,11 @@ - + - + @@ -158,11 +158,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.xml index ca0dff00ec..f9aa2ddda0 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.xml @@ -2188,242 +2188,242 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_dimension_with_joined_where_constraint__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_dimension_with_joined_where_constraint__plan0.xml index a25452a9ea..0a1d09c6ae 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_dimension_with_joined_where_constraint__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_dimension_with_joined_where_constraint__plan0.xml @@ -671,126 +671,126 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_dimensions_requiring_join__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_dimensions_requiring_join__plan0.xml index 83134e8bfd..b1a70ffcf0 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_dimensions_requiring_join__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_dimensions_requiring_join__plan0.xml @@ -428,115 +428,115 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/test_dimension_values_with_a_join_and_a_filter__plan0.xml b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/test_dimension_values_with_a_join_and_a_filter__plan0.xml index ff2c1449de..b63265b985 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/test_dimension_values_with_a_join_and_a_filter__plan0.xml +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/test_dimension_values_with_a_join_and_a_filter__plan0.xml @@ -675,126 +675,126 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/test_dimensions_requiring_join__plan0.xml b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/test_dimensions_requiring_join__plan0.xml index 83134e8bfd..b1a70ffcf0 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/test_dimensions_requiring_join__plan0.xml +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/test_dimensions_requiring_join__plan0.xml @@ -428,115 +428,115 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_dimension__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_dimension__plan0.sql new file mode 100644 index 0000000000..eb3bf092ab --- /dev/null +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_dimension__plan0.sql @@ -0,0 +1,187 @@ +-- Pass Only Elements: ['user__bio_added_ts__second',] +SELECT + subq_0.user__bio_added_ts__second +FROM ( + -- Read Elements From Semantic Model 'users_ds_source' + SELECT + DATETIME_TRUNC(users_ds_source_src_28000.ds, day) AS ds__day + , DATETIME_TRUNC(users_ds_source_src_28000.ds, isoweek) AS ds__week + , DATETIME_TRUNC(users_ds_source_src_28000.ds, month) AS ds__month + , DATETIME_TRUNC(users_ds_source_src_28000.ds, quarter) AS ds__quarter + , DATETIME_TRUNC(users_ds_source_src_28000.ds, year) AS ds__year + , EXTRACT(year FROM users_ds_source_src_28000.ds) AS ds__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.ds) AS ds__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.ds) AS ds__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.ds) AS ds__extract_day + , IF(EXTRACT(dayofweek FROM users_ds_source_src_28000.ds) = 1, 7, EXTRACT(dayofweek FROM users_ds_source_src_28000.ds) - 1) AS ds__extract_dow + , EXTRACT(dayofyear FROM users_ds_source_src_28000.ds) AS ds__extract_doy + , DATETIME_TRUNC(users_ds_source_src_28000.created_at, day) AS created_at__day + , DATETIME_TRUNC(users_ds_source_src_28000.created_at, isoweek) AS created_at__week + , DATETIME_TRUNC(users_ds_source_src_28000.created_at, month) AS created_at__month + , DATETIME_TRUNC(users_ds_source_src_28000.created_at, quarter) AS created_at__quarter + , DATETIME_TRUNC(users_ds_source_src_28000.created_at, year) AS created_at__year + , EXTRACT(year FROM users_ds_source_src_28000.created_at) AS created_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.created_at) AS created_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.created_at) AS created_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.created_at) AS created_at__extract_day + , IF(EXTRACT(dayofweek FROM users_ds_source_src_28000.created_at) = 1, 7, EXTRACT(dayofweek FROM users_ds_source_src_28000.created_at) - 1) AS created_at__extract_dow + , EXTRACT(dayofyear FROM users_ds_source_src_28000.created_at) AS created_at__extract_doy + , DATETIME_TRUNC(users_ds_source_src_28000.ds_partitioned, day) AS ds_partitioned__day + , DATETIME_TRUNC(users_ds_source_src_28000.ds_partitioned, isoweek) AS ds_partitioned__week + , DATETIME_TRUNC(users_ds_source_src_28000.ds_partitioned, month) AS ds_partitioned__month + , DATETIME_TRUNC(users_ds_source_src_28000.ds_partitioned, quarter) AS ds_partitioned__quarter + , DATETIME_TRUNC(users_ds_source_src_28000.ds_partitioned, year) AS ds_partitioned__year + , EXTRACT(year FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_day + , IF(EXTRACT(dayofweek FROM users_ds_source_src_28000.ds_partitioned) = 1, 7, EXTRACT(dayofweek FROM users_ds_source_src_28000.ds_partitioned) - 1) AS ds_partitioned__extract_dow + , EXTRACT(dayofyear FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_doy + , users_ds_source_src_28000.home_state + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, millisecond) AS last_profile_edit_ts__millisecond + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, second) AS last_profile_edit_ts__second + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, minute) AS last_profile_edit_ts__minute + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, hour) AS last_profile_edit_ts__hour + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, day) AS last_profile_edit_ts__day + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, isoweek) AS last_profile_edit_ts__week + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, month) AS last_profile_edit_ts__month + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, quarter) AS last_profile_edit_ts__quarter + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, year) AS last_profile_edit_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_day + , IF(EXTRACT(dayofweek FROM users_ds_source_src_28000.last_profile_edit_ts) = 1, 7, EXTRACT(dayofweek FROM users_ds_source_src_28000.last_profile_edit_ts) - 1) AS last_profile_edit_ts__extract_dow + , EXTRACT(dayofyear FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_doy + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, second) AS bio_added_ts__second + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, minute) AS bio_added_ts__minute + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, hour) AS bio_added_ts__hour + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, day) AS bio_added_ts__day + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, isoweek) AS bio_added_ts__week + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, month) AS bio_added_ts__month + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, quarter) AS bio_added_ts__quarter + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, year) AS bio_added_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_day + , IF(EXTRACT(dayofweek FROM users_ds_source_src_28000.bio_added_ts) = 1, 7, EXTRACT(dayofweek FROM users_ds_source_src_28000.bio_added_ts) - 1) AS bio_added_ts__extract_dow + , EXTRACT(dayofyear FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_doy + , DATETIME_TRUNC(users_ds_source_src_28000.last_login_ts, minute) AS last_login_ts__minute + , DATETIME_TRUNC(users_ds_source_src_28000.last_login_ts, hour) AS last_login_ts__hour + , DATETIME_TRUNC(users_ds_source_src_28000.last_login_ts, day) AS last_login_ts__day + , DATETIME_TRUNC(users_ds_source_src_28000.last_login_ts, isoweek) AS last_login_ts__week + , DATETIME_TRUNC(users_ds_source_src_28000.last_login_ts, month) AS last_login_ts__month + , DATETIME_TRUNC(users_ds_source_src_28000.last_login_ts, quarter) AS last_login_ts__quarter + , DATETIME_TRUNC(users_ds_source_src_28000.last_login_ts, year) AS last_login_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_day + , IF(EXTRACT(dayofweek FROM users_ds_source_src_28000.last_login_ts) = 1, 7, EXTRACT(dayofweek FROM users_ds_source_src_28000.last_login_ts) - 1) AS last_login_ts__extract_dow + , EXTRACT(dayofyear FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_doy + , DATETIME_TRUNC(users_ds_source_src_28000.archived_at, hour) AS archived_at__hour + , DATETIME_TRUNC(users_ds_source_src_28000.archived_at, day) AS archived_at__day + , DATETIME_TRUNC(users_ds_source_src_28000.archived_at, isoweek) AS archived_at__week + , DATETIME_TRUNC(users_ds_source_src_28000.archived_at, month) AS archived_at__month + , DATETIME_TRUNC(users_ds_source_src_28000.archived_at, quarter) AS archived_at__quarter + , DATETIME_TRUNC(users_ds_source_src_28000.archived_at, year) AS archived_at__year + , EXTRACT(year FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_day + , IF(EXTRACT(dayofweek FROM users_ds_source_src_28000.archived_at) = 1, 7, EXTRACT(dayofweek FROM users_ds_source_src_28000.archived_at) - 1) AS archived_at__extract_dow + , EXTRACT(dayofyear FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_doy + , DATETIME_TRUNC(users_ds_source_src_28000.ds, day) AS user__ds__day + , DATETIME_TRUNC(users_ds_source_src_28000.ds, isoweek) AS user__ds__week + , DATETIME_TRUNC(users_ds_source_src_28000.ds, month) AS user__ds__month + , DATETIME_TRUNC(users_ds_source_src_28000.ds, quarter) AS user__ds__quarter + , DATETIME_TRUNC(users_ds_source_src_28000.ds, year) AS user__ds__year + , EXTRACT(year FROM users_ds_source_src_28000.ds) AS user__ds__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.ds) AS user__ds__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.ds) AS user__ds__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.ds) AS user__ds__extract_day + , IF(EXTRACT(dayofweek FROM users_ds_source_src_28000.ds) = 1, 7, EXTRACT(dayofweek FROM users_ds_source_src_28000.ds) - 1) AS user__ds__extract_dow + , EXTRACT(dayofyear FROM users_ds_source_src_28000.ds) AS user__ds__extract_doy + , DATETIME_TRUNC(users_ds_source_src_28000.created_at, day) AS user__created_at__day + , DATETIME_TRUNC(users_ds_source_src_28000.created_at, isoweek) AS user__created_at__week + , DATETIME_TRUNC(users_ds_source_src_28000.created_at, month) AS user__created_at__month + , DATETIME_TRUNC(users_ds_source_src_28000.created_at, quarter) AS user__created_at__quarter + , DATETIME_TRUNC(users_ds_source_src_28000.created_at, year) AS user__created_at__year + , EXTRACT(year FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_day + , IF(EXTRACT(dayofweek FROM users_ds_source_src_28000.created_at) = 1, 7, EXTRACT(dayofweek FROM users_ds_source_src_28000.created_at) - 1) AS user__created_at__extract_dow + , EXTRACT(dayofyear FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_doy + , DATETIME_TRUNC(users_ds_source_src_28000.ds_partitioned, day) AS user__ds_partitioned__day + , DATETIME_TRUNC(users_ds_source_src_28000.ds_partitioned, isoweek) AS user__ds_partitioned__week + , DATETIME_TRUNC(users_ds_source_src_28000.ds_partitioned, month) AS user__ds_partitioned__month + , DATETIME_TRUNC(users_ds_source_src_28000.ds_partitioned, quarter) AS user__ds_partitioned__quarter + , DATETIME_TRUNC(users_ds_source_src_28000.ds_partitioned, year) AS user__ds_partitioned__year + , EXTRACT(year FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_day + , IF(EXTRACT(dayofweek FROM users_ds_source_src_28000.ds_partitioned) = 1, 7, EXTRACT(dayofweek FROM users_ds_source_src_28000.ds_partitioned) - 1) AS user__ds_partitioned__extract_dow + , EXTRACT(dayofyear FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_doy + , users_ds_source_src_28000.home_state AS user__home_state + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, millisecond) AS user__last_profile_edit_ts__millisecond + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, second) AS user__last_profile_edit_ts__second + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, minute) AS user__last_profile_edit_ts__minute + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, hour) AS user__last_profile_edit_ts__hour + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, day) AS user__last_profile_edit_ts__day + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, isoweek) AS user__last_profile_edit_ts__week + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, month) AS user__last_profile_edit_ts__month + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, quarter) AS user__last_profile_edit_ts__quarter + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, year) AS user__last_profile_edit_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_day + , IF(EXTRACT(dayofweek FROM users_ds_source_src_28000.last_profile_edit_ts) = 1, 7, EXTRACT(dayofweek FROM users_ds_source_src_28000.last_profile_edit_ts) - 1) AS user__last_profile_edit_ts__extract_dow + , EXTRACT(dayofyear FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_doy + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, second) AS user__bio_added_ts__second + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, minute) AS user__bio_added_ts__minute + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, hour) AS user__bio_added_ts__hour + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, day) AS user__bio_added_ts__day + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, isoweek) AS user__bio_added_ts__week + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, month) AS user__bio_added_ts__month + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, quarter) AS user__bio_added_ts__quarter + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, year) AS user__bio_added_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_day + , IF(EXTRACT(dayofweek FROM users_ds_source_src_28000.bio_added_ts) = 1, 7, EXTRACT(dayofweek FROM users_ds_source_src_28000.bio_added_ts) - 1) AS user__bio_added_ts__extract_dow + , EXTRACT(dayofyear FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_doy + , DATETIME_TRUNC(users_ds_source_src_28000.last_login_ts, minute) AS user__last_login_ts__minute + , DATETIME_TRUNC(users_ds_source_src_28000.last_login_ts, hour) AS user__last_login_ts__hour + , DATETIME_TRUNC(users_ds_source_src_28000.last_login_ts, day) AS user__last_login_ts__day + , DATETIME_TRUNC(users_ds_source_src_28000.last_login_ts, isoweek) AS user__last_login_ts__week + , DATETIME_TRUNC(users_ds_source_src_28000.last_login_ts, month) AS user__last_login_ts__month + , DATETIME_TRUNC(users_ds_source_src_28000.last_login_ts, quarter) AS user__last_login_ts__quarter + , DATETIME_TRUNC(users_ds_source_src_28000.last_login_ts, year) AS user__last_login_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_day + , IF(EXTRACT(dayofweek FROM users_ds_source_src_28000.last_login_ts) = 1, 7, EXTRACT(dayofweek FROM users_ds_source_src_28000.last_login_ts) - 1) AS user__last_login_ts__extract_dow + , EXTRACT(dayofyear FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_doy + , DATETIME_TRUNC(users_ds_source_src_28000.archived_at, hour) AS user__archived_at__hour + , DATETIME_TRUNC(users_ds_source_src_28000.archived_at, day) AS user__archived_at__day + , DATETIME_TRUNC(users_ds_source_src_28000.archived_at, isoweek) AS user__archived_at__week + , DATETIME_TRUNC(users_ds_source_src_28000.archived_at, month) AS user__archived_at__month + , DATETIME_TRUNC(users_ds_source_src_28000.archived_at, quarter) AS user__archived_at__quarter + , DATETIME_TRUNC(users_ds_source_src_28000.archived_at, year) AS user__archived_at__year + , EXTRACT(year FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_day + , IF(EXTRACT(dayofweek FROM users_ds_source_src_28000.archived_at) = 1, 7, EXTRACT(dayofweek FROM users_ds_source_src_28000.archived_at) - 1) AS user__archived_at__extract_dow + , EXTRACT(dayofyear FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_doy + , users_ds_source_src_28000.user_id AS user + FROM ***************************.dim_users users_ds_source_src_28000 +) subq_0 +GROUP BY + user__bio_added_ts__second diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_dimension__plan0_optimized.sql new file mode 100644 index 0000000000..fdc7c955bd --- /dev/null +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_dimension__plan0_optimized.sql @@ -0,0 +1,7 @@ +-- Read Elements From Semantic Model 'users_ds_source' +-- Pass Only Elements: ['user__bio_added_ts__second',] +SELECT + DATETIME_TRUNC(bio_added_ts, second) AS user__bio_added_ts__second +FROM ***************************.dim_users users_ds_source_src_28000 +GROUP BY + user__bio_added_ts__second diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_metric_time__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_metric_time__plan0.sql new file mode 100644 index 0000000000..2cd1404453 --- /dev/null +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_metric_time__plan0.sql @@ -0,0 +1,59 @@ +-- Pass Only Elements: ['metric_time__millisecond',] +SELECT + subq_1.metric_time__millisecond +FROM ( + -- Metric Time Dimension 'ts' + SELECT + subq_0.ts__millisecond + , subq_0.ts__second + , subq_0.ts__minute + , subq_0.ts__hour + , subq_0.ts__day + , subq_0.ts__week + , subq_0.ts__month + , subq_0.ts__quarter + , subq_0.ts__year + , subq_0.ts__extract_year + , subq_0.ts__extract_quarter + , subq_0.ts__extract_month + , subq_0.ts__extract_day + , subq_0.ts__extract_dow + , subq_0.ts__extract_doy + , subq_0.ts__millisecond AS metric_time__millisecond + , subq_0.ts__second AS metric_time__second + , subq_0.ts__minute AS metric_time__minute + , subq_0.ts__hour AS metric_time__hour + , subq_0.ts__day AS metric_time__day + , subq_0.ts__week AS metric_time__week + , subq_0.ts__month AS metric_time__month + , subq_0.ts__quarter AS metric_time__quarter + , subq_0.ts__year AS metric_time__year + , subq_0.ts__extract_year AS metric_time__extract_year + , subq_0.ts__extract_quarter AS metric_time__extract_quarter + , subq_0.ts__extract_month AS metric_time__extract_month + , subq_0.ts__extract_day AS metric_time__extract_day + , subq_0.ts__extract_dow AS metric_time__extract_dow + , subq_0.ts__extract_doy AS metric_time__extract_doy + FROM ( + -- Time Spine + SELECT + DATETIME_TRUNC(time_spine_src_28002.ts, millisecond) AS ts__millisecond + , DATETIME_TRUNC(time_spine_src_28002.ts, second) AS ts__second + , DATETIME_TRUNC(time_spine_src_28002.ts, minute) AS ts__minute + , DATETIME_TRUNC(time_spine_src_28002.ts, hour) AS ts__hour + , DATETIME_TRUNC(time_spine_src_28002.ts, day) AS ts__day + , DATETIME_TRUNC(time_spine_src_28002.ts, isoweek) AS ts__week + , DATETIME_TRUNC(time_spine_src_28002.ts, month) AS ts__month + , DATETIME_TRUNC(time_spine_src_28002.ts, quarter) AS ts__quarter + , DATETIME_TRUNC(time_spine_src_28002.ts, year) AS ts__year + , EXTRACT(year FROM time_spine_src_28002.ts) AS ts__extract_year + , EXTRACT(quarter FROM time_spine_src_28002.ts) AS ts__extract_quarter + , EXTRACT(month FROM time_spine_src_28002.ts) AS ts__extract_month + , EXTRACT(day FROM time_spine_src_28002.ts) AS ts__extract_day + , IF(EXTRACT(dayofweek FROM time_spine_src_28002.ts) = 1, 7, EXTRACT(dayofweek FROM time_spine_src_28002.ts) - 1) AS ts__extract_dow + , EXTRACT(dayofyear FROM time_spine_src_28002.ts) AS ts__extract_doy + FROM ***************************.mf_time_spine_millisecond time_spine_src_28002 + ) subq_0 +) subq_1 +GROUP BY + metric_time__millisecond diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_metric_time__plan0_optimized.sql new file mode 100644 index 0000000000..861d1aeed0 --- /dev/null +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_metric_time__plan0_optimized.sql @@ -0,0 +1,8 @@ +-- Time Spine +-- Metric Time Dimension 'ts' +-- Pass Only Elements: ['metric_time__millisecond',] +SELECT + DATETIME_TRUNC(ts, millisecond) AS metric_time__millisecond +FROM ***************************.mf_time_spine_millisecond time_spine_src_28002 +GROUP BY + metric_time__millisecond diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_dimension__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_dimension__plan0.sql new file mode 100644 index 0000000000..068fffb79b --- /dev/null +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_dimension__plan0.sql @@ -0,0 +1,187 @@ +-- Pass Only Elements: ['user__bio_added_ts__second',] +SELECT + subq_0.user__bio_added_ts__second +FROM ( + -- Read Elements From Semantic Model 'users_ds_source' + SELECT + DATE_TRUNC('day', users_ds_source_src_28000.ds) AS ds__day + , DATE_TRUNC('week', users_ds_source_src_28000.ds) AS ds__week + , DATE_TRUNC('month', users_ds_source_src_28000.ds) AS ds__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.ds) AS ds__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.ds) AS ds__year + , EXTRACT(year FROM users_ds_source_src_28000.ds) AS ds__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.ds) AS ds__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.ds) AS ds__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.ds) AS ds__extract_day + , EXTRACT(DAYOFWEEK_ISO FROM users_ds_source_src_28000.ds) AS ds__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.ds) AS ds__extract_doy + , DATE_TRUNC('day', users_ds_source_src_28000.created_at) AS created_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.created_at) AS created_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.created_at) AS created_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.created_at) AS created_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.created_at) AS created_at__year + , EXTRACT(year FROM users_ds_source_src_28000.created_at) AS created_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.created_at) AS created_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.created_at) AS created_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.created_at) AS created_at__extract_day + , EXTRACT(DAYOFWEEK_ISO FROM users_ds_source_src_28000.created_at) AS created_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.created_at) AS created_at__extract_doy + , DATE_TRUNC('day', users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__day + , DATE_TRUNC('week', users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__week + , DATE_TRUNC('month', users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__year + , EXTRACT(year FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_day + , EXTRACT(DAYOFWEEK_ISO FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_doy + , users_ds_source_src_28000.home_state + , DATE_TRUNC('millisecond', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__millisecond + , DATE_TRUNC('second', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_day + , EXTRACT(DAYOFWEEK_ISO FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_doy + , DATE_TRUNC('second', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_day + , EXTRACT(DAYOFWEEK_ISO FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_doy + , DATE_TRUNC('minute', users_ds_source_src_28000.last_login_ts) AS last_login_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_login_ts) AS last_login_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_login_ts) AS last_login_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_login_ts) AS last_login_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_login_ts) AS last_login_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_login_ts) AS last_login_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_login_ts) AS last_login_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_day + , EXTRACT(DAYOFWEEK_ISO FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_doy + , DATE_TRUNC('hour', users_ds_source_src_28000.archived_at) AS archived_at__hour + , DATE_TRUNC('day', users_ds_source_src_28000.archived_at) AS archived_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.archived_at) AS archived_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.archived_at) AS archived_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.archived_at) AS archived_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.archived_at) AS archived_at__year + , EXTRACT(year FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_day + , EXTRACT(DAYOFWEEK_ISO FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_doy + , DATE_TRUNC('day', users_ds_source_src_28000.ds) AS user__ds__day + , DATE_TRUNC('week', users_ds_source_src_28000.ds) AS user__ds__week + , DATE_TRUNC('month', users_ds_source_src_28000.ds) AS user__ds__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.ds) AS user__ds__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.ds) AS user__ds__year + , EXTRACT(year FROM users_ds_source_src_28000.ds) AS user__ds__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.ds) AS user__ds__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.ds) AS user__ds__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.ds) AS user__ds__extract_day + , EXTRACT(DAYOFWEEK_ISO FROM users_ds_source_src_28000.ds) AS user__ds__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.ds) AS user__ds__extract_doy + , DATE_TRUNC('day', users_ds_source_src_28000.created_at) AS user__created_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.created_at) AS user__created_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.created_at) AS user__created_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.created_at) AS user__created_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.created_at) AS user__created_at__year + , EXTRACT(year FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_day + , EXTRACT(DAYOFWEEK_ISO FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_doy + , DATE_TRUNC('day', users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__day + , DATE_TRUNC('week', users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__week + , DATE_TRUNC('month', users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__year + , EXTRACT(year FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_day + , EXTRACT(DAYOFWEEK_ISO FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_doy + , users_ds_source_src_28000.home_state AS user__home_state + , DATE_TRUNC('millisecond', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__millisecond + , DATE_TRUNC('second', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_day + , EXTRACT(DAYOFWEEK_ISO FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_doy + , DATE_TRUNC('second', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_day + , EXTRACT(DAYOFWEEK_ISO FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_doy + , DATE_TRUNC('minute', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_day + , EXTRACT(DAYOFWEEK_ISO FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_doy + , DATE_TRUNC('hour', users_ds_source_src_28000.archived_at) AS user__archived_at__hour + , DATE_TRUNC('day', users_ds_source_src_28000.archived_at) AS user__archived_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.archived_at) AS user__archived_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.archived_at) AS user__archived_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.archived_at) AS user__archived_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.archived_at) AS user__archived_at__year + , EXTRACT(year FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_day + , EXTRACT(DAYOFWEEK_ISO FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_doy + , users_ds_source_src_28000.user_id AS user + FROM ***************************.dim_users users_ds_source_src_28000 +) subq_0 +GROUP BY + subq_0.user__bio_added_ts__second diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_dimension__plan0_optimized.sql new file mode 100644 index 0000000000..b7bf7d7395 --- /dev/null +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_dimension__plan0_optimized.sql @@ -0,0 +1,7 @@ +-- Read Elements From Semantic Model 'users_ds_source' +-- Pass Only Elements: ['user__bio_added_ts__second',] +SELECT + DATE_TRUNC('second', bio_added_ts) AS user__bio_added_ts__second +FROM ***************************.dim_users users_ds_source_src_28000 +GROUP BY + DATE_TRUNC('second', bio_added_ts) diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_metric_time__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_metric_time__plan0.sql new file mode 100644 index 0000000000..a913e4dc26 --- /dev/null +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_metric_time__plan0.sql @@ -0,0 +1,59 @@ +-- Pass Only Elements: ['metric_time__millisecond',] +SELECT + subq_1.metric_time__millisecond +FROM ( + -- Metric Time Dimension 'ts' + SELECT + subq_0.ts__millisecond + , subq_0.ts__second + , subq_0.ts__minute + , subq_0.ts__hour + , subq_0.ts__day + , subq_0.ts__week + , subq_0.ts__month + , subq_0.ts__quarter + , subq_0.ts__year + , subq_0.ts__extract_year + , subq_0.ts__extract_quarter + , subq_0.ts__extract_month + , subq_0.ts__extract_day + , subq_0.ts__extract_dow + , subq_0.ts__extract_doy + , subq_0.ts__millisecond AS metric_time__millisecond + , subq_0.ts__second AS metric_time__second + , subq_0.ts__minute AS metric_time__minute + , subq_0.ts__hour AS metric_time__hour + , subq_0.ts__day AS metric_time__day + , subq_0.ts__week AS metric_time__week + , subq_0.ts__month AS metric_time__month + , subq_0.ts__quarter AS metric_time__quarter + , subq_0.ts__year AS metric_time__year + , subq_0.ts__extract_year AS metric_time__extract_year + , subq_0.ts__extract_quarter AS metric_time__extract_quarter + , subq_0.ts__extract_month AS metric_time__extract_month + , subq_0.ts__extract_day AS metric_time__extract_day + , subq_0.ts__extract_dow AS metric_time__extract_dow + , subq_0.ts__extract_doy AS metric_time__extract_doy + FROM ( + -- Time Spine + SELECT + DATE_TRUNC('millisecond', time_spine_src_28002.ts) AS ts__millisecond + , DATE_TRUNC('second', time_spine_src_28002.ts) AS ts__second + , DATE_TRUNC('minute', time_spine_src_28002.ts) AS ts__minute + , DATE_TRUNC('hour', time_spine_src_28002.ts) AS ts__hour + , DATE_TRUNC('day', time_spine_src_28002.ts) AS ts__day + , DATE_TRUNC('week', time_spine_src_28002.ts) AS ts__week + , DATE_TRUNC('month', time_spine_src_28002.ts) AS ts__month + , DATE_TRUNC('quarter', time_spine_src_28002.ts) AS ts__quarter + , DATE_TRUNC('year', time_spine_src_28002.ts) AS ts__year + , EXTRACT(year FROM time_spine_src_28002.ts) AS ts__extract_year + , EXTRACT(quarter FROM time_spine_src_28002.ts) AS ts__extract_quarter + , EXTRACT(month FROM time_spine_src_28002.ts) AS ts__extract_month + , EXTRACT(day FROM time_spine_src_28002.ts) AS ts__extract_day + , EXTRACT(DAYOFWEEK_ISO FROM time_spine_src_28002.ts) AS ts__extract_dow + , EXTRACT(doy FROM time_spine_src_28002.ts) AS ts__extract_doy + FROM ***************************.mf_time_spine_millisecond time_spine_src_28002 + ) subq_0 +) subq_1 +GROUP BY + subq_1.metric_time__millisecond diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_metric_time__plan0_optimized.sql new file mode 100644 index 0000000000..6bc0e3fe94 --- /dev/null +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_metric_time__plan0_optimized.sql @@ -0,0 +1,8 @@ +-- Time Spine +-- Metric Time Dimension 'ts' +-- Pass Only Elements: ['metric_time__millisecond',] +SELECT + DATE_TRUNC('millisecond', ts) AS metric_time__millisecond +FROM ***************************.mf_time_spine_millisecond time_spine_src_28002 +GROUP BY + DATE_TRUNC('millisecond', ts) diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_dimension__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_dimension__plan0.sql new file mode 100644 index 0000000000..32c180b9bb --- /dev/null +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_dimension__plan0.sql @@ -0,0 +1,187 @@ +-- Pass Only Elements: ['user__bio_added_ts__second',] +SELECT + subq_0.user__bio_added_ts__second +FROM ( + -- Read Elements From Semantic Model 'users_ds_source' + SELECT + DATE_TRUNC('day', users_ds_source_src_28000.ds) AS ds__day + , DATE_TRUNC('week', users_ds_source_src_28000.ds) AS ds__week + , DATE_TRUNC('month', users_ds_source_src_28000.ds) AS ds__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.ds) AS ds__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.ds) AS ds__year + , EXTRACT(year FROM users_ds_source_src_28000.ds) AS ds__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.ds) AS ds__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.ds) AS ds__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.ds) AS ds__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.ds) AS ds__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.ds) AS ds__extract_doy + , DATE_TRUNC('day', users_ds_source_src_28000.created_at) AS created_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.created_at) AS created_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.created_at) AS created_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.created_at) AS created_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.created_at) AS created_at__year + , EXTRACT(year FROM users_ds_source_src_28000.created_at) AS created_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.created_at) AS created_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.created_at) AS created_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.created_at) AS created_at__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.created_at) AS created_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.created_at) AS created_at__extract_doy + , DATE_TRUNC('day', users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__day + , DATE_TRUNC('week', users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__week + , DATE_TRUNC('month', users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__year + , EXTRACT(year FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_doy + , users_ds_source_src_28000.home_state + , DATE_TRUNC('millisecond', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__millisecond + , DATE_TRUNC('second', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_doy + , DATE_TRUNC('second', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_doy + , DATE_TRUNC('minute', users_ds_source_src_28000.last_login_ts) AS last_login_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_login_ts) AS last_login_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_login_ts) AS last_login_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_login_ts) AS last_login_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_login_ts) AS last_login_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_login_ts) AS last_login_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_login_ts) AS last_login_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_doy + , DATE_TRUNC('hour', users_ds_source_src_28000.archived_at) AS archived_at__hour + , DATE_TRUNC('day', users_ds_source_src_28000.archived_at) AS archived_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.archived_at) AS archived_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.archived_at) AS archived_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.archived_at) AS archived_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.archived_at) AS archived_at__year + , EXTRACT(year FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_doy + , DATE_TRUNC('day', users_ds_source_src_28000.ds) AS user__ds__day + , DATE_TRUNC('week', users_ds_source_src_28000.ds) AS user__ds__week + , DATE_TRUNC('month', users_ds_source_src_28000.ds) AS user__ds__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.ds) AS user__ds__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.ds) AS user__ds__year + , EXTRACT(year FROM users_ds_source_src_28000.ds) AS user__ds__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.ds) AS user__ds__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.ds) AS user__ds__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.ds) AS user__ds__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.ds) AS user__ds__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.ds) AS user__ds__extract_doy + , DATE_TRUNC('day', users_ds_source_src_28000.created_at) AS user__created_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.created_at) AS user__created_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.created_at) AS user__created_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.created_at) AS user__created_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.created_at) AS user__created_at__year + , EXTRACT(year FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_doy + , DATE_TRUNC('day', users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__day + , DATE_TRUNC('week', users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__week + , DATE_TRUNC('month', users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__year + , EXTRACT(year FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_doy + , users_ds_source_src_28000.home_state AS user__home_state + , DATE_TRUNC('millisecond', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__millisecond + , DATE_TRUNC('second', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_doy + , DATE_TRUNC('second', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_doy + , DATE_TRUNC('minute', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_doy + , DATE_TRUNC('hour', users_ds_source_src_28000.archived_at) AS user__archived_at__hour + , DATE_TRUNC('day', users_ds_source_src_28000.archived_at) AS user__archived_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.archived_at) AS user__archived_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.archived_at) AS user__archived_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.archived_at) AS user__archived_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.archived_at) AS user__archived_at__year + , EXTRACT(year FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_doy + , users_ds_source_src_28000.user_id AS user + FROM ***************************.dim_users users_ds_source_src_28000 +) subq_0 +GROUP BY + subq_0.user__bio_added_ts__second diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_dimension__plan0_optimized.sql new file mode 100644 index 0000000000..b7bf7d7395 --- /dev/null +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_dimension__plan0_optimized.sql @@ -0,0 +1,7 @@ +-- Read Elements From Semantic Model 'users_ds_source' +-- Pass Only Elements: ['user__bio_added_ts__second',] +SELECT + DATE_TRUNC('second', bio_added_ts) AS user__bio_added_ts__second +FROM ***************************.dim_users users_ds_source_src_28000 +GROUP BY + DATE_TRUNC('second', bio_added_ts) diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_metric_time__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_metric_time__plan0.sql new file mode 100644 index 0000000000..4507843952 --- /dev/null +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_metric_time__plan0.sql @@ -0,0 +1,59 @@ +-- Pass Only Elements: ['metric_time__millisecond',] +SELECT + subq_1.metric_time__millisecond +FROM ( + -- Metric Time Dimension 'ts' + SELECT + subq_0.ts__millisecond + , subq_0.ts__second + , subq_0.ts__minute + , subq_0.ts__hour + , subq_0.ts__day + , subq_0.ts__week + , subq_0.ts__month + , subq_0.ts__quarter + , subq_0.ts__year + , subq_0.ts__extract_year + , subq_0.ts__extract_quarter + , subq_0.ts__extract_month + , subq_0.ts__extract_day + , subq_0.ts__extract_dow + , subq_0.ts__extract_doy + , subq_0.ts__millisecond AS metric_time__millisecond + , subq_0.ts__second AS metric_time__second + , subq_0.ts__minute AS metric_time__minute + , subq_0.ts__hour AS metric_time__hour + , subq_0.ts__day AS metric_time__day + , subq_0.ts__week AS metric_time__week + , subq_0.ts__month AS metric_time__month + , subq_0.ts__quarter AS metric_time__quarter + , subq_0.ts__year AS metric_time__year + , subq_0.ts__extract_year AS metric_time__extract_year + , subq_0.ts__extract_quarter AS metric_time__extract_quarter + , subq_0.ts__extract_month AS metric_time__extract_month + , subq_0.ts__extract_day AS metric_time__extract_day + , subq_0.ts__extract_dow AS metric_time__extract_dow + , subq_0.ts__extract_doy AS metric_time__extract_doy + FROM ( + -- Time Spine + SELECT + DATE_TRUNC('millisecond', time_spine_src_28002.ts) AS ts__millisecond + , DATE_TRUNC('second', time_spine_src_28002.ts) AS ts__second + , DATE_TRUNC('minute', time_spine_src_28002.ts) AS ts__minute + , DATE_TRUNC('hour', time_spine_src_28002.ts) AS ts__hour + , DATE_TRUNC('day', time_spine_src_28002.ts) AS ts__day + , DATE_TRUNC('week', time_spine_src_28002.ts) AS ts__week + , DATE_TRUNC('month', time_spine_src_28002.ts) AS ts__month + , DATE_TRUNC('quarter', time_spine_src_28002.ts) AS ts__quarter + , DATE_TRUNC('year', time_spine_src_28002.ts) AS ts__year + , EXTRACT(year FROM time_spine_src_28002.ts) AS ts__extract_year + , EXTRACT(quarter FROM time_spine_src_28002.ts) AS ts__extract_quarter + , EXTRACT(month FROM time_spine_src_28002.ts) AS ts__extract_month + , EXTRACT(day FROM time_spine_src_28002.ts) AS ts__extract_day + , EXTRACT(isodow FROM time_spine_src_28002.ts) AS ts__extract_dow + , EXTRACT(doy FROM time_spine_src_28002.ts) AS ts__extract_doy + FROM ***************************.mf_time_spine_millisecond time_spine_src_28002 + ) subq_0 +) subq_1 +GROUP BY + subq_1.metric_time__millisecond diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_metric_time__plan0_optimized.sql new file mode 100644 index 0000000000..6bc0e3fe94 --- /dev/null +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_metric_time__plan0_optimized.sql @@ -0,0 +1,8 @@ +-- Time Spine +-- Metric Time Dimension 'ts' +-- Pass Only Elements: ['metric_time__millisecond',] +SELECT + DATE_TRUNC('millisecond', ts) AS metric_time__millisecond +FROM ***************************.mf_time_spine_millisecond time_spine_src_28002 +GROUP BY + DATE_TRUNC('millisecond', ts) diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_dimension__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_dimension__plan0.sql new file mode 100644 index 0000000000..32c180b9bb --- /dev/null +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_dimension__plan0.sql @@ -0,0 +1,187 @@ +-- Pass Only Elements: ['user__bio_added_ts__second',] +SELECT + subq_0.user__bio_added_ts__second +FROM ( + -- Read Elements From Semantic Model 'users_ds_source' + SELECT + DATE_TRUNC('day', users_ds_source_src_28000.ds) AS ds__day + , DATE_TRUNC('week', users_ds_source_src_28000.ds) AS ds__week + , DATE_TRUNC('month', users_ds_source_src_28000.ds) AS ds__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.ds) AS ds__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.ds) AS ds__year + , EXTRACT(year FROM users_ds_source_src_28000.ds) AS ds__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.ds) AS ds__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.ds) AS ds__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.ds) AS ds__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.ds) AS ds__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.ds) AS ds__extract_doy + , DATE_TRUNC('day', users_ds_source_src_28000.created_at) AS created_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.created_at) AS created_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.created_at) AS created_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.created_at) AS created_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.created_at) AS created_at__year + , EXTRACT(year FROM users_ds_source_src_28000.created_at) AS created_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.created_at) AS created_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.created_at) AS created_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.created_at) AS created_at__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.created_at) AS created_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.created_at) AS created_at__extract_doy + , DATE_TRUNC('day', users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__day + , DATE_TRUNC('week', users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__week + , DATE_TRUNC('month', users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__year + , EXTRACT(year FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_doy + , users_ds_source_src_28000.home_state + , DATE_TRUNC('millisecond', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__millisecond + , DATE_TRUNC('second', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_doy + , DATE_TRUNC('second', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_doy + , DATE_TRUNC('minute', users_ds_source_src_28000.last_login_ts) AS last_login_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_login_ts) AS last_login_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_login_ts) AS last_login_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_login_ts) AS last_login_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_login_ts) AS last_login_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_login_ts) AS last_login_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_login_ts) AS last_login_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_doy + , DATE_TRUNC('hour', users_ds_source_src_28000.archived_at) AS archived_at__hour + , DATE_TRUNC('day', users_ds_source_src_28000.archived_at) AS archived_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.archived_at) AS archived_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.archived_at) AS archived_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.archived_at) AS archived_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.archived_at) AS archived_at__year + , EXTRACT(year FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_doy + , DATE_TRUNC('day', users_ds_source_src_28000.ds) AS user__ds__day + , DATE_TRUNC('week', users_ds_source_src_28000.ds) AS user__ds__week + , DATE_TRUNC('month', users_ds_source_src_28000.ds) AS user__ds__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.ds) AS user__ds__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.ds) AS user__ds__year + , EXTRACT(year FROM users_ds_source_src_28000.ds) AS user__ds__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.ds) AS user__ds__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.ds) AS user__ds__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.ds) AS user__ds__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.ds) AS user__ds__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.ds) AS user__ds__extract_doy + , DATE_TRUNC('day', users_ds_source_src_28000.created_at) AS user__created_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.created_at) AS user__created_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.created_at) AS user__created_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.created_at) AS user__created_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.created_at) AS user__created_at__year + , EXTRACT(year FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_doy + , DATE_TRUNC('day', users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__day + , DATE_TRUNC('week', users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__week + , DATE_TRUNC('month', users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__year + , EXTRACT(year FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_doy + , users_ds_source_src_28000.home_state AS user__home_state + , DATE_TRUNC('millisecond', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__millisecond + , DATE_TRUNC('second', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_doy + , DATE_TRUNC('second', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_doy + , DATE_TRUNC('minute', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_doy + , DATE_TRUNC('hour', users_ds_source_src_28000.archived_at) AS user__archived_at__hour + , DATE_TRUNC('day', users_ds_source_src_28000.archived_at) AS user__archived_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.archived_at) AS user__archived_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.archived_at) AS user__archived_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.archived_at) AS user__archived_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.archived_at) AS user__archived_at__year + , EXTRACT(year FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_doy + , users_ds_source_src_28000.user_id AS user + FROM ***************************.dim_users users_ds_source_src_28000 +) subq_0 +GROUP BY + subq_0.user__bio_added_ts__second diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_dimension__plan0_optimized.sql new file mode 100644 index 0000000000..b7bf7d7395 --- /dev/null +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_dimension__plan0_optimized.sql @@ -0,0 +1,7 @@ +-- Read Elements From Semantic Model 'users_ds_source' +-- Pass Only Elements: ['user__bio_added_ts__second',] +SELECT + DATE_TRUNC('second', bio_added_ts) AS user__bio_added_ts__second +FROM ***************************.dim_users users_ds_source_src_28000 +GROUP BY + DATE_TRUNC('second', bio_added_ts) diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_metric_time__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_metric_time__plan0.sql new file mode 100644 index 0000000000..4507843952 --- /dev/null +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_metric_time__plan0.sql @@ -0,0 +1,59 @@ +-- Pass Only Elements: ['metric_time__millisecond',] +SELECT + subq_1.metric_time__millisecond +FROM ( + -- Metric Time Dimension 'ts' + SELECT + subq_0.ts__millisecond + , subq_0.ts__second + , subq_0.ts__minute + , subq_0.ts__hour + , subq_0.ts__day + , subq_0.ts__week + , subq_0.ts__month + , subq_0.ts__quarter + , subq_0.ts__year + , subq_0.ts__extract_year + , subq_0.ts__extract_quarter + , subq_0.ts__extract_month + , subq_0.ts__extract_day + , subq_0.ts__extract_dow + , subq_0.ts__extract_doy + , subq_0.ts__millisecond AS metric_time__millisecond + , subq_0.ts__second AS metric_time__second + , subq_0.ts__minute AS metric_time__minute + , subq_0.ts__hour AS metric_time__hour + , subq_0.ts__day AS metric_time__day + , subq_0.ts__week AS metric_time__week + , subq_0.ts__month AS metric_time__month + , subq_0.ts__quarter AS metric_time__quarter + , subq_0.ts__year AS metric_time__year + , subq_0.ts__extract_year AS metric_time__extract_year + , subq_0.ts__extract_quarter AS metric_time__extract_quarter + , subq_0.ts__extract_month AS metric_time__extract_month + , subq_0.ts__extract_day AS metric_time__extract_day + , subq_0.ts__extract_dow AS metric_time__extract_dow + , subq_0.ts__extract_doy AS metric_time__extract_doy + FROM ( + -- Time Spine + SELECT + DATE_TRUNC('millisecond', time_spine_src_28002.ts) AS ts__millisecond + , DATE_TRUNC('second', time_spine_src_28002.ts) AS ts__second + , DATE_TRUNC('minute', time_spine_src_28002.ts) AS ts__minute + , DATE_TRUNC('hour', time_spine_src_28002.ts) AS ts__hour + , DATE_TRUNC('day', time_spine_src_28002.ts) AS ts__day + , DATE_TRUNC('week', time_spine_src_28002.ts) AS ts__week + , DATE_TRUNC('month', time_spine_src_28002.ts) AS ts__month + , DATE_TRUNC('quarter', time_spine_src_28002.ts) AS ts__quarter + , DATE_TRUNC('year', time_spine_src_28002.ts) AS ts__year + , EXTRACT(year FROM time_spine_src_28002.ts) AS ts__extract_year + , EXTRACT(quarter FROM time_spine_src_28002.ts) AS ts__extract_quarter + , EXTRACT(month FROM time_spine_src_28002.ts) AS ts__extract_month + , EXTRACT(day FROM time_spine_src_28002.ts) AS ts__extract_day + , EXTRACT(isodow FROM time_spine_src_28002.ts) AS ts__extract_dow + , EXTRACT(doy FROM time_spine_src_28002.ts) AS ts__extract_doy + FROM ***************************.mf_time_spine_millisecond time_spine_src_28002 + ) subq_0 +) subq_1 +GROUP BY + subq_1.metric_time__millisecond diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_metric_time__plan0_optimized.sql new file mode 100644 index 0000000000..6bc0e3fe94 --- /dev/null +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_metric_time__plan0_optimized.sql @@ -0,0 +1,8 @@ +-- Time Spine +-- Metric Time Dimension 'ts' +-- Pass Only Elements: ['metric_time__millisecond',] +SELECT + DATE_TRUNC('millisecond', ts) AS metric_time__millisecond +FROM ***************************.mf_time_spine_millisecond time_spine_src_28002 +GROUP BY + DATE_TRUNC('millisecond', ts) diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_dimension__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_dimension__plan0.sql new file mode 100644 index 0000000000..eb3225eb70 --- /dev/null +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_dimension__plan0.sql @@ -0,0 +1,187 @@ +-- Pass Only Elements: ['user__bio_added_ts__second',] +SELECT + subq_0.user__bio_added_ts__second +FROM ( + -- Read Elements From Semantic Model 'users_ds_source' + SELECT + DATE_TRUNC('day', users_ds_source_src_28000.ds) AS ds__day + , DATE_TRUNC('week', users_ds_source_src_28000.ds) AS ds__week + , DATE_TRUNC('month', users_ds_source_src_28000.ds) AS ds__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.ds) AS ds__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.ds) AS ds__year + , EXTRACT(year FROM users_ds_source_src_28000.ds) AS ds__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.ds) AS ds__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.ds) AS ds__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.ds) AS ds__extract_day + , CASE WHEN EXTRACT(dow FROM users_ds_source_src_28000.ds) = 0 THEN EXTRACT(dow FROM users_ds_source_src_28000.ds) + 7 ELSE EXTRACT(dow FROM users_ds_source_src_28000.ds) END AS ds__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.ds) AS ds__extract_doy + , DATE_TRUNC('day', users_ds_source_src_28000.created_at) AS created_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.created_at) AS created_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.created_at) AS created_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.created_at) AS created_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.created_at) AS created_at__year + , EXTRACT(year FROM users_ds_source_src_28000.created_at) AS created_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.created_at) AS created_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.created_at) AS created_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.created_at) AS created_at__extract_day + , CASE WHEN EXTRACT(dow FROM users_ds_source_src_28000.created_at) = 0 THEN EXTRACT(dow FROM users_ds_source_src_28000.created_at) + 7 ELSE EXTRACT(dow FROM users_ds_source_src_28000.created_at) END AS created_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.created_at) AS created_at__extract_doy + , DATE_TRUNC('day', users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__day + , DATE_TRUNC('week', users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__week + , DATE_TRUNC('month', users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__year + , EXTRACT(year FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_day + , CASE WHEN EXTRACT(dow FROM users_ds_source_src_28000.ds_partitioned) = 0 THEN EXTRACT(dow FROM users_ds_source_src_28000.ds_partitioned) + 7 ELSE EXTRACT(dow FROM users_ds_source_src_28000.ds_partitioned) END AS ds_partitioned__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_doy + , users_ds_source_src_28000.home_state + , DATE_TRUNC('millisecond', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__millisecond + , DATE_TRUNC('second', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_day + , CASE WHEN EXTRACT(dow FROM users_ds_source_src_28000.last_profile_edit_ts) = 0 THEN EXTRACT(dow FROM users_ds_source_src_28000.last_profile_edit_ts) + 7 ELSE EXTRACT(dow FROM users_ds_source_src_28000.last_profile_edit_ts) END AS last_profile_edit_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_doy + , DATE_TRUNC('second', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_day + , CASE WHEN EXTRACT(dow FROM users_ds_source_src_28000.bio_added_ts) = 0 THEN EXTRACT(dow FROM users_ds_source_src_28000.bio_added_ts) + 7 ELSE EXTRACT(dow FROM users_ds_source_src_28000.bio_added_ts) END AS bio_added_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_doy + , DATE_TRUNC('minute', users_ds_source_src_28000.last_login_ts) AS last_login_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_login_ts) AS last_login_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_login_ts) AS last_login_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_login_ts) AS last_login_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_login_ts) AS last_login_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_login_ts) AS last_login_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_login_ts) AS last_login_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_day + , CASE WHEN EXTRACT(dow FROM users_ds_source_src_28000.last_login_ts) = 0 THEN EXTRACT(dow FROM users_ds_source_src_28000.last_login_ts) + 7 ELSE EXTRACT(dow FROM users_ds_source_src_28000.last_login_ts) END AS last_login_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_doy + , DATE_TRUNC('hour', users_ds_source_src_28000.archived_at) AS archived_at__hour + , DATE_TRUNC('day', users_ds_source_src_28000.archived_at) AS archived_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.archived_at) AS archived_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.archived_at) AS archived_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.archived_at) AS archived_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.archived_at) AS archived_at__year + , EXTRACT(year FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_day + , CASE WHEN EXTRACT(dow FROM users_ds_source_src_28000.archived_at) = 0 THEN EXTRACT(dow FROM users_ds_source_src_28000.archived_at) + 7 ELSE EXTRACT(dow FROM users_ds_source_src_28000.archived_at) END AS archived_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_doy + , DATE_TRUNC('day', users_ds_source_src_28000.ds) AS user__ds__day + , DATE_TRUNC('week', users_ds_source_src_28000.ds) AS user__ds__week + , DATE_TRUNC('month', users_ds_source_src_28000.ds) AS user__ds__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.ds) AS user__ds__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.ds) AS user__ds__year + , EXTRACT(year FROM users_ds_source_src_28000.ds) AS user__ds__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.ds) AS user__ds__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.ds) AS user__ds__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.ds) AS user__ds__extract_day + , CASE WHEN EXTRACT(dow FROM users_ds_source_src_28000.ds) = 0 THEN EXTRACT(dow FROM users_ds_source_src_28000.ds) + 7 ELSE EXTRACT(dow FROM users_ds_source_src_28000.ds) END AS user__ds__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.ds) AS user__ds__extract_doy + , DATE_TRUNC('day', users_ds_source_src_28000.created_at) AS user__created_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.created_at) AS user__created_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.created_at) AS user__created_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.created_at) AS user__created_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.created_at) AS user__created_at__year + , EXTRACT(year FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_day + , CASE WHEN EXTRACT(dow FROM users_ds_source_src_28000.created_at) = 0 THEN EXTRACT(dow FROM users_ds_source_src_28000.created_at) + 7 ELSE EXTRACT(dow FROM users_ds_source_src_28000.created_at) END AS user__created_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_doy + , DATE_TRUNC('day', users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__day + , DATE_TRUNC('week', users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__week + , DATE_TRUNC('month', users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__year + , EXTRACT(year FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_day + , CASE WHEN EXTRACT(dow FROM users_ds_source_src_28000.ds_partitioned) = 0 THEN EXTRACT(dow FROM users_ds_source_src_28000.ds_partitioned) + 7 ELSE EXTRACT(dow FROM users_ds_source_src_28000.ds_partitioned) END AS user__ds_partitioned__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_doy + , users_ds_source_src_28000.home_state AS user__home_state + , DATE_TRUNC('millisecond', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__millisecond + , DATE_TRUNC('second', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_day + , CASE WHEN EXTRACT(dow FROM users_ds_source_src_28000.last_profile_edit_ts) = 0 THEN EXTRACT(dow FROM users_ds_source_src_28000.last_profile_edit_ts) + 7 ELSE EXTRACT(dow FROM users_ds_source_src_28000.last_profile_edit_ts) END AS user__last_profile_edit_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_doy + , DATE_TRUNC('second', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_day + , CASE WHEN EXTRACT(dow FROM users_ds_source_src_28000.bio_added_ts) = 0 THEN EXTRACT(dow FROM users_ds_source_src_28000.bio_added_ts) + 7 ELSE EXTRACT(dow FROM users_ds_source_src_28000.bio_added_ts) END AS user__bio_added_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_doy + , DATE_TRUNC('minute', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_day + , CASE WHEN EXTRACT(dow FROM users_ds_source_src_28000.last_login_ts) = 0 THEN EXTRACT(dow FROM users_ds_source_src_28000.last_login_ts) + 7 ELSE EXTRACT(dow FROM users_ds_source_src_28000.last_login_ts) END AS user__last_login_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_doy + , DATE_TRUNC('hour', users_ds_source_src_28000.archived_at) AS user__archived_at__hour + , DATE_TRUNC('day', users_ds_source_src_28000.archived_at) AS user__archived_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.archived_at) AS user__archived_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.archived_at) AS user__archived_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.archived_at) AS user__archived_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.archived_at) AS user__archived_at__year + , EXTRACT(year FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_day + , CASE WHEN EXTRACT(dow FROM users_ds_source_src_28000.archived_at) = 0 THEN EXTRACT(dow FROM users_ds_source_src_28000.archived_at) + 7 ELSE EXTRACT(dow FROM users_ds_source_src_28000.archived_at) END AS user__archived_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_doy + , users_ds_source_src_28000.user_id AS user + FROM ***************************.dim_users users_ds_source_src_28000 +) subq_0 +GROUP BY + subq_0.user__bio_added_ts__second diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_dimension__plan0_optimized.sql new file mode 100644 index 0000000000..b7bf7d7395 --- /dev/null +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_dimension__plan0_optimized.sql @@ -0,0 +1,7 @@ +-- Read Elements From Semantic Model 'users_ds_source' +-- Pass Only Elements: ['user__bio_added_ts__second',] +SELECT + DATE_TRUNC('second', bio_added_ts) AS user__bio_added_ts__second +FROM ***************************.dim_users users_ds_source_src_28000 +GROUP BY + DATE_TRUNC('second', bio_added_ts) diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_metric_time__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_metric_time__plan0.sql new file mode 100644 index 0000000000..6747428a95 --- /dev/null +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_metric_time__plan0.sql @@ -0,0 +1,59 @@ +-- Pass Only Elements: ['metric_time__millisecond',] +SELECT + subq_1.metric_time__millisecond +FROM ( + -- Metric Time Dimension 'ts' + SELECT + subq_0.ts__millisecond + , subq_0.ts__second + , subq_0.ts__minute + , subq_0.ts__hour + , subq_0.ts__day + , subq_0.ts__week + , subq_0.ts__month + , subq_0.ts__quarter + , subq_0.ts__year + , subq_0.ts__extract_year + , subq_0.ts__extract_quarter + , subq_0.ts__extract_month + , subq_0.ts__extract_day + , subq_0.ts__extract_dow + , subq_0.ts__extract_doy + , subq_0.ts__millisecond AS metric_time__millisecond + , subq_0.ts__second AS metric_time__second + , subq_0.ts__minute AS metric_time__minute + , subq_0.ts__hour AS metric_time__hour + , subq_0.ts__day AS metric_time__day + , subq_0.ts__week AS metric_time__week + , subq_0.ts__month AS metric_time__month + , subq_0.ts__quarter AS metric_time__quarter + , subq_0.ts__year AS metric_time__year + , subq_0.ts__extract_year AS metric_time__extract_year + , subq_0.ts__extract_quarter AS metric_time__extract_quarter + , subq_0.ts__extract_month AS metric_time__extract_month + , subq_0.ts__extract_day AS metric_time__extract_day + , subq_0.ts__extract_dow AS metric_time__extract_dow + , subq_0.ts__extract_doy AS metric_time__extract_doy + FROM ( + -- Time Spine + SELECT + DATE_TRUNC('millisecond', time_spine_src_28002.ts) AS ts__millisecond + , DATE_TRUNC('second', time_spine_src_28002.ts) AS ts__second + , DATE_TRUNC('minute', time_spine_src_28002.ts) AS ts__minute + , DATE_TRUNC('hour', time_spine_src_28002.ts) AS ts__hour + , DATE_TRUNC('day', time_spine_src_28002.ts) AS ts__day + , DATE_TRUNC('week', time_spine_src_28002.ts) AS ts__week + , DATE_TRUNC('month', time_spine_src_28002.ts) AS ts__month + , DATE_TRUNC('quarter', time_spine_src_28002.ts) AS ts__quarter + , DATE_TRUNC('year', time_spine_src_28002.ts) AS ts__year + , EXTRACT(year FROM time_spine_src_28002.ts) AS ts__extract_year + , EXTRACT(quarter FROM time_spine_src_28002.ts) AS ts__extract_quarter + , EXTRACT(month FROM time_spine_src_28002.ts) AS ts__extract_month + , EXTRACT(day FROM time_spine_src_28002.ts) AS ts__extract_day + , CASE WHEN EXTRACT(dow FROM time_spine_src_28002.ts) = 0 THEN EXTRACT(dow FROM time_spine_src_28002.ts) + 7 ELSE EXTRACT(dow FROM time_spine_src_28002.ts) END AS ts__extract_dow + , EXTRACT(doy FROM time_spine_src_28002.ts) AS ts__extract_doy + FROM ***************************.mf_time_spine_millisecond time_spine_src_28002 + ) subq_0 +) subq_1 +GROUP BY + subq_1.metric_time__millisecond diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_metric_time__plan0_optimized.sql new file mode 100644 index 0000000000..6bc0e3fe94 --- /dev/null +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_metric_time__plan0_optimized.sql @@ -0,0 +1,8 @@ +-- Time Spine +-- Metric Time Dimension 'ts' +-- Pass Only Elements: ['metric_time__millisecond',] +SELECT + DATE_TRUNC('millisecond', ts) AS metric_time__millisecond +FROM ***************************.mf_time_spine_millisecond time_spine_src_28002 +GROUP BY + DATE_TRUNC('millisecond', ts) diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_dimension__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_dimension__plan0.sql new file mode 100644 index 0000000000..f10e223545 --- /dev/null +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_dimension__plan0.sql @@ -0,0 +1,187 @@ +-- Pass Only Elements: ['user__bio_added_ts__second',] +SELECT + subq_0.user__bio_added_ts__second +FROM ( + -- Read Elements From Semantic Model 'users_ds_source' + SELECT + DATE_TRUNC('day', users_ds_source_src_28000.ds) AS ds__day + , DATE_TRUNC('week', users_ds_source_src_28000.ds) AS ds__week + , DATE_TRUNC('month', users_ds_source_src_28000.ds) AS ds__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.ds) AS ds__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.ds) AS ds__year + , EXTRACT(year FROM users_ds_source_src_28000.ds) AS ds__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.ds) AS ds__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.ds) AS ds__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.ds) AS ds__extract_day + , EXTRACT(dayofweekiso FROM users_ds_source_src_28000.ds) AS ds__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.ds) AS ds__extract_doy + , DATE_TRUNC('day', users_ds_source_src_28000.created_at) AS created_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.created_at) AS created_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.created_at) AS created_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.created_at) AS created_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.created_at) AS created_at__year + , EXTRACT(year FROM users_ds_source_src_28000.created_at) AS created_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.created_at) AS created_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.created_at) AS created_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.created_at) AS created_at__extract_day + , EXTRACT(dayofweekiso FROM users_ds_source_src_28000.created_at) AS created_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.created_at) AS created_at__extract_doy + , DATE_TRUNC('day', users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__day + , DATE_TRUNC('week', users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__week + , DATE_TRUNC('month', users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__year + , EXTRACT(year FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_day + , EXTRACT(dayofweekiso FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_doy + , users_ds_source_src_28000.home_state + , DATE_TRUNC('millisecond', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__millisecond + , DATE_TRUNC('second', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_day + , EXTRACT(dayofweekiso FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_doy + , DATE_TRUNC('second', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_day + , EXTRACT(dayofweekiso FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_doy + , DATE_TRUNC('minute', users_ds_source_src_28000.last_login_ts) AS last_login_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_login_ts) AS last_login_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_login_ts) AS last_login_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_login_ts) AS last_login_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_login_ts) AS last_login_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_login_ts) AS last_login_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_login_ts) AS last_login_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_day + , EXTRACT(dayofweekiso FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_doy + , DATE_TRUNC('hour', users_ds_source_src_28000.archived_at) AS archived_at__hour + , DATE_TRUNC('day', users_ds_source_src_28000.archived_at) AS archived_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.archived_at) AS archived_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.archived_at) AS archived_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.archived_at) AS archived_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.archived_at) AS archived_at__year + , EXTRACT(year FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_day + , EXTRACT(dayofweekiso FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_doy + , DATE_TRUNC('day', users_ds_source_src_28000.ds) AS user__ds__day + , DATE_TRUNC('week', users_ds_source_src_28000.ds) AS user__ds__week + , DATE_TRUNC('month', users_ds_source_src_28000.ds) AS user__ds__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.ds) AS user__ds__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.ds) AS user__ds__year + , EXTRACT(year FROM users_ds_source_src_28000.ds) AS user__ds__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.ds) AS user__ds__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.ds) AS user__ds__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.ds) AS user__ds__extract_day + , EXTRACT(dayofweekiso FROM users_ds_source_src_28000.ds) AS user__ds__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.ds) AS user__ds__extract_doy + , DATE_TRUNC('day', users_ds_source_src_28000.created_at) AS user__created_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.created_at) AS user__created_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.created_at) AS user__created_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.created_at) AS user__created_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.created_at) AS user__created_at__year + , EXTRACT(year FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_day + , EXTRACT(dayofweekiso FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_doy + , DATE_TRUNC('day', users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__day + , DATE_TRUNC('week', users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__week + , DATE_TRUNC('month', users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__year + , EXTRACT(year FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_day + , EXTRACT(dayofweekiso FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_doy + , users_ds_source_src_28000.home_state AS user__home_state + , DATE_TRUNC('millisecond', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__millisecond + , DATE_TRUNC('second', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_day + , EXTRACT(dayofweekiso FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_doy + , DATE_TRUNC('second', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_day + , EXTRACT(dayofweekiso FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_doy + , DATE_TRUNC('minute', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_day + , EXTRACT(dayofweekiso FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_doy + , DATE_TRUNC('hour', users_ds_source_src_28000.archived_at) AS user__archived_at__hour + , DATE_TRUNC('day', users_ds_source_src_28000.archived_at) AS user__archived_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.archived_at) AS user__archived_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.archived_at) AS user__archived_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.archived_at) AS user__archived_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.archived_at) AS user__archived_at__year + , EXTRACT(year FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_day + , EXTRACT(dayofweekiso FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_doy + , users_ds_source_src_28000.user_id AS user + FROM ***************************.dim_users users_ds_source_src_28000 +) subq_0 +GROUP BY + subq_0.user__bio_added_ts__second diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_dimension__plan0_optimized.sql new file mode 100644 index 0000000000..b7bf7d7395 --- /dev/null +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_dimension__plan0_optimized.sql @@ -0,0 +1,7 @@ +-- Read Elements From Semantic Model 'users_ds_source' +-- Pass Only Elements: ['user__bio_added_ts__second',] +SELECT + DATE_TRUNC('second', bio_added_ts) AS user__bio_added_ts__second +FROM ***************************.dim_users users_ds_source_src_28000 +GROUP BY + DATE_TRUNC('second', bio_added_ts) diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_metric_time__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_metric_time__plan0.sql new file mode 100644 index 0000000000..7a8fe48698 --- /dev/null +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_metric_time__plan0.sql @@ -0,0 +1,59 @@ +-- Pass Only Elements: ['metric_time__millisecond',] +SELECT + subq_1.metric_time__millisecond +FROM ( + -- Metric Time Dimension 'ts' + SELECT + subq_0.ts__millisecond + , subq_0.ts__second + , subq_0.ts__minute + , subq_0.ts__hour + , subq_0.ts__day + , subq_0.ts__week + , subq_0.ts__month + , subq_0.ts__quarter + , subq_0.ts__year + , subq_0.ts__extract_year + , subq_0.ts__extract_quarter + , subq_0.ts__extract_month + , subq_0.ts__extract_day + , subq_0.ts__extract_dow + , subq_0.ts__extract_doy + , subq_0.ts__millisecond AS metric_time__millisecond + , subq_0.ts__second AS metric_time__second + , subq_0.ts__minute AS metric_time__minute + , subq_0.ts__hour AS metric_time__hour + , subq_0.ts__day AS metric_time__day + , subq_0.ts__week AS metric_time__week + , subq_0.ts__month AS metric_time__month + , subq_0.ts__quarter AS metric_time__quarter + , subq_0.ts__year AS metric_time__year + , subq_0.ts__extract_year AS metric_time__extract_year + , subq_0.ts__extract_quarter AS metric_time__extract_quarter + , subq_0.ts__extract_month AS metric_time__extract_month + , subq_0.ts__extract_day AS metric_time__extract_day + , subq_0.ts__extract_dow AS metric_time__extract_dow + , subq_0.ts__extract_doy AS metric_time__extract_doy + FROM ( + -- Time Spine + SELECT + DATE_TRUNC('millisecond', time_spine_src_28002.ts) AS ts__millisecond + , DATE_TRUNC('second', time_spine_src_28002.ts) AS ts__second + , DATE_TRUNC('minute', time_spine_src_28002.ts) AS ts__minute + , DATE_TRUNC('hour', time_spine_src_28002.ts) AS ts__hour + , DATE_TRUNC('day', time_spine_src_28002.ts) AS ts__day + , DATE_TRUNC('week', time_spine_src_28002.ts) AS ts__week + , DATE_TRUNC('month', time_spine_src_28002.ts) AS ts__month + , DATE_TRUNC('quarter', time_spine_src_28002.ts) AS ts__quarter + , DATE_TRUNC('year', time_spine_src_28002.ts) AS ts__year + , EXTRACT(year FROM time_spine_src_28002.ts) AS ts__extract_year + , EXTRACT(quarter FROM time_spine_src_28002.ts) AS ts__extract_quarter + , EXTRACT(month FROM time_spine_src_28002.ts) AS ts__extract_month + , EXTRACT(day FROM time_spine_src_28002.ts) AS ts__extract_day + , EXTRACT(dayofweekiso FROM time_spine_src_28002.ts) AS ts__extract_dow + , EXTRACT(doy FROM time_spine_src_28002.ts) AS ts__extract_doy + FROM ***************************.mf_time_spine_millisecond time_spine_src_28002 + ) subq_0 +) subq_1 +GROUP BY + subq_1.metric_time__millisecond diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_metric_time__plan0_optimized.sql new file mode 100644 index 0000000000..6bc0e3fe94 --- /dev/null +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_metric_time__plan0_optimized.sql @@ -0,0 +1,8 @@ +-- Time Spine +-- Metric Time Dimension 'ts' +-- Pass Only Elements: ['metric_time__millisecond',] +SELECT + DATE_TRUNC('millisecond', ts) AS metric_time__millisecond +FROM ***************************.mf_time_spine_millisecond time_spine_src_28002 +GROUP BY + DATE_TRUNC('millisecond', ts) diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_dimension__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_dimension__plan0.sql new file mode 100644 index 0000000000..32ff8427db --- /dev/null +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_dimension__plan0.sql @@ -0,0 +1,187 @@ +-- Pass Only Elements: ['user__bio_added_ts__second',] +SELECT + subq_0.user__bio_added_ts__second +FROM ( + -- Read Elements From Semantic Model 'users_ds_source' + SELECT + DATE_TRUNC('day', users_ds_source_src_28000.ds) AS ds__day + , DATE_TRUNC('week', users_ds_source_src_28000.ds) AS ds__week + , DATE_TRUNC('month', users_ds_source_src_28000.ds) AS ds__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.ds) AS ds__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.ds) AS ds__year + , EXTRACT(year FROM users_ds_source_src_28000.ds) AS ds__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.ds) AS ds__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.ds) AS ds__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.ds) AS ds__extract_day + , EXTRACT(DAY_OF_WEEK FROM users_ds_source_src_28000.ds) AS ds__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.ds) AS ds__extract_doy + , DATE_TRUNC('day', users_ds_source_src_28000.created_at) AS created_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.created_at) AS created_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.created_at) AS created_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.created_at) AS created_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.created_at) AS created_at__year + , EXTRACT(year FROM users_ds_source_src_28000.created_at) AS created_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.created_at) AS created_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.created_at) AS created_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.created_at) AS created_at__extract_day + , EXTRACT(DAY_OF_WEEK FROM users_ds_source_src_28000.created_at) AS created_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.created_at) AS created_at__extract_doy + , DATE_TRUNC('day', users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__day + , DATE_TRUNC('week', users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__week + , DATE_TRUNC('month', users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__year + , EXTRACT(year FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_day + , EXTRACT(DAY_OF_WEEK FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_doy + , users_ds_source_src_28000.home_state + , DATE_TRUNC('millisecond', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__millisecond + , DATE_TRUNC('second', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_day + , EXTRACT(DAY_OF_WEEK FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_doy + , DATE_TRUNC('second', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_day + , EXTRACT(DAY_OF_WEEK FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_doy + , DATE_TRUNC('minute', users_ds_source_src_28000.last_login_ts) AS last_login_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_login_ts) AS last_login_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_login_ts) AS last_login_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_login_ts) AS last_login_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_login_ts) AS last_login_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_login_ts) AS last_login_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_login_ts) AS last_login_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_day + , EXTRACT(DAY_OF_WEEK FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_doy + , DATE_TRUNC('hour', users_ds_source_src_28000.archived_at) AS archived_at__hour + , DATE_TRUNC('day', users_ds_source_src_28000.archived_at) AS archived_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.archived_at) AS archived_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.archived_at) AS archived_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.archived_at) AS archived_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.archived_at) AS archived_at__year + , EXTRACT(year FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_day + , EXTRACT(DAY_OF_WEEK FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_doy + , DATE_TRUNC('day', users_ds_source_src_28000.ds) AS user__ds__day + , DATE_TRUNC('week', users_ds_source_src_28000.ds) AS user__ds__week + , DATE_TRUNC('month', users_ds_source_src_28000.ds) AS user__ds__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.ds) AS user__ds__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.ds) AS user__ds__year + , EXTRACT(year FROM users_ds_source_src_28000.ds) AS user__ds__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.ds) AS user__ds__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.ds) AS user__ds__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.ds) AS user__ds__extract_day + , EXTRACT(DAY_OF_WEEK FROM users_ds_source_src_28000.ds) AS user__ds__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.ds) AS user__ds__extract_doy + , DATE_TRUNC('day', users_ds_source_src_28000.created_at) AS user__created_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.created_at) AS user__created_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.created_at) AS user__created_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.created_at) AS user__created_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.created_at) AS user__created_at__year + , EXTRACT(year FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_day + , EXTRACT(DAY_OF_WEEK FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.created_at) AS user__created_at__extract_doy + , DATE_TRUNC('day', users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__day + , DATE_TRUNC('week', users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__week + , DATE_TRUNC('month', users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__year + , EXTRACT(year FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_day + , EXTRACT(DAY_OF_WEEK FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_doy + , users_ds_source_src_28000.home_state AS user__home_state + , DATE_TRUNC('millisecond', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__millisecond + , DATE_TRUNC('second', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_day + , EXTRACT(DAY_OF_WEEK FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_doy + , DATE_TRUNC('second', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_day + , EXTRACT(DAY_OF_WEEK FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_doy + , DATE_TRUNC('minute', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_day + , EXTRACT(DAY_OF_WEEK FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_doy + , DATE_TRUNC('hour', users_ds_source_src_28000.archived_at) AS user__archived_at__hour + , DATE_TRUNC('day', users_ds_source_src_28000.archived_at) AS user__archived_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.archived_at) AS user__archived_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.archived_at) AS user__archived_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.archived_at) AS user__archived_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.archived_at) AS user__archived_at__year + , EXTRACT(year FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_day + , EXTRACT(DAY_OF_WEEK FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_doy + , users_ds_source_src_28000.user_id AS user + FROM ***************************.dim_users users_ds_source_src_28000 +) subq_0 +GROUP BY + subq_0.user__bio_added_ts__second diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_dimension__plan0_optimized.sql new file mode 100644 index 0000000000..b7bf7d7395 --- /dev/null +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_dimension__plan0_optimized.sql @@ -0,0 +1,7 @@ +-- Read Elements From Semantic Model 'users_ds_source' +-- Pass Only Elements: ['user__bio_added_ts__second',] +SELECT + DATE_TRUNC('second', bio_added_ts) AS user__bio_added_ts__second +FROM ***************************.dim_users users_ds_source_src_28000 +GROUP BY + DATE_TRUNC('second', bio_added_ts) diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_metric_time__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_metric_time__plan0.sql new file mode 100644 index 0000000000..58d3c2359f --- /dev/null +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_metric_time__plan0.sql @@ -0,0 +1,59 @@ +-- Pass Only Elements: ['metric_time__millisecond',] +SELECT + subq_1.metric_time__millisecond +FROM ( + -- Metric Time Dimension 'ts' + SELECT + subq_0.ts__millisecond + , subq_0.ts__second + , subq_0.ts__minute + , subq_0.ts__hour + , subq_0.ts__day + , subq_0.ts__week + , subq_0.ts__month + , subq_0.ts__quarter + , subq_0.ts__year + , subq_0.ts__extract_year + , subq_0.ts__extract_quarter + , subq_0.ts__extract_month + , subq_0.ts__extract_day + , subq_0.ts__extract_dow + , subq_0.ts__extract_doy + , subq_0.ts__millisecond AS metric_time__millisecond + , subq_0.ts__second AS metric_time__second + , subq_0.ts__minute AS metric_time__minute + , subq_0.ts__hour AS metric_time__hour + , subq_0.ts__day AS metric_time__day + , subq_0.ts__week AS metric_time__week + , subq_0.ts__month AS metric_time__month + , subq_0.ts__quarter AS metric_time__quarter + , subq_0.ts__year AS metric_time__year + , subq_0.ts__extract_year AS metric_time__extract_year + , subq_0.ts__extract_quarter AS metric_time__extract_quarter + , subq_0.ts__extract_month AS metric_time__extract_month + , subq_0.ts__extract_day AS metric_time__extract_day + , subq_0.ts__extract_dow AS metric_time__extract_dow + , subq_0.ts__extract_doy AS metric_time__extract_doy + FROM ( + -- Time Spine + SELECT + DATE_TRUNC('millisecond', time_spine_src_28002.ts) AS ts__millisecond + , DATE_TRUNC('second', time_spine_src_28002.ts) AS ts__second + , DATE_TRUNC('minute', time_spine_src_28002.ts) AS ts__minute + , DATE_TRUNC('hour', time_spine_src_28002.ts) AS ts__hour + , DATE_TRUNC('day', time_spine_src_28002.ts) AS ts__day + , DATE_TRUNC('week', time_spine_src_28002.ts) AS ts__week + , DATE_TRUNC('month', time_spine_src_28002.ts) AS ts__month + , DATE_TRUNC('quarter', time_spine_src_28002.ts) AS ts__quarter + , DATE_TRUNC('year', time_spine_src_28002.ts) AS ts__year + , EXTRACT(year FROM time_spine_src_28002.ts) AS ts__extract_year + , EXTRACT(quarter FROM time_spine_src_28002.ts) AS ts__extract_quarter + , EXTRACT(month FROM time_spine_src_28002.ts) AS ts__extract_month + , EXTRACT(day FROM time_spine_src_28002.ts) AS ts__extract_day + , EXTRACT(DAY_OF_WEEK FROM time_spine_src_28002.ts) AS ts__extract_dow + , EXTRACT(doy FROM time_spine_src_28002.ts) AS ts__extract_doy + FROM ***************************.mf_time_spine_millisecond time_spine_src_28002 + ) subq_0 +) subq_1 +GROUP BY + subq_1.metric_time__millisecond diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_metric_time__plan0_optimized.sql new file mode 100644 index 0000000000..6bc0e3fe94 --- /dev/null +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_metric_time__plan0_optimized.sql @@ -0,0 +1,8 @@ +-- Time Spine +-- Metric Time Dimension 'ts' +-- Pass Only Elements: ['metric_time__millisecond',] +SELECT + DATE_TRUNC('millisecond', ts) AS metric_time__millisecond +FROM ***************************.mf_time_spine_millisecond time_spine_src_28002 +GROUP BY + DATE_TRUNC('millisecond', ts) diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_dimensions_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_dimensions_with_time_constraint__plan0.sql index d79391ab01..98928afa92 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_dimensions_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_dimensions_with_time_constraint__plan0.sql @@ -218,18 +218,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATETIME_TRUNC(time_spine_src_28000.ds, day) AS ds__day - , DATETIME_TRUNC(time_spine_src_28000.ds, isoweek) AS ds__week - , DATETIME_TRUNC(time_spine_src_28000.ds, month) AS ds__month - , DATETIME_TRUNC(time_spine_src_28000.ds, quarter) AS ds__quarter - , DATETIME_TRUNC(time_spine_src_28000.ds, year) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , IF(EXTRACT(dayofweek FROM time_spine_src_28000.ds) = 1, 7, EXTRACT(dayofweek FROM time_spine_src_28000.ds) - 1) AS ds__extract_dow - , EXTRACT(dayofyear FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATETIME_TRUNC(time_spine_src_28006.ds, day) AS ds__day + , DATETIME_TRUNC(time_spine_src_28006.ds, isoweek) AS ds__week + , DATETIME_TRUNC(time_spine_src_28006.ds, month) AS ds__month + , DATETIME_TRUNC(time_spine_src_28006.ds, quarter) AS ds__quarter + , DATETIME_TRUNC(time_spine_src_28006.ds, year) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , IF(EXTRACT(dayofweek FROM time_spine_src_28006.ds) = 1, 7, EXTRACT(dayofweek FROM time_spine_src_28006.ds) - 1) AS ds__extract_dow + , EXTRACT(dayofyear FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_1 ) subq_2 ) subq_3 diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_dimensions_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_dimensions_with_time_constraint__plan0_optimized.sql index e939afb66d..ee11e39060 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_dimensions_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_dimensions_with_time_constraint__plan0_optimized.sql @@ -2,17 +2,17 @@ -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-03T00:00:00] -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT - DATETIME_TRUNC(time_spine_src_28000.ds, day) AS metric_time__day + DATETIME_TRUNC(time_spine_src_28006.ds, day) AS metric_time__day , listings_latest_src_28000.is_lux AS listing__is_lux_latest , users_latest_src_28000.home_state_latest AS user__home_state_latest FROM ***************************.dim_listings_latest listings_latest_src_28000 CROSS JOIN - ***************************.mf_time_spine time_spine_src_28000 + ***************************.mf_time_spine time_spine_src_28006 FULL OUTER JOIN ***************************.dim_users_latest users_latest_src_28000 ON listings_latest_src_28000.user_id = users_latest_src_28000.user_id -WHERE DATETIME_TRUNC(time_spine_src_28000.ds, day) BETWEEN '2020-01-01' AND '2020-01-03' +WHERE DATETIME_TRUNC(time_spine_src_28006.ds, day) BETWEEN '2020-01-01' AND '2020-01-03' GROUP BY metric_time__day , listing__is_lux_latest diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_only__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_only__plan0.sql index a5ac99c303..7c7c84cde3 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_only__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_only__plan0.sql @@ -29,18 +29,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATETIME_TRUNC(time_spine_src_28000.ds, day) AS ds__day - , DATETIME_TRUNC(time_spine_src_28000.ds, isoweek) AS ds__week - , DATETIME_TRUNC(time_spine_src_28000.ds, month) AS ds__month - , DATETIME_TRUNC(time_spine_src_28000.ds, quarter) AS ds__quarter - , DATETIME_TRUNC(time_spine_src_28000.ds, year) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , IF(EXTRACT(dayofweek FROM time_spine_src_28000.ds) = 1, 7, EXTRACT(dayofweek FROM time_spine_src_28000.ds) - 1) AS ds__extract_dow - , EXTRACT(dayofyear FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATETIME_TRUNC(time_spine_src_28006.ds, day) AS ds__day + , DATETIME_TRUNC(time_spine_src_28006.ds, isoweek) AS ds__week + , DATETIME_TRUNC(time_spine_src_28006.ds, month) AS ds__month + , DATETIME_TRUNC(time_spine_src_28006.ds, quarter) AS ds__quarter + , DATETIME_TRUNC(time_spine_src_28006.ds, year) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , IF(EXTRACT(dayofweek FROM time_spine_src_28006.ds) = 1, 7, EXTRACT(dayofweek FROM time_spine_src_28006.ds) - 1) AS ds__extract_dow + , EXTRACT(dayofyear FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_0 ) subq_1 GROUP BY diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_only__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_only__plan0_optimized.sql index e3d2c86221..aefc098bd3 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_only__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_only__plan0_optimized.sql @@ -3,6 +3,6 @@ -- Pass Only Elements: ['metric_time__day',] SELECT DATETIME_TRUNC(ds, day) AS metric_time__day -FROM ***************************.mf_time_spine time_spine_src_28000 +FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_quarter_alone__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_quarter_alone__plan0.sql index 46093b139a..0e8fd5fcfc 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_quarter_alone__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_quarter_alone__plan0.sql @@ -29,18 +29,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATETIME_TRUNC(time_spine_src_28000.ds, day) AS ds__day - , DATETIME_TRUNC(time_spine_src_28000.ds, isoweek) AS ds__week - , DATETIME_TRUNC(time_spine_src_28000.ds, month) AS ds__month - , DATETIME_TRUNC(time_spine_src_28000.ds, quarter) AS ds__quarter - , DATETIME_TRUNC(time_spine_src_28000.ds, year) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , IF(EXTRACT(dayofweek FROM time_spine_src_28000.ds) = 1, 7, EXTRACT(dayofweek FROM time_spine_src_28000.ds) - 1) AS ds__extract_dow - , EXTRACT(dayofyear FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATETIME_TRUNC(time_spine_src_28006.ds, day) AS ds__day + , DATETIME_TRUNC(time_spine_src_28006.ds, isoweek) AS ds__week + , DATETIME_TRUNC(time_spine_src_28006.ds, month) AS ds__month + , DATETIME_TRUNC(time_spine_src_28006.ds, quarter) AS ds__quarter + , DATETIME_TRUNC(time_spine_src_28006.ds, year) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , IF(EXTRACT(dayofweek FROM time_spine_src_28006.ds) = 1, 7, EXTRACT(dayofweek FROM time_spine_src_28006.ds) - 1) AS ds__extract_dow + , EXTRACT(dayofyear FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_0 ) subq_1 GROUP BY diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_quarter_alone__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_quarter_alone__plan0_optimized.sql index 7f99e4d431..81ede48103 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_quarter_alone__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_quarter_alone__plan0_optimized.sql @@ -3,6 +3,6 @@ -- Pass Only Elements: ['metric_time__quarter',] SELECT DATETIME_TRUNC(ds, quarter) AS metric_time__quarter -FROM ***************************.mf_time_spine time_spine_src_28000 +FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY metric_time__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_with_other_dimensions__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_with_other_dimensions__plan0.sql index f8d8755c47..161bc57c9f 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_with_other_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_with_other_dimensions__plan0.sql @@ -157,18 +157,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATETIME_TRUNC(time_spine_src_28000.ds, day) AS ds__day - , DATETIME_TRUNC(time_spine_src_28000.ds, isoweek) AS ds__week - , DATETIME_TRUNC(time_spine_src_28000.ds, month) AS ds__month - , DATETIME_TRUNC(time_spine_src_28000.ds, quarter) AS ds__quarter - , DATETIME_TRUNC(time_spine_src_28000.ds, year) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , IF(EXTRACT(dayofweek FROM time_spine_src_28000.ds) = 1, 7, EXTRACT(dayofweek FROM time_spine_src_28000.ds) - 1) AS ds__extract_dow - , EXTRACT(dayofyear FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATETIME_TRUNC(time_spine_src_28006.ds, day) AS ds__day + , DATETIME_TRUNC(time_spine_src_28006.ds, isoweek) AS ds__week + , DATETIME_TRUNC(time_spine_src_28006.ds, month) AS ds__month + , DATETIME_TRUNC(time_spine_src_28006.ds, quarter) AS ds__quarter + , DATETIME_TRUNC(time_spine_src_28006.ds, year) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , IF(EXTRACT(dayofweek FROM time_spine_src_28006.ds) = 1, 7, EXTRACT(dayofweek FROM time_spine_src_28006.ds) - 1) AS ds__extract_dow + , EXTRACT(dayofyear FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_1 ) subq_2 ) subq_3 diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_with_other_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_with_other_dimensions__plan0_optimized.sql index 0ab00225f9..f03a3399ee 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_with_other_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_with_other_dimensions__plan0_optimized.sql @@ -1,12 +1,12 @@ -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT - DATETIME_TRUNC(time_spine_src_28000.ds, day) AS metric_time__day + DATETIME_TRUNC(time_spine_src_28006.ds, day) AS metric_time__day , listings_latest_src_28000.is_lux AS listing__is_lux_latest , users_latest_src_28000.home_state_latest AS user__home_state_latest FROM ***************************.dim_listings_latest listings_latest_src_28000 CROSS JOIN - ***************************.mf_time_spine time_spine_src_28000 + ***************************.mf_time_spine time_spine_src_28006 FULL OUTER JOIN ***************************.dim_users_latest users_latest_src_28000 ON diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_dimensions_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_dimensions_with_time_constraint__plan0.sql index c158a74935..f28a1aed0c 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_dimensions_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_dimensions_with_time_constraint__plan0.sql @@ -218,18 +218,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , EXTRACT(DAYOFWEEK_ISO FROM time_spine_src_28000.ds) AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , EXTRACT(DAYOFWEEK_ISO FROM time_spine_src_28006.ds) AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_1 ) subq_2 ) subq_3 diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_dimensions_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_dimensions_with_time_constraint__plan0_optimized.sql index 96a96bb787..f7f473a317 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_dimensions_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_dimensions_with_time_constraint__plan0_optimized.sql @@ -2,18 +2,18 @@ -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-03T00:00:00] -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS metric_time__day + DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day , listings_latest_src_28000.is_lux AS listing__is_lux_latest , users_latest_src_28000.home_state_latest AS user__home_state_latest FROM ***************************.dim_listings_latest listings_latest_src_28000 CROSS JOIN - ***************************.mf_time_spine time_spine_src_28000 + ***************************.mf_time_spine time_spine_src_28006 FULL OUTER JOIN ***************************.dim_users_latest users_latest_src_28000 ON listings_latest_src_28000.user_id = users_latest_src_28000.user_id -WHERE DATE_TRUNC('day', time_spine_src_28000.ds) BETWEEN '2020-01-01' AND '2020-01-03' +WHERE DATE_TRUNC('day', time_spine_src_28006.ds) BETWEEN '2020-01-01' AND '2020-01-03' GROUP BY - DATE_TRUNC('day', time_spine_src_28000.ds) + DATE_TRUNC('day', time_spine_src_28006.ds) , listings_latest_src_28000.is_lux , users_latest_src_28000.home_state_latest diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_only__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_only__plan0.sql index 12f243442c..27ff087a4a 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_only__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_only__plan0.sql @@ -29,18 +29,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , EXTRACT(DAYOFWEEK_ISO FROM time_spine_src_28000.ds) AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , EXTRACT(DAYOFWEEK_ISO FROM time_spine_src_28006.ds) AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_0 ) subq_1 GROUP BY diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_only__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_only__plan0_optimized.sql index 2eed8d0c4b..ec27d0d54a 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_only__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_only__plan0_optimized.sql @@ -3,6 +3,6 @@ -- Pass Only Elements: ['metric_time__day',] SELECT DATE_TRUNC('day', ds) AS metric_time__day -FROM ***************************.mf_time_spine time_spine_src_28000 +FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY DATE_TRUNC('day', ds) diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_quarter_alone__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_quarter_alone__plan0.sql index 5f56894a6b..939c04fbd5 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_quarter_alone__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_quarter_alone__plan0.sql @@ -29,18 +29,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , EXTRACT(DAYOFWEEK_ISO FROM time_spine_src_28000.ds) AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , EXTRACT(DAYOFWEEK_ISO FROM time_spine_src_28006.ds) AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_0 ) subq_1 GROUP BY diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_quarter_alone__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_quarter_alone__plan0_optimized.sql index 89d1d3d730..d33ecb7c33 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_quarter_alone__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_quarter_alone__plan0_optimized.sql @@ -3,6 +3,6 @@ -- Pass Only Elements: ['metric_time__quarter',] SELECT DATE_TRUNC('quarter', ds) AS metric_time__quarter -FROM ***************************.mf_time_spine time_spine_src_28000 +FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY DATE_TRUNC('quarter', ds) diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_with_other_dimensions__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_with_other_dimensions__plan0.sql index 5ec23f6eba..3bb8f19c72 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_with_other_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_with_other_dimensions__plan0.sql @@ -157,18 +157,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , EXTRACT(DAYOFWEEK_ISO FROM time_spine_src_28000.ds) AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , EXTRACT(DAYOFWEEK_ISO FROM time_spine_src_28006.ds) AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_1 ) subq_2 ) subq_3 diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_with_other_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_with_other_dimensions__plan0_optimized.sql index f029b6173e..68e7b122d2 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_with_other_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_with_other_dimensions__plan0_optimized.sql @@ -1,17 +1,17 @@ -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS metric_time__day + DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day , listings_latest_src_28000.is_lux AS listing__is_lux_latest , users_latest_src_28000.home_state_latest AS user__home_state_latest FROM ***************************.dim_listings_latest listings_latest_src_28000 CROSS JOIN - ***************************.mf_time_spine time_spine_src_28000 + ***************************.mf_time_spine time_spine_src_28006 FULL OUTER JOIN ***************************.dim_users_latest users_latest_src_28000 ON listings_latest_src_28000.user_id = users_latest_src_28000.user_id GROUP BY - DATE_TRUNC('day', time_spine_src_28000.ds) + DATE_TRUNC('day', time_spine_src_28006.ds) , listings_latest_src_28000.is_lux , users_latest_src_28000.home_state_latest diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_dimensions_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_dimensions_with_time_constraint__plan0.sql index 1e42a5d726..4fa1768bc7 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_dimensions_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_dimensions_with_time_constraint__plan0.sql @@ -218,18 +218,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , EXTRACT(isodow FROM time_spine_src_28000.ds) AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , EXTRACT(isodow FROM time_spine_src_28006.ds) AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_1 ) subq_2 ) subq_3 diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_dimensions_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_dimensions_with_time_constraint__plan0_optimized.sql index 96a96bb787..f7f473a317 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_dimensions_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_dimensions_with_time_constraint__plan0_optimized.sql @@ -2,18 +2,18 @@ -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-03T00:00:00] -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS metric_time__day + DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day , listings_latest_src_28000.is_lux AS listing__is_lux_latest , users_latest_src_28000.home_state_latest AS user__home_state_latest FROM ***************************.dim_listings_latest listings_latest_src_28000 CROSS JOIN - ***************************.mf_time_spine time_spine_src_28000 + ***************************.mf_time_spine time_spine_src_28006 FULL OUTER JOIN ***************************.dim_users_latest users_latest_src_28000 ON listings_latest_src_28000.user_id = users_latest_src_28000.user_id -WHERE DATE_TRUNC('day', time_spine_src_28000.ds) BETWEEN '2020-01-01' AND '2020-01-03' +WHERE DATE_TRUNC('day', time_spine_src_28006.ds) BETWEEN '2020-01-01' AND '2020-01-03' GROUP BY - DATE_TRUNC('day', time_spine_src_28000.ds) + DATE_TRUNC('day', time_spine_src_28006.ds) , listings_latest_src_28000.is_lux , users_latest_src_28000.home_state_latest diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_only__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_only__plan0.sql index c6bb4bb18f..b7efe020e7 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_only__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_only__plan0.sql @@ -29,18 +29,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , EXTRACT(isodow FROM time_spine_src_28000.ds) AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , EXTRACT(isodow FROM time_spine_src_28006.ds) AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_0 ) subq_1 GROUP BY diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_only__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_only__plan0_optimized.sql index 2eed8d0c4b..ec27d0d54a 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_only__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_only__plan0_optimized.sql @@ -3,6 +3,6 @@ -- Pass Only Elements: ['metric_time__day',] SELECT DATE_TRUNC('day', ds) AS metric_time__day -FROM ***************************.mf_time_spine time_spine_src_28000 +FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY DATE_TRUNC('day', ds) diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_quarter_alone__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_quarter_alone__plan0.sql index a1584ad35b..a719a46832 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_quarter_alone__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_quarter_alone__plan0.sql @@ -29,18 +29,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , EXTRACT(isodow FROM time_spine_src_28000.ds) AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , EXTRACT(isodow FROM time_spine_src_28006.ds) AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_0 ) subq_1 GROUP BY diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_quarter_alone__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_quarter_alone__plan0_optimized.sql index 89d1d3d730..d33ecb7c33 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_quarter_alone__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_quarter_alone__plan0_optimized.sql @@ -3,6 +3,6 @@ -- Pass Only Elements: ['metric_time__quarter',] SELECT DATE_TRUNC('quarter', ds) AS metric_time__quarter -FROM ***************************.mf_time_spine time_spine_src_28000 +FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY DATE_TRUNC('quarter', ds) diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_with_other_dimensions__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_with_other_dimensions__plan0.sql index 44f88a1efd..0ca186e4af 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_with_other_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_with_other_dimensions__plan0.sql @@ -157,18 +157,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , EXTRACT(isodow FROM time_spine_src_28000.ds) AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , EXTRACT(isodow FROM time_spine_src_28006.ds) AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_1 ) subq_2 ) subq_3 diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_with_other_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_with_other_dimensions__plan0_optimized.sql index f029b6173e..68e7b122d2 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_with_other_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_with_other_dimensions__plan0_optimized.sql @@ -1,17 +1,17 @@ -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS metric_time__day + DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day , listings_latest_src_28000.is_lux AS listing__is_lux_latest , users_latest_src_28000.home_state_latest AS user__home_state_latest FROM ***************************.dim_listings_latest listings_latest_src_28000 CROSS JOIN - ***************************.mf_time_spine time_spine_src_28000 + ***************************.mf_time_spine time_spine_src_28006 FULL OUTER JOIN ***************************.dim_users_latest users_latest_src_28000 ON listings_latest_src_28000.user_id = users_latest_src_28000.user_id GROUP BY - DATE_TRUNC('day', time_spine_src_28000.ds) + DATE_TRUNC('day', time_spine_src_28006.ds) , listings_latest_src_28000.is_lux , users_latest_src_28000.home_state_latest diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_dimensions_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_dimensions_with_time_constraint__plan0.sql index 1e42a5d726..4fa1768bc7 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_dimensions_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_dimensions_with_time_constraint__plan0.sql @@ -218,18 +218,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , EXTRACT(isodow FROM time_spine_src_28000.ds) AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , EXTRACT(isodow FROM time_spine_src_28006.ds) AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_1 ) subq_2 ) subq_3 diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_dimensions_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_dimensions_with_time_constraint__plan0_optimized.sql index 96a96bb787..f7f473a317 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_dimensions_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_dimensions_with_time_constraint__plan0_optimized.sql @@ -2,18 +2,18 @@ -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-03T00:00:00] -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS metric_time__day + DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day , listings_latest_src_28000.is_lux AS listing__is_lux_latest , users_latest_src_28000.home_state_latest AS user__home_state_latest FROM ***************************.dim_listings_latest listings_latest_src_28000 CROSS JOIN - ***************************.mf_time_spine time_spine_src_28000 + ***************************.mf_time_spine time_spine_src_28006 FULL OUTER JOIN ***************************.dim_users_latest users_latest_src_28000 ON listings_latest_src_28000.user_id = users_latest_src_28000.user_id -WHERE DATE_TRUNC('day', time_spine_src_28000.ds) BETWEEN '2020-01-01' AND '2020-01-03' +WHERE DATE_TRUNC('day', time_spine_src_28006.ds) BETWEEN '2020-01-01' AND '2020-01-03' GROUP BY - DATE_TRUNC('day', time_spine_src_28000.ds) + DATE_TRUNC('day', time_spine_src_28006.ds) , listings_latest_src_28000.is_lux , users_latest_src_28000.home_state_latest diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_only__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_only__plan0.sql index c6bb4bb18f..b7efe020e7 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_only__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_only__plan0.sql @@ -29,18 +29,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , EXTRACT(isodow FROM time_spine_src_28000.ds) AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , EXTRACT(isodow FROM time_spine_src_28006.ds) AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_0 ) subq_1 GROUP BY diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_only__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_only__plan0_optimized.sql index 2eed8d0c4b..ec27d0d54a 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_only__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_only__plan0_optimized.sql @@ -3,6 +3,6 @@ -- Pass Only Elements: ['metric_time__day',] SELECT DATE_TRUNC('day', ds) AS metric_time__day -FROM ***************************.mf_time_spine time_spine_src_28000 +FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY DATE_TRUNC('day', ds) diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_quarter_alone__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_quarter_alone__plan0.sql index a1584ad35b..a719a46832 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_quarter_alone__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_quarter_alone__plan0.sql @@ -29,18 +29,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , EXTRACT(isodow FROM time_spine_src_28000.ds) AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , EXTRACT(isodow FROM time_spine_src_28006.ds) AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_0 ) subq_1 GROUP BY diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_quarter_alone__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_quarter_alone__plan0_optimized.sql index 89d1d3d730..d33ecb7c33 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_quarter_alone__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_quarter_alone__plan0_optimized.sql @@ -3,6 +3,6 @@ -- Pass Only Elements: ['metric_time__quarter',] SELECT DATE_TRUNC('quarter', ds) AS metric_time__quarter -FROM ***************************.mf_time_spine time_spine_src_28000 +FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY DATE_TRUNC('quarter', ds) diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_with_other_dimensions__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_with_other_dimensions__plan0.sql index 44f88a1efd..0ca186e4af 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_with_other_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_with_other_dimensions__plan0.sql @@ -157,18 +157,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , EXTRACT(isodow FROM time_spine_src_28000.ds) AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , EXTRACT(isodow FROM time_spine_src_28006.ds) AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_1 ) subq_2 ) subq_3 diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_with_other_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_with_other_dimensions__plan0_optimized.sql index f029b6173e..68e7b122d2 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_with_other_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_with_other_dimensions__plan0_optimized.sql @@ -1,17 +1,17 @@ -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS metric_time__day + DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day , listings_latest_src_28000.is_lux AS listing__is_lux_latest , users_latest_src_28000.home_state_latest AS user__home_state_latest FROM ***************************.dim_listings_latest listings_latest_src_28000 CROSS JOIN - ***************************.mf_time_spine time_spine_src_28000 + ***************************.mf_time_spine time_spine_src_28006 FULL OUTER JOIN ***************************.dim_users_latest users_latest_src_28000 ON listings_latest_src_28000.user_id = users_latest_src_28000.user_id GROUP BY - DATE_TRUNC('day', time_spine_src_28000.ds) + DATE_TRUNC('day', time_spine_src_28006.ds) , listings_latest_src_28000.is_lux , users_latest_src_28000.home_state_latest diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_dimensions_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_dimensions_with_time_constraint__plan0.sql index 5d4572d904..c3937910b2 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_dimensions_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_dimensions_with_time_constraint__plan0.sql @@ -218,18 +218,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , CASE WHEN EXTRACT(dow FROM time_spine_src_28000.ds) = 0 THEN EXTRACT(dow FROM time_spine_src_28000.ds) + 7 ELSE EXTRACT(dow FROM time_spine_src_28000.ds) END AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , CASE WHEN EXTRACT(dow FROM time_spine_src_28006.ds) = 0 THEN EXTRACT(dow FROM time_spine_src_28006.ds) + 7 ELSE EXTRACT(dow FROM time_spine_src_28006.ds) END AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_1 ) subq_2 ) subq_3 diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_dimensions_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_dimensions_with_time_constraint__plan0_optimized.sql index 96a96bb787..f7f473a317 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_dimensions_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_dimensions_with_time_constraint__plan0_optimized.sql @@ -2,18 +2,18 @@ -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-03T00:00:00] -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS metric_time__day + DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day , listings_latest_src_28000.is_lux AS listing__is_lux_latest , users_latest_src_28000.home_state_latest AS user__home_state_latest FROM ***************************.dim_listings_latest listings_latest_src_28000 CROSS JOIN - ***************************.mf_time_spine time_spine_src_28000 + ***************************.mf_time_spine time_spine_src_28006 FULL OUTER JOIN ***************************.dim_users_latest users_latest_src_28000 ON listings_latest_src_28000.user_id = users_latest_src_28000.user_id -WHERE DATE_TRUNC('day', time_spine_src_28000.ds) BETWEEN '2020-01-01' AND '2020-01-03' +WHERE DATE_TRUNC('day', time_spine_src_28006.ds) BETWEEN '2020-01-01' AND '2020-01-03' GROUP BY - DATE_TRUNC('day', time_spine_src_28000.ds) + DATE_TRUNC('day', time_spine_src_28006.ds) , listings_latest_src_28000.is_lux , users_latest_src_28000.home_state_latest diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_only__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_only__plan0.sql index 00fc8c8a34..f2ad087708 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_only__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_only__plan0.sql @@ -29,18 +29,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , CASE WHEN EXTRACT(dow FROM time_spine_src_28000.ds) = 0 THEN EXTRACT(dow FROM time_spine_src_28000.ds) + 7 ELSE EXTRACT(dow FROM time_spine_src_28000.ds) END AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , CASE WHEN EXTRACT(dow FROM time_spine_src_28006.ds) = 0 THEN EXTRACT(dow FROM time_spine_src_28006.ds) + 7 ELSE EXTRACT(dow FROM time_spine_src_28006.ds) END AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_0 ) subq_1 GROUP BY diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_only__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_only__plan0_optimized.sql index 2eed8d0c4b..ec27d0d54a 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_only__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_only__plan0_optimized.sql @@ -3,6 +3,6 @@ -- Pass Only Elements: ['metric_time__day',] SELECT DATE_TRUNC('day', ds) AS metric_time__day -FROM ***************************.mf_time_spine time_spine_src_28000 +FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY DATE_TRUNC('day', ds) diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_quarter_alone__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_quarter_alone__plan0.sql index d60589cfc7..a4f3a0d479 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_quarter_alone__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_quarter_alone__plan0.sql @@ -29,18 +29,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , CASE WHEN EXTRACT(dow FROM time_spine_src_28000.ds) = 0 THEN EXTRACT(dow FROM time_spine_src_28000.ds) + 7 ELSE EXTRACT(dow FROM time_spine_src_28000.ds) END AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , CASE WHEN EXTRACT(dow FROM time_spine_src_28006.ds) = 0 THEN EXTRACT(dow FROM time_spine_src_28006.ds) + 7 ELSE EXTRACT(dow FROM time_spine_src_28006.ds) END AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_0 ) subq_1 GROUP BY diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_quarter_alone__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_quarter_alone__plan0_optimized.sql index 89d1d3d730..d33ecb7c33 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_quarter_alone__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_quarter_alone__plan0_optimized.sql @@ -3,6 +3,6 @@ -- Pass Only Elements: ['metric_time__quarter',] SELECT DATE_TRUNC('quarter', ds) AS metric_time__quarter -FROM ***************************.mf_time_spine time_spine_src_28000 +FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY DATE_TRUNC('quarter', ds) diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_with_other_dimensions__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_with_other_dimensions__plan0.sql index 801a5743f3..fdaa63698b 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_with_other_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_with_other_dimensions__plan0.sql @@ -157,18 +157,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , CASE WHEN EXTRACT(dow FROM time_spine_src_28000.ds) = 0 THEN EXTRACT(dow FROM time_spine_src_28000.ds) + 7 ELSE EXTRACT(dow FROM time_spine_src_28000.ds) END AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , CASE WHEN EXTRACT(dow FROM time_spine_src_28006.ds) = 0 THEN EXTRACT(dow FROM time_spine_src_28006.ds) + 7 ELSE EXTRACT(dow FROM time_spine_src_28006.ds) END AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_1 ) subq_2 ) subq_3 diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_with_other_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_with_other_dimensions__plan0_optimized.sql index f029b6173e..68e7b122d2 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_with_other_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_with_other_dimensions__plan0_optimized.sql @@ -1,17 +1,17 @@ -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS metric_time__day + DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day , listings_latest_src_28000.is_lux AS listing__is_lux_latest , users_latest_src_28000.home_state_latest AS user__home_state_latest FROM ***************************.dim_listings_latest listings_latest_src_28000 CROSS JOIN - ***************************.mf_time_spine time_spine_src_28000 + ***************************.mf_time_spine time_spine_src_28006 FULL OUTER JOIN ***************************.dim_users_latest users_latest_src_28000 ON listings_latest_src_28000.user_id = users_latest_src_28000.user_id GROUP BY - DATE_TRUNC('day', time_spine_src_28000.ds) + DATE_TRUNC('day', time_spine_src_28006.ds) , listings_latest_src_28000.is_lux , users_latest_src_28000.home_state_latest diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_dimensions_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_dimensions_with_time_constraint__plan0.sql index 98667582a9..7fc222ee66 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_dimensions_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_dimensions_with_time_constraint__plan0.sql @@ -218,18 +218,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , EXTRACT(dayofweekiso FROM time_spine_src_28000.ds) AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , EXTRACT(dayofweekiso FROM time_spine_src_28006.ds) AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_1 ) subq_2 ) subq_3 diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_dimensions_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_dimensions_with_time_constraint__plan0_optimized.sql index 96a96bb787..f7f473a317 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_dimensions_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_dimensions_with_time_constraint__plan0_optimized.sql @@ -2,18 +2,18 @@ -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-03T00:00:00] -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS metric_time__day + DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day , listings_latest_src_28000.is_lux AS listing__is_lux_latest , users_latest_src_28000.home_state_latest AS user__home_state_latest FROM ***************************.dim_listings_latest listings_latest_src_28000 CROSS JOIN - ***************************.mf_time_spine time_spine_src_28000 + ***************************.mf_time_spine time_spine_src_28006 FULL OUTER JOIN ***************************.dim_users_latest users_latest_src_28000 ON listings_latest_src_28000.user_id = users_latest_src_28000.user_id -WHERE DATE_TRUNC('day', time_spine_src_28000.ds) BETWEEN '2020-01-01' AND '2020-01-03' +WHERE DATE_TRUNC('day', time_spine_src_28006.ds) BETWEEN '2020-01-01' AND '2020-01-03' GROUP BY - DATE_TRUNC('day', time_spine_src_28000.ds) + DATE_TRUNC('day', time_spine_src_28006.ds) , listings_latest_src_28000.is_lux , users_latest_src_28000.home_state_latest diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_only__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_only__plan0.sql index 5d5be88b9e..d3dc52558a 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_only__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_only__plan0.sql @@ -29,18 +29,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , EXTRACT(dayofweekiso FROM time_spine_src_28000.ds) AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , EXTRACT(dayofweekiso FROM time_spine_src_28006.ds) AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_0 ) subq_1 GROUP BY diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_only__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_only__plan0_optimized.sql index 2eed8d0c4b..ec27d0d54a 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_only__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_only__plan0_optimized.sql @@ -3,6 +3,6 @@ -- Pass Only Elements: ['metric_time__day',] SELECT DATE_TRUNC('day', ds) AS metric_time__day -FROM ***************************.mf_time_spine time_spine_src_28000 +FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY DATE_TRUNC('day', ds) diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_quarter_alone__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_quarter_alone__plan0.sql index 636a1ecd16..2f076adedb 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_quarter_alone__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_quarter_alone__plan0.sql @@ -29,18 +29,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , EXTRACT(dayofweekiso FROM time_spine_src_28000.ds) AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , EXTRACT(dayofweekiso FROM time_spine_src_28006.ds) AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_0 ) subq_1 GROUP BY diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_quarter_alone__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_quarter_alone__plan0_optimized.sql index 89d1d3d730..d33ecb7c33 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_quarter_alone__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_quarter_alone__plan0_optimized.sql @@ -3,6 +3,6 @@ -- Pass Only Elements: ['metric_time__quarter',] SELECT DATE_TRUNC('quarter', ds) AS metric_time__quarter -FROM ***************************.mf_time_spine time_spine_src_28000 +FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY DATE_TRUNC('quarter', ds) diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_with_other_dimensions__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_with_other_dimensions__plan0.sql index a5c5e24b30..0b393e86b3 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_with_other_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_with_other_dimensions__plan0.sql @@ -157,18 +157,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , EXTRACT(dayofweekiso FROM time_spine_src_28000.ds) AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , EXTRACT(dayofweekiso FROM time_spine_src_28006.ds) AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_1 ) subq_2 ) subq_3 diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_with_other_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_with_other_dimensions__plan0_optimized.sql index f029b6173e..68e7b122d2 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_with_other_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_with_other_dimensions__plan0_optimized.sql @@ -1,17 +1,17 @@ -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS metric_time__day + DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day , listings_latest_src_28000.is_lux AS listing__is_lux_latest , users_latest_src_28000.home_state_latest AS user__home_state_latest FROM ***************************.dim_listings_latest listings_latest_src_28000 CROSS JOIN - ***************************.mf_time_spine time_spine_src_28000 + ***************************.mf_time_spine time_spine_src_28006 FULL OUTER JOIN ***************************.dim_users_latest users_latest_src_28000 ON listings_latest_src_28000.user_id = users_latest_src_28000.user_id GROUP BY - DATE_TRUNC('day', time_spine_src_28000.ds) + DATE_TRUNC('day', time_spine_src_28006.ds) , listings_latest_src_28000.is_lux , users_latest_src_28000.home_state_latest diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_dimensions_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_dimensions_with_time_constraint__plan0.sql index 89ae3ebda3..2cd56fbc7e 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_dimensions_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_dimensions_with_time_constraint__plan0.sql @@ -218,18 +218,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , EXTRACT(DAY_OF_WEEK FROM time_spine_src_28000.ds) AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , EXTRACT(DAY_OF_WEEK FROM time_spine_src_28006.ds) AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_1 ) subq_2 ) subq_3 diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_dimensions_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_dimensions_with_time_constraint__plan0_optimized.sql index 864a5c757f..cd1bf9a23e 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_dimensions_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_dimensions_with_time_constraint__plan0_optimized.sql @@ -2,18 +2,18 @@ -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-03T00:00:00] -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS metric_time__day + DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day , listings_latest_src_28000.is_lux AS listing__is_lux_latest , users_latest_src_28000.home_state_latest AS user__home_state_latest FROM ***************************.dim_listings_latest listings_latest_src_28000 CROSS JOIN - ***************************.mf_time_spine time_spine_src_28000 + ***************************.mf_time_spine time_spine_src_28006 FULL OUTER JOIN ***************************.dim_users_latest users_latest_src_28000 ON listings_latest_src_28000.user_id = users_latest_src_28000.user_id -WHERE DATE_TRUNC('day', time_spine_src_28000.ds) BETWEEN timestamp '2020-01-01' AND timestamp '2020-01-03' +WHERE DATE_TRUNC('day', time_spine_src_28006.ds) BETWEEN timestamp '2020-01-01' AND timestamp '2020-01-03' GROUP BY - DATE_TRUNC('day', time_spine_src_28000.ds) + DATE_TRUNC('day', time_spine_src_28006.ds) , listings_latest_src_28000.is_lux , users_latest_src_28000.home_state_latest diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_only__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_only__plan0.sql index 863f81b097..3c0778b8c2 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_only__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_only__plan0.sql @@ -29,18 +29,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , EXTRACT(DAY_OF_WEEK FROM time_spine_src_28000.ds) AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , EXTRACT(DAY_OF_WEEK FROM time_spine_src_28006.ds) AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_0 ) subq_1 GROUP BY diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_only__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_only__plan0_optimized.sql index 2eed8d0c4b..ec27d0d54a 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_only__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_only__plan0_optimized.sql @@ -3,6 +3,6 @@ -- Pass Only Elements: ['metric_time__day',] SELECT DATE_TRUNC('day', ds) AS metric_time__day -FROM ***************************.mf_time_spine time_spine_src_28000 +FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY DATE_TRUNC('day', ds) diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_quarter_alone__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_quarter_alone__plan0.sql index e2652152ca..d18942fc1e 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_quarter_alone__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_quarter_alone__plan0.sql @@ -29,18 +29,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , EXTRACT(DAY_OF_WEEK FROM time_spine_src_28000.ds) AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , EXTRACT(DAY_OF_WEEK FROM time_spine_src_28006.ds) AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_0 ) subq_1 GROUP BY diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_quarter_alone__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_quarter_alone__plan0_optimized.sql index 89d1d3d730..d33ecb7c33 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_quarter_alone__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_quarter_alone__plan0_optimized.sql @@ -3,6 +3,6 @@ -- Pass Only Elements: ['metric_time__quarter',] SELECT DATE_TRUNC('quarter', ds) AS metric_time__quarter -FROM ***************************.mf_time_spine time_spine_src_28000 +FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY DATE_TRUNC('quarter', ds) diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_with_other_dimensions__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_with_other_dimensions__plan0.sql index 99af6dace4..1c5714bc87 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_with_other_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_with_other_dimensions__plan0.sql @@ -157,18 +157,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , EXTRACT(DAY_OF_WEEK FROM time_spine_src_28000.ds) AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , EXTRACT(DAY_OF_WEEK FROM time_spine_src_28006.ds) AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_1 ) subq_2 ) subq_3 diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_with_other_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_with_other_dimensions__plan0_optimized.sql index f029b6173e..68e7b122d2 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_with_other_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_with_other_dimensions__plan0_optimized.sql @@ -1,17 +1,17 @@ -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS metric_time__day + DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day , listings_latest_src_28000.is_lux AS listing__is_lux_latest , users_latest_src_28000.home_state_latest AS user__home_state_latest FROM ***************************.dim_listings_latest listings_latest_src_28000 CROSS JOIN - ***************************.mf_time_spine time_spine_src_28000 + ***************************.mf_time_spine time_spine_src_28006 FULL OUTER JOIN ***************************.dim_users_latest users_latest_src_28000 ON listings_latest_src_28000.user_id = users_latest_src_28000.user_id GROUP BY - DATE_TRUNC('day', time_spine_src_28000.ds) + DATE_TRUNC('day', time_spine_src_28006.ds) , listings_latest_src_28000.is_lux , users_latest_src_28000.home_state_latest diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_dimensions_with_time_constraint__plan0.xml b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_dimensions_with_time_constraint__plan0.xml index e81db14dc9..8ec7e633d2 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_dimensions_with_time_constraint__plan0.xml +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_dimensions_with_time_constraint__plan0.xml @@ -784,64 +784,64 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -864,126 +864,126 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_metric_time_only__plan0.xml b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_metric_time_only__plan0.xml index ab92d8b32b..6bf34b30a5 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_metric_time_only__plan0.xml +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_metric_time_only__plan0.xml @@ -66,33 +66,33 @@ - + - - - - - - + + + + + + - + - + - - - + + + - - + + - + diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_metric_time_quarter_alone__plan0.xml b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_metric_time_quarter_alone__plan0.xml index 9bc2e28999..dac8a4ae04 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_metric_time_quarter_alone__plan0.xml +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_metric_time_quarter_alone__plan0.xml @@ -67,33 +67,33 @@ - + - - - - - - + + + + + + - + - + - - - + + + - - + + - + diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_metric_time_with_other_dimensions__plan0.xml b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_metric_time_with_other_dimensions__plan0.xml index 30066f15a8..58e50bc745 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_metric_time_with_other_dimensions__plan0.xml +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_metric_time_with_other_dimensions__plan0.xml @@ -533,58 +533,58 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -603,115 +603,115 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/tests_metricflow/snapshots/test_mf_engine.py/list/test_list_dimensions__result0.txt b/tests_metricflow/snapshots/test_mf_engine.py/list/test_list_dimensions__result0.txt index d52d8892b9..1c37af0880 100644 --- a/tests_metricflow/snapshots/test_mf_engine.py/list/test_list_dimensions__result0.txt +++ b/tests_metricflow/snapshots/test_mf_engine.py/list/test_list_dimensions__result0.txt @@ -13,12 +13,16 @@ 'listing__ds', 'listing__is_lux_latest', 'revenue_instance__ds', + 'user__archived_at', + 'user__bio_added_ts', 'user__created_at', 'user__ds', 'user__ds_latest', 'user__ds_partitioned', 'user__home_state', 'user__home_state_latest', + 'user__last_login_ts', + 'user__last_profile_edit_ts', 'verification__ds', 'verification__ds_partitioned', 'verification__verification_type', diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_conversion_metric_predicate_pushdown__dfp_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_conversion_metric_predicate_pushdown__dfp_0.xml index f819a44912..63b4cfcd0a 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_conversion_metric_predicate_pushdown__dfp_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_conversion_metric_predicate_pushdown__dfp_0.xml @@ -153,11 +153,11 @@ - + - + @@ -170,7 +170,7 @@ - + @@ -257,11 +257,11 @@ - + - + @@ -273,7 +273,7 @@ - + @@ -284,11 +284,11 @@ - + - + @@ -303,7 +303,7 @@ - + diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_cumulative_metric_predicate_pushdown__dfp_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_cumulative_metric_predicate_pushdown__dfp_0.xml index 18ed3d0c5c..3fd12a5735 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_cumulative_metric_predicate_pushdown__dfp_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_cumulative_metric_predicate_pushdown__dfp_0.xml @@ -155,11 +155,11 @@ - + - + @@ -173,11 +173,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_predicate_pushdown__dfp_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_predicate_pushdown__dfp_0.xml index b916d545c0..05e5480fbe 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_predicate_pushdown__dfp_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_predicate_pushdown__dfp_0.xml @@ -211,12 +211,12 @@ - + - + @@ -229,12 +229,12 @@ - + - + @@ -423,12 +423,12 @@ - + - + @@ -442,12 +442,12 @@ - + - + diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_with_post_agg_join_predicate_pushdown__dfp_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_with_post_agg_join_predicate_pushdown__dfp_0.xml index 3e0f6ba307..f6f53d7377 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_with_post_agg_join_predicate_pushdown__dfp_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_with_post_agg_join_predicate_pushdown__dfp_0.xml @@ -242,12 +242,12 @@ - + - + @@ -260,12 +260,12 @@ - + - + @@ -485,12 +485,12 @@ - + - + @@ -504,12 +504,12 @@ - + - + diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_offset_metric_predicate_pushdown__dfp_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_offset_metric_predicate_pushdown__dfp_0.xml index 9059fcb7e2..512cdc0fce 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_offset_metric_predicate_pushdown__dfp_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_offset_metric_predicate_pushdown__dfp_0.xml @@ -201,12 +201,12 @@ - + - + @@ -219,12 +219,12 @@ - + - + @@ -401,12 +401,12 @@ - + - + @@ -420,12 +420,12 @@ - + - + diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_categorical_pushdown__dfp_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_categorical_pushdown__dfp_0.xml index 7f2c90a551..80357bff35 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_categorical_pushdown__dfp_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_categorical_pushdown__dfp_0.xml @@ -143,11 +143,11 @@ - + - + @@ -160,11 +160,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_metric_time_pushdown_with_two_targets__dfp_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_metric_time_pushdown_with_two_targets__dfp_0.xml index 20bfbfe40f..621a7a9449 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_metric_time_pushdown_with_two_targets__dfp_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_metric_time_pushdown_with_two_targets__dfp_0.xml @@ -119,11 +119,11 @@ - + - + @@ -136,11 +136,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time__plan0.sql index 43cd6f32e3..9366489873 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time__plan0.sql @@ -34,18 +34,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATETIME_TRUNC(time_spine_src_28000.ds, day) AS ds__day - , DATETIME_TRUNC(time_spine_src_28000.ds, isoweek) AS ds__week - , DATETIME_TRUNC(time_spine_src_28000.ds, month) AS ds__month - , DATETIME_TRUNC(time_spine_src_28000.ds, quarter) AS ds__quarter - , DATETIME_TRUNC(time_spine_src_28000.ds, year) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , IF(EXTRACT(dayofweek FROM time_spine_src_28000.ds) = 1, 7, EXTRACT(dayofweek FROM time_spine_src_28000.ds) - 1) AS ds__extract_dow - , EXTRACT(dayofyear FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATETIME_TRUNC(time_spine_src_28006.ds, day) AS ds__day + , DATETIME_TRUNC(time_spine_src_28006.ds, isoweek) AS ds__week + , DATETIME_TRUNC(time_spine_src_28006.ds, month) AS ds__month + , DATETIME_TRUNC(time_spine_src_28006.ds, quarter) AS ds__quarter + , DATETIME_TRUNC(time_spine_src_28006.ds, year) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , IF(EXTRACT(dayofweek FROM time_spine_src_28006.ds) = 1, 7, EXTRACT(dayofweek FROM time_spine_src_28006.ds) - 1) AS ds__extract_dow + , EXTRACT(dayofyear FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_0 ) subq_1 GROUP BY diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time__plan0_optimized.sql index 21b0a95fc4..f24a9803be 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time__plan0_optimized.sql @@ -8,7 +8,7 @@ FROM ( -- Pass Only Elements: ['metric_time__day',] SELECT DATETIME_TRUNC(ds, day) AS metric_time__day - FROM ***************************.mf_time_spine time_spine_src_28000 + FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY metric_time__day ) subq_5 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time_week__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time_week__plan0.sql index f43945c4af..a020f1aad3 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time_week__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time_week__plan0.sql @@ -34,18 +34,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATETIME_TRUNC(time_spine_src_28000.ds, day) AS ds__day - , DATETIME_TRUNC(time_spine_src_28000.ds, isoweek) AS ds__week - , DATETIME_TRUNC(time_spine_src_28000.ds, month) AS ds__month - , DATETIME_TRUNC(time_spine_src_28000.ds, quarter) AS ds__quarter - , DATETIME_TRUNC(time_spine_src_28000.ds, year) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , IF(EXTRACT(dayofweek FROM time_spine_src_28000.ds) = 1, 7, EXTRACT(dayofweek FROM time_spine_src_28000.ds) - 1) AS ds__extract_dow - , EXTRACT(dayofyear FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATETIME_TRUNC(time_spine_src_28006.ds, day) AS ds__day + , DATETIME_TRUNC(time_spine_src_28006.ds, isoweek) AS ds__week + , DATETIME_TRUNC(time_spine_src_28006.ds, month) AS ds__month + , DATETIME_TRUNC(time_spine_src_28006.ds, quarter) AS ds__quarter + , DATETIME_TRUNC(time_spine_src_28006.ds, year) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , IF(EXTRACT(dayofweek FROM time_spine_src_28006.ds) = 1, 7, EXTRACT(dayofweek FROM time_spine_src_28006.ds) - 1) AS ds__extract_dow + , EXTRACT(dayofyear FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_0 ) subq_1 GROUP BY diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time_week__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time_week__plan0_optimized.sql index 68ca95b0d3..02d3002c6c 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time_week__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time_week__plan0_optimized.sql @@ -8,7 +8,7 @@ FROM ( -- Pass Only Elements: ['metric_time__week',] SELECT DATETIME_TRUNC(ds, isoweek) AS metric_time__week - FROM ***************************.mf_time_spine time_spine_src_28000 + FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY metric_time__week ) subq_5 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_partitioned_join__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_partitioned_join__plan0.sql index d846170f03..ddb20104bb 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_partitioned_join__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_partitioned_join__plan0.sql @@ -190,6 +190,60 @@ FROM ( , IF(EXTRACT(dayofweek FROM users_ds_source_src_28000.ds_partitioned) = 1, 7, EXTRACT(dayofweek FROM users_ds_source_src_28000.ds_partitioned) - 1) AS ds_partitioned__extract_dow , EXTRACT(dayofyear FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_doy , users_ds_source_src_28000.home_state + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, millisecond) AS last_profile_edit_ts__millisecond + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, second) AS last_profile_edit_ts__second + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, minute) AS last_profile_edit_ts__minute + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, hour) AS last_profile_edit_ts__hour + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, day) AS last_profile_edit_ts__day + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, isoweek) AS last_profile_edit_ts__week + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, month) AS last_profile_edit_ts__month + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, quarter) AS last_profile_edit_ts__quarter + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, year) AS last_profile_edit_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_day + , IF(EXTRACT(dayofweek FROM users_ds_source_src_28000.last_profile_edit_ts) = 1, 7, EXTRACT(dayofweek FROM users_ds_source_src_28000.last_profile_edit_ts) - 1) AS last_profile_edit_ts__extract_dow + , EXTRACT(dayofyear FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_doy + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, second) AS bio_added_ts__second + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, minute) AS bio_added_ts__minute + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, hour) AS bio_added_ts__hour + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, day) AS bio_added_ts__day + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, isoweek) AS bio_added_ts__week + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, month) AS bio_added_ts__month + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, quarter) AS bio_added_ts__quarter + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, year) AS bio_added_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_day + , IF(EXTRACT(dayofweek FROM users_ds_source_src_28000.bio_added_ts) = 1, 7, EXTRACT(dayofweek FROM users_ds_source_src_28000.bio_added_ts) - 1) AS bio_added_ts__extract_dow + , EXTRACT(dayofyear FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_doy + , DATETIME_TRUNC(users_ds_source_src_28000.last_login_ts, minute) AS last_login_ts__minute + , DATETIME_TRUNC(users_ds_source_src_28000.last_login_ts, hour) AS last_login_ts__hour + , DATETIME_TRUNC(users_ds_source_src_28000.last_login_ts, day) AS last_login_ts__day + , DATETIME_TRUNC(users_ds_source_src_28000.last_login_ts, isoweek) AS last_login_ts__week + , DATETIME_TRUNC(users_ds_source_src_28000.last_login_ts, month) AS last_login_ts__month + , DATETIME_TRUNC(users_ds_source_src_28000.last_login_ts, quarter) AS last_login_ts__quarter + , DATETIME_TRUNC(users_ds_source_src_28000.last_login_ts, year) AS last_login_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_day + , IF(EXTRACT(dayofweek FROM users_ds_source_src_28000.last_login_ts) = 1, 7, EXTRACT(dayofweek FROM users_ds_source_src_28000.last_login_ts) - 1) AS last_login_ts__extract_dow + , EXTRACT(dayofyear FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_doy + , DATETIME_TRUNC(users_ds_source_src_28000.archived_at, hour) AS archived_at__hour + , DATETIME_TRUNC(users_ds_source_src_28000.archived_at, day) AS archived_at__day + , DATETIME_TRUNC(users_ds_source_src_28000.archived_at, isoweek) AS archived_at__week + , DATETIME_TRUNC(users_ds_source_src_28000.archived_at, month) AS archived_at__month + , DATETIME_TRUNC(users_ds_source_src_28000.archived_at, quarter) AS archived_at__quarter + , DATETIME_TRUNC(users_ds_source_src_28000.archived_at, year) AS archived_at__year + , EXTRACT(year FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_day + , IF(EXTRACT(dayofweek FROM users_ds_source_src_28000.archived_at) = 1, 7, EXTRACT(dayofweek FROM users_ds_source_src_28000.archived_at) - 1) AS archived_at__extract_dow + , EXTRACT(dayofyear FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_doy , DATETIME_TRUNC(users_ds_source_src_28000.ds, day) AS user__ds__day , DATETIME_TRUNC(users_ds_source_src_28000.ds, isoweek) AS user__ds__week , DATETIME_TRUNC(users_ds_source_src_28000.ds, month) AS user__ds__month @@ -224,6 +278,60 @@ FROM ( , IF(EXTRACT(dayofweek FROM users_ds_source_src_28000.ds_partitioned) = 1, 7, EXTRACT(dayofweek FROM users_ds_source_src_28000.ds_partitioned) - 1) AS user__ds_partitioned__extract_dow , EXTRACT(dayofyear FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_doy , users_ds_source_src_28000.home_state AS user__home_state + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, millisecond) AS user__last_profile_edit_ts__millisecond + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, second) AS user__last_profile_edit_ts__second + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, minute) AS user__last_profile_edit_ts__minute + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, hour) AS user__last_profile_edit_ts__hour + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, day) AS user__last_profile_edit_ts__day + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, isoweek) AS user__last_profile_edit_ts__week + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, month) AS user__last_profile_edit_ts__month + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, quarter) AS user__last_profile_edit_ts__quarter + , DATETIME_TRUNC(users_ds_source_src_28000.last_profile_edit_ts, year) AS user__last_profile_edit_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_day + , IF(EXTRACT(dayofweek FROM users_ds_source_src_28000.last_profile_edit_ts) = 1, 7, EXTRACT(dayofweek FROM users_ds_source_src_28000.last_profile_edit_ts) - 1) AS user__last_profile_edit_ts__extract_dow + , EXTRACT(dayofyear FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_doy + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, second) AS user__bio_added_ts__second + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, minute) AS user__bio_added_ts__minute + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, hour) AS user__bio_added_ts__hour + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, day) AS user__bio_added_ts__day + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, isoweek) AS user__bio_added_ts__week + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, month) AS user__bio_added_ts__month + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, quarter) AS user__bio_added_ts__quarter + , DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, year) AS user__bio_added_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_day + , IF(EXTRACT(dayofweek FROM users_ds_source_src_28000.bio_added_ts) = 1, 7, EXTRACT(dayofweek FROM users_ds_source_src_28000.bio_added_ts) - 1) AS user__bio_added_ts__extract_dow + , EXTRACT(dayofyear FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_doy + , DATETIME_TRUNC(users_ds_source_src_28000.last_login_ts, minute) AS user__last_login_ts__minute + , DATETIME_TRUNC(users_ds_source_src_28000.last_login_ts, hour) AS user__last_login_ts__hour + , DATETIME_TRUNC(users_ds_source_src_28000.last_login_ts, day) AS user__last_login_ts__day + , DATETIME_TRUNC(users_ds_source_src_28000.last_login_ts, isoweek) AS user__last_login_ts__week + , DATETIME_TRUNC(users_ds_source_src_28000.last_login_ts, month) AS user__last_login_ts__month + , DATETIME_TRUNC(users_ds_source_src_28000.last_login_ts, quarter) AS user__last_login_ts__quarter + , DATETIME_TRUNC(users_ds_source_src_28000.last_login_ts, year) AS user__last_login_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_day + , IF(EXTRACT(dayofweek FROM users_ds_source_src_28000.last_login_ts) = 1, 7, EXTRACT(dayofweek FROM users_ds_source_src_28000.last_login_ts) - 1) AS user__last_login_ts__extract_dow + , EXTRACT(dayofyear FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_doy + , DATETIME_TRUNC(users_ds_source_src_28000.archived_at, hour) AS user__archived_at__hour + , DATETIME_TRUNC(users_ds_source_src_28000.archived_at, day) AS user__archived_at__day + , DATETIME_TRUNC(users_ds_source_src_28000.archived_at, isoweek) AS user__archived_at__week + , DATETIME_TRUNC(users_ds_source_src_28000.archived_at, month) AS user__archived_at__month + , DATETIME_TRUNC(users_ds_source_src_28000.archived_at, quarter) AS user__archived_at__quarter + , DATETIME_TRUNC(users_ds_source_src_28000.archived_at, year) AS user__archived_at__year + , EXTRACT(year FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_day + , IF(EXTRACT(dayofweek FROM users_ds_source_src_28000.archived_at) = 1, 7, EXTRACT(dayofweek FROM users_ds_source_src_28000.archived_at) - 1) AS user__archived_at__extract_dow + , EXTRACT(dayofyear FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_doy , users_ds_source_src_28000.user_id AS user FROM ***************************.dim_users users_ds_source_src_28000 ) subq_3 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time__plan0.sql index dbfc7da23a..829d13678f 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time__plan0.sql @@ -34,18 +34,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , EXTRACT(DAYOFWEEK_ISO FROM time_spine_src_28000.ds) AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , EXTRACT(DAYOFWEEK_ISO FROM time_spine_src_28006.ds) AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_0 ) subq_1 GROUP BY diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time__plan0_optimized.sql index ce2a27035e..4d31ef04b9 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time__plan0_optimized.sql @@ -8,7 +8,7 @@ FROM ( -- Pass Only Elements: ['metric_time__day',] SELECT DATE_TRUNC('day', ds) AS metric_time__day - FROM ***************************.mf_time_spine time_spine_src_28000 + FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY DATE_TRUNC('day', ds) ) subq_5 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time_week__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time_week__plan0.sql index d7ca5161cc..68dd51363f 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time_week__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time_week__plan0.sql @@ -34,18 +34,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , EXTRACT(DAYOFWEEK_ISO FROM time_spine_src_28000.ds) AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , EXTRACT(DAYOFWEEK_ISO FROM time_spine_src_28006.ds) AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_0 ) subq_1 GROUP BY diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time_week__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time_week__plan0_optimized.sql index a5d07eba96..4ceb83d067 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time_week__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time_week__plan0_optimized.sql @@ -8,7 +8,7 @@ FROM ( -- Pass Only Elements: ['metric_time__week',] SELECT DATE_TRUNC('week', ds) AS metric_time__week - FROM ***************************.mf_time_spine time_spine_src_28000 + FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY DATE_TRUNC('week', ds) ) subq_5 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_partitioned_join__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_partitioned_join__plan0.sql index c4553bcdb9..4067cd9e89 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_partitioned_join__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_partitioned_join__plan0.sql @@ -190,6 +190,60 @@ FROM ( , EXTRACT(DAYOFWEEK_ISO FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_dow , EXTRACT(doy FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_doy , users_ds_source_src_28000.home_state + , DATE_TRUNC('millisecond', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__millisecond + , DATE_TRUNC('second', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_day + , EXTRACT(DAYOFWEEK_ISO FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_doy + , DATE_TRUNC('second', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_day + , EXTRACT(DAYOFWEEK_ISO FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_doy + , DATE_TRUNC('minute', users_ds_source_src_28000.last_login_ts) AS last_login_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_login_ts) AS last_login_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_login_ts) AS last_login_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_login_ts) AS last_login_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_login_ts) AS last_login_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_login_ts) AS last_login_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_login_ts) AS last_login_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_day + , EXTRACT(DAYOFWEEK_ISO FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_doy + , DATE_TRUNC('hour', users_ds_source_src_28000.archived_at) AS archived_at__hour + , DATE_TRUNC('day', users_ds_source_src_28000.archived_at) AS archived_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.archived_at) AS archived_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.archived_at) AS archived_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.archived_at) AS archived_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.archived_at) AS archived_at__year + , EXTRACT(year FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_day + , EXTRACT(DAYOFWEEK_ISO FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_doy , DATE_TRUNC('day', users_ds_source_src_28000.ds) AS user__ds__day , DATE_TRUNC('week', users_ds_source_src_28000.ds) AS user__ds__week , DATE_TRUNC('month', users_ds_source_src_28000.ds) AS user__ds__month @@ -224,6 +278,60 @@ FROM ( , EXTRACT(DAYOFWEEK_ISO FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_dow , EXTRACT(doy FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_doy , users_ds_source_src_28000.home_state AS user__home_state + , DATE_TRUNC('millisecond', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__millisecond + , DATE_TRUNC('second', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_day + , EXTRACT(DAYOFWEEK_ISO FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_doy + , DATE_TRUNC('second', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_day + , EXTRACT(DAYOFWEEK_ISO FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_doy + , DATE_TRUNC('minute', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_day + , EXTRACT(DAYOFWEEK_ISO FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_doy + , DATE_TRUNC('hour', users_ds_source_src_28000.archived_at) AS user__archived_at__hour + , DATE_TRUNC('day', users_ds_source_src_28000.archived_at) AS user__archived_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.archived_at) AS user__archived_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.archived_at) AS user__archived_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.archived_at) AS user__archived_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.archived_at) AS user__archived_at__year + , EXTRACT(year FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_day + , EXTRACT(DAYOFWEEK_ISO FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_doy , users_ds_source_src_28000.user_id AS user FROM ***************************.dim_users users_ds_source_src_28000 ) subq_3 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time__plan0.sql index fecf550869..0eef091ea3 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time__plan0.sql @@ -34,18 +34,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , EXTRACT(isodow FROM time_spine_src_28000.ds) AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , EXTRACT(isodow FROM time_spine_src_28006.ds) AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_0 ) subq_1 GROUP BY diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time__plan0_optimized.sql index ce2a27035e..4d31ef04b9 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time__plan0_optimized.sql @@ -8,7 +8,7 @@ FROM ( -- Pass Only Elements: ['metric_time__day',] SELECT DATE_TRUNC('day', ds) AS metric_time__day - FROM ***************************.mf_time_spine time_spine_src_28000 + FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY DATE_TRUNC('day', ds) ) subq_5 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time_week__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time_week__plan0.sql index 8216c96cc1..7c587e39ac 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time_week__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time_week__plan0.sql @@ -34,18 +34,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , EXTRACT(isodow FROM time_spine_src_28000.ds) AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , EXTRACT(isodow FROM time_spine_src_28006.ds) AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_0 ) subq_1 GROUP BY diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time_week__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time_week__plan0_optimized.sql index a5d07eba96..4ceb83d067 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time_week__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time_week__plan0_optimized.sql @@ -8,7 +8,7 @@ FROM ( -- Pass Only Elements: ['metric_time__week',] SELECT DATE_TRUNC('week', ds) AS metric_time__week - FROM ***************************.mf_time_spine time_spine_src_28000 + FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY DATE_TRUNC('week', ds) ) subq_5 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_partitioned_join__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_partitioned_join__plan0.sql index aba31555ed..2c6261d271 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_partitioned_join__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_partitioned_join__plan0.sql @@ -190,6 +190,60 @@ FROM ( , EXTRACT(isodow FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_dow , EXTRACT(doy FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_doy , users_ds_source_src_28000.home_state + , DATE_TRUNC('millisecond', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__millisecond + , DATE_TRUNC('second', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_doy + , DATE_TRUNC('second', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_doy + , DATE_TRUNC('minute', users_ds_source_src_28000.last_login_ts) AS last_login_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_login_ts) AS last_login_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_login_ts) AS last_login_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_login_ts) AS last_login_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_login_ts) AS last_login_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_login_ts) AS last_login_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_login_ts) AS last_login_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_doy + , DATE_TRUNC('hour', users_ds_source_src_28000.archived_at) AS archived_at__hour + , DATE_TRUNC('day', users_ds_source_src_28000.archived_at) AS archived_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.archived_at) AS archived_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.archived_at) AS archived_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.archived_at) AS archived_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.archived_at) AS archived_at__year + , EXTRACT(year FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_doy , DATE_TRUNC('day', users_ds_source_src_28000.ds) AS user__ds__day , DATE_TRUNC('week', users_ds_source_src_28000.ds) AS user__ds__week , DATE_TRUNC('month', users_ds_source_src_28000.ds) AS user__ds__month @@ -224,6 +278,60 @@ FROM ( , EXTRACT(isodow FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_dow , EXTRACT(doy FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_doy , users_ds_source_src_28000.home_state AS user__home_state + , DATE_TRUNC('millisecond', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__millisecond + , DATE_TRUNC('second', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_doy + , DATE_TRUNC('second', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_doy + , DATE_TRUNC('minute', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_doy + , DATE_TRUNC('hour', users_ds_source_src_28000.archived_at) AS user__archived_at__hour + , DATE_TRUNC('day', users_ds_source_src_28000.archived_at) AS user__archived_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.archived_at) AS user__archived_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.archived_at) AS user__archived_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.archived_at) AS user__archived_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.archived_at) AS user__archived_at__year + , EXTRACT(year FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_doy , users_ds_source_src_28000.user_id AS user FROM ***************************.dim_users users_ds_source_src_28000 ) subq_3 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time__plan0.sql index fecf550869..0eef091ea3 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time__plan0.sql @@ -34,18 +34,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , EXTRACT(isodow FROM time_spine_src_28000.ds) AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , EXTRACT(isodow FROM time_spine_src_28006.ds) AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_0 ) subq_1 GROUP BY diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time__plan0_optimized.sql index ce2a27035e..4d31ef04b9 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time__plan0_optimized.sql @@ -8,7 +8,7 @@ FROM ( -- Pass Only Elements: ['metric_time__day',] SELECT DATE_TRUNC('day', ds) AS metric_time__day - FROM ***************************.mf_time_spine time_spine_src_28000 + FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY DATE_TRUNC('day', ds) ) subq_5 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time_week__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time_week__plan0.sql index 8216c96cc1..7c587e39ac 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time_week__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time_week__plan0.sql @@ -34,18 +34,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , EXTRACT(isodow FROM time_spine_src_28000.ds) AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , EXTRACT(isodow FROM time_spine_src_28006.ds) AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_0 ) subq_1 GROUP BY diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time_week__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time_week__plan0_optimized.sql index a5d07eba96..4ceb83d067 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time_week__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time_week__plan0_optimized.sql @@ -8,7 +8,7 @@ FROM ( -- Pass Only Elements: ['metric_time__week',] SELECT DATE_TRUNC('week', ds) AS metric_time__week - FROM ***************************.mf_time_spine time_spine_src_28000 + FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY DATE_TRUNC('week', ds) ) subq_5 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_partitioned_join__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_partitioned_join__plan0.sql index aba31555ed..2c6261d271 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_partitioned_join__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_partitioned_join__plan0.sql @@ -190,6 +190,60 @@ FROM ( , EXTRACT(isodow FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_dow , EXTRACT(doy FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_doy , users_ds_source_src_28000.home_state + , DATE_TRUNC('millisecond', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__millisecond + , DATE_TRUNC('second', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_doy + , DATE_TRUNC('second', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_doy + , DATE_TRUNC('minute', users_ds_source_src_28000.last_login_ts) AS last_login_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_login_ts) AS last_login_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_login_ts) AS last_login_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_login_ts) AS last_login_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_login_ts) AS last_login_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_login_ts) AS last_login_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_login_ts) AS last_login_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_doy + , DATE_TRUNC('hour', users_ds_source_src_28000.archived_at) AS archived_at__hour + , DATE_TRUNC('day', users_ds_source_src_28000.archived_at) AS archived_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.archived_at) AS archived_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.archived_at) AS archived_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.archived_at) AS archived_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.archived_at) AS archived_at__year + , EXTRACT(year FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_doy , DATE_TRUNC('day', users_ds_source_src_28000.ds) AS user__ds__day , DATE_TRUNC('week', users_ds_source_src_28000.ds) AS user__ds__week , DATE_TRUNC('month', users_ds_source_src_28000.ds) AS user__ds__month @@ -224,6 +278,60 @@ FROM ( , EXTRACT(isodow FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_dow , EXTRACT(doy FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_doy , users_ds_source_src_28000.home_state AS user__home_state + , DATE_TRUNC('millisecond', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__millisecond + , DATE_TRUNC('second', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_doy + , DATE_TRUNC('second', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_doy + , DATE_TRUNC('minute', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_doy + , DATE_TRUNC('hour', users_ds_source_src_28000.archived_at) AS user__archived_at__hour + , DATE_TRUNC('day', users_ds_source_src_28000.archived_at) AS user__archived_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.archived_at) AS user__archived_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.archived_at) AS user__archived_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.archived_at) AS user__archived_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.archived_at) AS user__archived_at__year + , EXTRACT(year FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_day + , EXTRACT(isodow FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_doy , users_ds_source_src_28000.user_id AS user FROM ***************************.dim_users users_ds_source_src_28000 ) subq_3 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time__plan0.sql index 5f3939ae42..5d35c8a3ba 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time__plan0.sql @@ -34,18 +34,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , CASE WHEN EXTRACT(dow FROM time_spine_src_28000.ds) = 0 THEN EXTRACT(dow FROM time_spine_src_28000.ds) + 7 ELSE EXTRACT(dow FROM time_spine_src_28000.ds) END AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , CASE WHEN EXTRACT(dow FROM time_spine_src_28006.ds) = 0 THEN EXTRACT(dow FROM time_spine_src_28006.ds) + 7 ELSE EXTRACT(dow FROM time_spine_src_28006.ds) END AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_0 ) subq_1 GROUP BY diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time__plan0_optimized.sql index ce2a27035e..4d31ef04b9 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time__plan0_optimized.sql @@ -8,7 +8,7 @@ FROM ( -- Pass Only Elements: ['metric_time__day',] SELECT DATE_TRUNC('day', ds) AS metric_time__day - FROM ***************************.mf_time_spine time_spine_src_28000 + FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY DATE_TRUNC('day', ds) ) subq_5 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time_week__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time_week__plan0.sql index a78f290fde..1bd5e2e330 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time_week__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time_week__plan0.sql @@ -34,18 +34,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , CASE WHEN EXTRACT(dow FROM time_spine_src_28000.ds) = 0 THEN EXTRACT(dow FROM time_spine_src_28000.ds) + 7 ELSE EXTRACT(dow FROM time_spine_src_28000.ds) END AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , CASE WHEN EXTRACT(dow FROM time_spine_src_28006.ds) = 0 THEN EXTRACT(dow FROM time_spine_src_28006.ds) + 7 ELSE EXTRACT(dow FROM time_spine_src_28006.ds) END AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_0 ) subq_1 GROUP BY diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time_week__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time_week__plan0_optimized.sql index a5d07eba96..4ceb83d067 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time_week__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time_week__plan0_optimized.sql @@ -8,7 +8,7 @@ FROM ( -- Pass Only Elements: ['metric_time__week',] SELECT DATE_TRUNC('week', ds) AS metric_time__week - FROM ***************************.mf_time_spine time_spine_src_28000 + FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY DATE_TRUNC('week', ds) ) subq_5 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_partitioned_join__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_partitioned_join__plan0.sql index 18bd72503a..2dd31cfb11 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_partitioned_join__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_partitioned_join__plan0.sql @@ -190,6 +190,60 @@ FROM ( , CASE WHEN EXTRACT(dow FROM users_ds_source_src_28000.ds_partitioned) = 0 THEN EXTRACT(dow FROM users_ds_source_src_28000.ds_partitioned) + 7 ELSE EXTRACT(dow FROM users_ds_source_src_28000.ds_partitioned) END AS ds_partitioned__extract_dow , EXTRACT(doy FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_doy , users_ds_source_src_28000.home_state + , DATE_TRUNC('millisecond', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__millisecond + , DATE_TRUNC('second', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_day + , CASE WHEN EXTRACT(dow FROM users_ds_source_src_28000.last_profile_edit_ts) = 0 THEN EXTRACT(dow FROM users_ds_source_src_28000.last_profile_edit_ts) + 7 ELSE EXTRACT(dow FROM users_ds_source_src_28000.last_profile_edit_ts) END AS last_profile_edit_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_doy + , DATE_TRUNC('second', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_day + , CASE WHEN EXTRACT(dow FROM users_ds_source_src_28000.bio_added_ts) = 0 THEN EXTRACT(dow FROM users_ds_source_src_28000.bio_added_ts) + 7 ELSE EXTRACT(dow FROM users_ds_source_src_28000.bio_added_ts) END AS bio_added_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_doy + , DATE_TRUNC('minute', users_ds_source_src_28000.last_login_ts) AS last_login_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_login_ts) AS last_login_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_login_ts) AS last_login_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_login_ts) AS last_login_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_login_ts) AS last_login_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_login_ts) AS last_login_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_login_ts) AS last_login_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_day + , CASE WHEN EXTRACT(dow FROM users_ds_source_src_28000.last_login_ts) = 0 THEN EXTRACT(dow FROM users_ds_source_src_28000.last_login_ts) + 7 ELSE EXTRACT(dow FROM users_ds_source_src_28000.last_login_ts) END AS last_login_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_doy + , DATE_TRUNC('hour', users_ds_source_src_28000.archived_at) AS archived_at__hour + , DATE_TRUNC('day', users_ds_source_src_28000.archived_at) AS archived_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.archived_at) AS archived_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.archived_at) AS archived_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.archived_at) AS archived_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.archived_at) AS archived_at__year + , EXTRACT(year FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_day + , CASE WHEN EXTRACT(dow FROM users_ds_source_src_28000.archived_at) = 0 THEN EXTRACT(dow FROM users_ds_source_src_28000.archived_at) + 7 ELSE EXTRACT(dow FROM users_ds_source_src_28000.archived_at) END AS archived_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_doy , DATE_TRUNC('day', users_ds_source_src_28000.ds) AS user__ds__day , DATE_TRUNC('week', users_ds_source_src_28000.ds) AS user__ds__week , DATE_TRUNC('month', users_ds_source_src_28000.ds) AS user__ds__month @@ -224,6 +278,60 @@ FROM ( , CASE WHEN EXTRACT(dow FROM users_ds_source_src_28000.ds_partitioned) = 0 THEN EXTRACT(dow FROM users_ds_source_src_28000.ds_partitioned) + 7 ELSE EXTRACT(dow FROM users_ds_source_src_28000.ds_partitioned) END AS user__ds_partitioned__extract_dow , EXTRACT(doy FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_doy , users_ds_source_src_28000.home_state AS user__home_state + , DATE_TRUNC('millisecond', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__millisecond + , DATE_TRUNC('second', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_day + , CASE WHEN EXTRACT(dow FROM users_ds_source_src_28000.last_profile_edit_ts) = 0 THEN EXTRACT(dow FROM users_ds_source_src_28000.last_profile_edit_ts) + 7 ELSE EXTRACT(dow FROM users_ds_source_src_28000.last_profile_edit_ts) END AS user__last_profile_edit_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_doy + , DATE_TRUNC('second', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_day + , CASE WHEN EXTRACT(dow FROM users_ds_source_src_28000.bio_added_ts) = 0 THEN EXTRACT(dow FROM users_ds_source_src_28000.bio_added_ts) + 7 ELSE EXTRACT(dow FROM users_ds_source_src_28000.bio_added_ts) END AS user__bio_added_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_doy + , DATE_TRUNC('minute', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_day + , CASE WHEN EXTRACT(dow FROM users_ds_source_src_28000.last_login_ts) = 0 THEN EXTRACT(dow FROM users_ds_source_src_28000.last_login_ts) + 7 ELSE EXTRACT(dow FROM users_ds_source_src_28000.last_login_ts) END AS user__last_login_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_doy + , DATE_TRUNC('hour', users_ds_source_src_28000.archived_at) AS user__archived_at__hour + , DATE_TRUNC('day', users_ds_source_src_28000.archived_at) AS user__archived_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.archived_at) AS user__archived_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.archived_at) AS user__archived_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.archived_at) AS user__archived_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.archived_at) AS user__archived_at__year + , EXTRACT(year FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_day + , CASE WHEN EXTRACT(dow FROM users_ds_source_src_28000.archived_at) = 0 THEN EXTRACT(dow FROM users_ds_source_src_28000.archived_at) + 7 ELSE EXTRACT(dow FROM users_ds_source_src_28000.archived_at) END AS user__archived_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_doy , users_ds_source_src_28000.user_id AS user FROM ***************************.dim_users users_ds_source_src_28000 ) subq_3 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time__plan0.sql index 8532ab4bbb..6d1f296f9d 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time__plan0.sql @@ -34,18 +34,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , EXTRACT(dayofweekiso FROM time_spine_src_28000.ds) AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , EXTRACT(dayofweekiso FROM time_spine_src_28006.ds) AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_0 ) subq_1 GROUP BY diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time__plan0_optimized.sql index ce2a27035e..4d31ef04b9 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time__plan0_optimized.sql @@ -8,7 +8,7 @@ FROM ( -- Pass Only Elements: ['metric_time__day',] SELECT DATE_TRUNC('day', ds) AS metric_time__day - FROM ***************************.mf_time_spine time_spine_src_28000 + FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY DATE_TRUNC('day', ds) ) subq_5 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time_week__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time_week__plan0.sql index b761f97a62..9f37f05bc2 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time_week__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time_week__plan0.sql @@ -34,18 +34,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , EXTRACT(dayofweekiso FROM time_spine_src_28000.ds) AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , EXTRACT(dayofweekiso FROM time_spine_src_28006.ds) AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_0 ) subq_1 GROUP BY diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time_week__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time_week__plan0_optimized.sql index a5d07eba96..4ceb83d067 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time_week__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time_week__plan0_optimized.sql @@ -8,7 +8,7 @@ FROM ( -- Pass Only Elements: ['metric_time__week',] SELECT DATE_TRUNC('week', ds) AS metric_time__week - FROM ***************************.mf_time_spine time_spine_src_28000 + FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY DATE_TRUNC('week', ds) ) subq_5 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_partitioned_join__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_partitioned_join__plan0.sql index c8af79b4f7..35eba9553f 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_partitioned_join__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_partitioned_join__plan0.sql @@ -190,6 +190,60 @@ FROM ( , EXTRACT(dayofweekiso FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_dow , EXTRACT(doy FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_doy , users_ds_source_src_28000.home_state + , DATE_TRUNC('millisecond', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__millisecond + , DATE_TRUNC('second', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_day + , EXTRACT(dayofweekiso FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_doy + , DATE_TRUNC('second', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_day + , EXTRACT(dayofweekiso FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_doy + , DATE_TRUNC('minute', users_ds_source_src_28000.last_login_ts) AS last_login_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_login_ts) AS last_login_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_login_ts) AS last_login_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_login_ts) AS last_login_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_login_ts) AS last_login_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_login_ts) AS last_login_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_login_ts) AS last_login_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_day + , EXTRACT(dayofweekiso FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_doy + , DATE_TRUNC('hour', users_ds_source_src_28000.archived_at) AS archived_at__hour + , DATE_TRUNC('day', users_ds_source_src_28000.archived_at) AS archived_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.archived_at) AS archived_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.archived_at) AS archived_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.archived_at) AS archived_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.archived_at) AS archived_at__year + , EXTRACT(year FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_day + , EXTRACT(dayofweekiso FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_doy , DATE_TRUNC('day', users_ds_source_src_28000.ds) AS user__ds__day , DATE_TRUNC('week', users_ds_source_src_28000.ds) AS user__ds__week , DATE_TRUNC('month', users_ds_source_src_28000.ds) AS user__ds__month @@ -224,6 +278,60 @@ FROM ( , EXTRACT(dayofweekiso FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_dow , EXTRACT(doy FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_doy , users_ds_source_src_28000.home_state AS user__home_state + , DATE_TRUNC('millisecond', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__millisecond + , DATE_TRUNC('second', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_day + , EXTRACT(dayofweekiso FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_doy + , DATE_TRUNC('second', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_day + , EXTRACT(dayofweekiso FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_doy + , DATE_TRUNC('minute', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_day + , EXTRACT(dayofweekiso FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_doy + , DATE_TRUNC('hour', users_ds_source_src_28000.archived_at) AS user__archived_at__hour + , DATE_TRUNC('day', users_ds_source_src_28000.archived_at) AS user__archived_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.archived_at) AS user__archived_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.archived_at) AS user__archived_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.archived_at) AS user__archived_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.archived_at) AS user__archived_at__year + , EXTRACT(year FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_day + , EXTRACT(dayofweekiso FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_doy , users_ds_source_src_28000.user_id AS user FROM ***************************.dim_users users_ds_source_src_28000 ) subq_3 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time__plan0.sql index ce97454651..0f0357e2e0 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time__plan0.sql @@ -34,18 +34,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , EXTRACT(DAY_OF_WEEK FROM time_spine_src_28000.ds) AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , EXTRACT(DAY_OF_WEEK FROM time_spine_src_28006.ds) AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_0 ) subq_1 GROUP BY diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time__plan0_optimized.sql index ce2a27035e..4d31ef04b9 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time__plan0_optimized.sql @@ -8,7 +8,7 @@ FROM ( -- Pass Only Elements: ['metric_time__day',] SELECT DATE_TRUNC('day', ds) AS metric_time__day - FROM ***************************.mf_time_spine time_spine_src_28000 + FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY DATE_TRUNC('day', ds) ) subq_5 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time_week__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time_week__plan0.sql index 43a97950c9..b1f33eb2a6 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time_week__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time_week__plan0.sql @@ -34,18 +34,18 @@ FROM ( FROM ( -- Time Spine SELECT - DATE_TRUNC('day', time_spine_src_28000.ds) AS ds__day - , DATE_TRUNC('week', time_spine_src_28000.ds) AS ds__week - , DATE_TRUNC('month', time_spine_src_28000.ds) AS ds__month - , DATE_TRUNC('quarter', time_spine_src_28000.ds) AS ds__quarter - , DATE_TRUNC('year', time_spine_src_28000.ds) AS ds__year - , EXTRACT(year FROM time_spine_src_28000.ds) AS ds__extract_year - , EXTRACT(quarter FROM time_spine_src_28000.ds) AS ds__extract_quarter - , EXTRACT(month FROM time_spine_src_28000.ds) AS ds__extract_month - , EXTRACT(day FROM time_spine_src_28000.ds) AS ds__extract_day - , EXTRACT(DAY_OF_WEEK FROM time_spine_src_28000.ds) AS ds__extract_dow - , EXTRACT(doy FROM time_spine_src_28000.ds) AS ds__extract_doy - FROM ***************************.mf_time_spine time_spine_src_28000 + DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day + , DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week + , DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month + , DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter + , DATE_TRUNC('year', time_spine_src_28006.ds) AS ds__year + , EXTRACT(year FROM time_spine_src_28006.ds) AS ds__extract_year + , EXTRACT(quarter FROM time_spine_src_28006.ds) AS ds__extract_quarter + , EXTRACT(month FROM time_spine_src_28006.ds) AS ds__extract_month + , EXTRACT(day FROM time_spine_src_28006.ds) AS ds__extract_day + , EXTRACT(DAY_OF_WEEK FROM time_spine_src_28006.ds) AS ds__extract_dow + , EXTRACT(doy FROM time_spine_src_28006.ds) AS ds__extract_doy + FROM ***************************.mf_time_spine time_spine_src_28006 ) subq_0 ) subq_1 GROUP BY diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time_week__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time_week__plan0_optimized.sql index a5d07eba96..4ceb83d067 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time_week__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time_week__plan0_optimized.sql @@ -8,7 +8,7 @@ FROM ( -- Pass Only Elements: ['metric_time__week',] SELECT DATE_TRUNC('week', ds) AS metric_time__week - FROM ***************************.mf_time_spine time_spine_src_28000 + FROM ***************************.mf_time_spine time_spine_src_28006 GROUP BY DATE_TRUNC('week', ds) ) subq_5 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_partitioned_join__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_partitioned_join__plan0.sql index 2ce733de7d..72f660a182 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_partitioned_join__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_partitioned_join__plan0.sql @@ -190,6 +190,60 @@ FROM ( , EXTRACT(DAY_OF_WEEK FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_dow , EXTRACT(doy FROM users_ds_source_src_28000.ds_partitioned) AS ds_partitioned__extract_doy , users_ds_source_src_28000.home_state + , DATE_TRUNC('millisecond', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__millisecond + , DATE_TRUNC('second', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_day + , EXTRACT(DAY_OF_WEEK FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_profile_edit_ts) AS last_profile_edit_ts__extract_doy + , DATE_TRUNC('second', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_day + , EXTRACT(DAY_OF_WEEK FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.bio_added_ts) AS bio_added_ts__extract_doy + , DATE_TRUNC('minute', users_ds_source_src_28000.last_login_ts) AS last_login_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_login_ts) AS last_login_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_login_ts) AS last_login_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_login_ts) AS last_login_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_login_ts) AS last_login_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_login_ts) AS last_login_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_login_ts) AS last_login_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_day + , EXTRACT(DAY_OF_WEEK FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_login_ts) AS last_login_ts__extract_doy + , DATE_TRUNC('hour', users_ds_source_src_28000.archived_at) AS archived_at__hour + , DATE_TRUNC('day', users_ds_source_src_28000.archived_at) AS archived_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.archived_at) AS archived_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.archived_at) AS archived_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.archived_at) AS archived_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.archived_at) AS archived_at__year + , EXTRACT(year FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_day + , EXTRACT(DAY_OF_WEEK FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.archived_at) AS archived_at__extract_doy , DATE_TRUNC('day', users_ds_source_src_28000.ds) AS user__ds__day , DATE_TRUNC('week', users_ds_source_src_28000.ds) AS user__ds__week , DATE_TRUNC('month', users_ds_source_src_28000.ds) AS user__ds__month @@ -224,6 +278,60 @@ FROM ( , EXTRACT(DAY_OF_WEEK FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_dow , EXTRACT(doy FROM users_ds_source_src_28000.ds_partitioned) AS user__ds_partitioned__extract_doy , users_ds_source_src_28000.home_state AS user__home_state + , DATE_TRUNC('millisecond', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__millisecond + , DATE_TRUNC('second', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_day + , EXTRACT(DAY_OF_WEEK FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_profile_edit_ts) AS user__last_profile_edit_ts__extract_doy + , DATE_TRUNC('second', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__second + , DATE_TRUNC('minute', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_day + , EXTRACT(DAY_OF_WEEK FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__extract_doy + , DATE_TRUNC('minute', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__minute + , DATE_TRUNC('hour', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__hour + , DATE_TRUNC('day', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__day + , DATE_TRUNC('week', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__week + , DATE_TRUNC('month', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__year + , EXTRACT(year FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_day + , EXTRACT(DAY_OF_WEEK FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.last_login_ts) AS user__last_login_ts__extract_doy + , DATE_TRUNC('hour', users_ds_source_src_28000.archived_at) AS user__archived_at__hour + , DATE_TRUNC('day', users_ds_source_src_28000.archived_at) AS user__archived_at__day + , DATE_TRUNC('week', users_ds_source_src_28000.archived_at) AS user__archived_at__week + , DATE_TRUNC('month', users_ds_source_src_28000.archived_at) AS user__archived_at__month + , DATE_TRUNC('quarter', users_ds_source_src_28000.archived_at) AS user__archived_at__quarter + , DATE_TRUNC('year', users_ds_source_src_28000.archived_at) AS user__archived_at__year + , EXTRACT(year FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_year + , EXTRACT(quarter FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_quarter + , EXTRACT(month FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_month + , EXTRACT(day FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_day + , EXTRACT(DAY_OF_WEEK FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_dow + , EXTRACT(doy FROM users_ds_source_src_28000.archived_at) AS user__archived_at__extract_doy , users_ds_source_src_28000.user_id AS user FROM ***************************.dim_users users_ds_source_src_28000 ) subq_3 diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_1_semantic_model__dfp_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_1_semantic_model__dfp_0.xml index 0fe093d825..fef8f21032 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_1_semantic_model__dfp_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_1_semantic_model__dfp_0.xml @@ -42,11 +42,11 @@ - + - + @@ -59,11 +59,11 @@ - + - + @@ -110,11 +110,11 @@ - + - + @@ -127,11 +127,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_2_semantic_models__dfp_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_2_semantic_models__dfp_0.xml index 0bf968b5aa..b431d0a228 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_2_semantic_models__dfp_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_2_semantic_models__dfp_0.xml @@ -20,11 +20,11 @@ - + - + @@ -46,11 +46,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_ratio_metrics_from_1_semantic_model__dfp_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_ratio_metrics_from_1_semantic_model__dfp_0.xml index 043ac63d08..2ddfeed739 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_ratio_metrics_from_1_semantic_model__dfp_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_ratio_metrics_from_1_semantic_model__dfp_0.xml @@ -27,11 +27,11 @@ - + - + @@ -53,11 +53,11 @@ - + - + @@ -88,11 +88,11 @@ - + - + @@ -114,11 +114,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_3_metrics_from_2_semantic_models__dfp_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_3_metrics_from_2_semantic_models__dfp_0.xml index 39de495060..2d63d5e1c5 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_3_metrics_from_2_semantic_models__dfp_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_3_metrics_from_2_semantic_models__dfp_0.xml @@ -20,11 +20,11 @@ - + - + @@ -46,11 +46,11 @@ - + - + @@ -72,11 +72,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfp_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfp_0.xml index 57dad2c6e2..4964340006 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfp_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfp_0.xml @@ -20,11 +20,11 @@ - + - + @@ -100,11 +100,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric__dfp_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric__dfp_0.xml index f77d573c61..b071f05bc6 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric__dfp_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric__dfp_0.xml @@ -24,11 +24,11 @@ - + - + @@ -50,11 +50,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_with_non_derived_metric__dfp_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_with_non_derived_metric__dfp_0.xml index d2cec259be..fb4c3516a7 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_with_non_derived_metric__dfp_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_with_non_derived_metric__dfp_0.xml @@ -20,11 +20,11 @@ - + - + @@ -53,11 +53,11 @@ - + - + @@ -79,11 +79,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_duplicate_measures__dfp_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_duplicate_measures__dfp_0.xml index 7edd301e94..14fc0c78b9 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_duplicate_measures__dfp_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_duplicate_measures__dfp_0.xml @@ -24,11 +24,11 @@ - + - + @@ -55,11 +55,11 @@ - + - + diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_nested_derived_metric__dfp_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_nested_derived_metric__dfp_0.xml index 9a7c8a6c17..b9181a179d 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_nested_derived_metric__dfp_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_nested_derived_metric__dfp_0.xml @@ -32,11 +32,11 @@ - + - + @@ -59,11 +59,11 @@ - + - + @@ -87,11 +87,11 @@ - + - + @@ -113,11 +113,11 @@ - + - +