From 60d34a7de6d74e80d080ecb18d5fd3914c8192a7 Mon Sep 17 00:00:00 2001 From: William Deng Date: Thu, 8 Dec 2022 18:59:19 -0500 Subject: [PATCH] update snapshots --- .../test_convert_query_data_source__plan0.sql | 16 +- ...table_data_source_with_measures__plan0.sql | 52 +- ...le_data_source_without_measures__plan0.sql | 28 +- .../test_common_data_source__dfp_0.xml | 12 +- .../test_cumulative_metric__dfp_0.xml | 4 +- .../test_distinct_values_plan__dfp_0.xml | 6 +- .../test_expr_metrics_plan__dfp_0.xml | 6 +- .../DataflowPlan/test_joined_plan__dfp_0.xml | 6 +- .../test_limit_rows_plan__dfp_0.xml | 2 +- .../test_measure_constraint_plan__dfp_0.xml | 8 +- ...traint_with_reused_measure_plan__dfp_0.xml | 4 +- ..._data_source_ratio_metrics_plan__dfp_0.xml | 14 +- .../test_multihop_join_plan__dfp_0.xml | 8 +- .../test_multiple_metrics_plan__dfp_0.xml | 4 +- .../test_order_by_plan__dfp_0.xml | 2 +- .../DataflowPlan/test_simple_plan__dfp_0.xml | 2 +- ..._data_source_ratio_metrics_plan__dfp_0.xml | 6 +- .../test_where_constrained_plan__dfp_0.xml | 6 +- ...constrained_plan_time_dimension__dfp_0.xml | 2 +- ...ained_with_common_linkable_plan__dfp_0.xml | 6 +- .../test_joined_plan__ep_0.xml | 8 +- .../test_multihop_joined_plan__ep_0.xml | 22 +- ...ompute_metrics_node_simple_expr__plan0.xml | 2 +- .../test_composite_identifier__plan0.sql | 36 +- ..._composite_identifier__plan0_optimized.sql | 2 +- ..._composite_identifier_with_join__plan0.sql | 124 ++-- ..._identifier_with_join__plan0_optimized.sql | 12 +- ...posite_identifier_with_order_by__plan0.sql | 36 +- ...ntifier_with_order_by__plan0_optimized.sql | 2 +- .../test_compute_metrics_node__plan0.sql | 64 +- ..._compute_metrics_node__plan0_optimized.sql | 8 +- ...atio_from_multiple_data_sources__plan0.sql | 180 ++--- ...multiple_data_sources__plan0_optimized.sql | 18 +- ...e_ratio_from_single_data_source__plan0.sql | 64 +- ...om_single_data_source__plan0_optimized.sql | 8 +- ...ompute_metrics_node_simple_expr__plan0.sql | 64 +- ...rics_node_simple_expr__plan0_optimized.sql | 8 +- .../test_cumulative_metric__plan0.sql | 16 +- ...est_cumulative_metric__plan0_optimized.sql | 2 +- ...cumulative_metric_grain_to_date__plan0.sql | 16 +- ..._metric_grain_to_date__plan0_optimized.sql | 2 +- .../test_cumulative_metric_no_ds__plan0.sql | 16 +- ...mulative_metric_no_ds__plan0_optimized.sql | 2 +- ...est_cumulative_metric_no_window__plan0.sql | 16 +- ...tive_metric_no_window__plan0_optimized.sql | 2 +- ..._no_window_with_time_constraint__plan0.sql | 16 +- ..._with_time_constraint__plan0_optimized.sql | 2 +- ...ive_metric_with_time_constraint__plan0.sql | 16 +- ..._with_time_constraint__plan0_optimized.sql | 2 +- .../test_distinct_values__plan0.sql | 64 +- .../test_distinct_values__plan0_optimized.sql | 8 +- ...th_where_constraint_on_join_dim__plan0.sql | 64 +- ...onstraint_on_join_dim__plan0_optimized.sql | 6 +- ...est_join_conversion_events_node__plan0.sql | 83 +++ ...onversion_events_node__plan0_optimized.sql | 67 ++ .../test_join_to_scd_dimension__plan0.sql | 110 +-- ...join_to_scd_dimension__plan0_optimized.sql | 14 +- ...imension_using_local_identifier__plan0.sql | 64 +- ...sing_local_identifier__plan0_optimized.sql | 2 +- .../test_measure_constraint__plan0.sql | 64 +- ...st_measure_constraint__plan0_optimized.sql | 6 +- ..._multiple_sources_no_dimensions__plan0.sql | 64 +- ...sources_no_dimensions__plan0_optimized.sql | 2 +- ...multi_hop_through_scd_dimension__plan0.sql | 138 ++-- ...through_scd_dimension__plan0_optimized.sql | 16 +- ...test_multi_hop_to_scd_dimension__plan0.sql | 106 +-- ..._hop_to_scd_dimension__plan0_optimized.sql | 16 +- .../test_multi_join_node__plan0.sql | 128 ++-- .../test_multi_join_node__plan0_optimized.sql | 4 +- .../test_multihop_node__plan0.sql | 114 +-- .../test_multihop_node__plan0_optimized.sql | 22 +- ..._multiple_metrics_no_dimensions__plan0.sql | 64 +- ...metrics_no_dimensions__plan0_optimized.sql | 2 +- .../test_partitioned_join__plan0.sql | 120 +-- ...test_partitioned_join__plan0_optimized.sql | 12 +- .../test_single_join_node__plan0.sql | 64 +- ...test_single_join_node__plan0_optimized.sql | 6 +- .../test_common_data_source__plan0.xml | 281 ++++---- .../test_composite_identifier__plan0.xml | 45 +- ..._composite_identifier_with_join__plan0.xml | 139 ++-- ...posite_identifier_with_order_by__plan0.xml | 46 +- .../test_compute_metrics_node__plan0.xml | 75 +- ...atio_from_multiple_data_sources__plan0.xml | 681 +++++++++--------- ...e_ratio_from_single_data_source__plan0.xml | 75 +- ...ompute_metrics_node_simple_expr__plan0.xml | 75 +- .../test_constrain_time_range_node__plan0.xml | 4 + .../test_cumulative_metric__plan0.xml | 77 +- ...cumulative_metric_grain_to_date__plan0.xml | 77 +- .../test_cumulative_metric_no_ds__plan0.xml | 69 +- ...est_cumulative_metric_no_window__plan0.xml | 77 +- ..._no_window_with_time_constraint__plan0.xml | 106 +-- ...ive_metric_with_time_constraint__plan0.xml | 106 +-- .../test_derived_metric__plan0.xml | 288 ++++---- .../test_distinct_values__plan0.xml | 328 +++++---- .../SqlQueryPlan/test_filter_node__plan0.xml | 2 + ...lter_with_where_constraint_node__plan0.xml | 3 + ...th_where_constraint_on_join_dim__plan0.xml | 338 ++++----- ...est_join_conversion_events_node__plan0.xml | 241 +++++++ .../test_join_to_scd_dimension__plan0.xml | 129 ++-- .../SqlQueryPlan/test_limit_rows__plan0.xml | 144 ++-- ...imension_using_local_identifier__plan0.xml | 173 ++--- .../test_measure_aggregation_node__plan0.xml | 3 + .../test_measure_constraint__plan0.xml | 500 ++++++------- ..._constraint_with_reused_measure__plan0.xml | 305 ++++---- ...aint_with_single_expr_and_alias__plan0.xml | 155 ++-- ..._multiple_sources_no_dimensions__plan0.xml | 303 ++++---- ...multi_hop_through_scd_dimension__plan0.xml | 160 ++-- ...test_multi_hop_to_scd_dimension__plan0.xml | 128 ++-- .../test_multi_join_node__plan0.xml | 143 ++-- .../test_multihop_node__plan0.xml | 132 ++-- ..._multiple_metrics_no_dimensions__plan0.xml | 491 +++++++------ .../test_nested_derived_metric__plan0.xml | 580 ++++++++------- .../test_order_by_node__plan0.xml | 5 + .../test_partitioned_join__plan0.xml | 267 +++---- .../test_semi_additive_join_node__plan0.xml | 4 + ...dditive_join_node_with_grouping__plan0.xml | 4 + ...join_node_with_queried_group_by__plan0.xml | 4 + .../test_single_join_node__plan0.xml | 73 +- .../SqlQueryPlan/test_source_node__plan0.xml | 1 + ...orm_node_using_non_primary_time__plan0.xml | 2 + ...ansform_node_using_primary_time__plan0.xml | 2 + ...uery_with_metric_time_dimension__plan0.xml | 267 +++---- ...st_2_metrics_from_1_data_source__dfp_0.xml | 12 +- ...t_2_metrics_from_2_data_sources__dfp_0.xml | 6 +- ...atio_metrics_from_1_data_source__dfp_0.xml | 4 +- ...t_3_metrics_from_2_data_sources__dfp_0.xml | 8 +- ...constrained_metric_not_combined__dfp_0.xml | 4 +- .../test_derived_metric__dfp_0.xml | 4 +- ..._metric_with_non_derived_metric__dfp_0.xml | 6 +- .../test_nested_derived_metric__dfp_0.xml | 8 +- 130 files changed, 5146 insertions(+), 4404 deletions(-) create mode 100644 metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_join_conversion_events_node__plan0.sql create mode 100644 metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_join_conversion_events_node__plan0_optimized.sql create mode 100644 metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_join_conversion_events_node__plan0.xml diff --git a/metricflow/test/snapshots/test_convert_data_source.py/SqlQueryPlan/DuckDbSqlClient/test_convert_query_data_source__plan0.sql b/metricflow/test/snapshots/test_convert_data_source.py/SqlQueryPlan/DuckDbSqlClient/test_convert_query_data_source__plan0.sql index 59738a3c1a..fbe8658ce3 100644 --- a/metricflow/test/snapshots/test_convert_data_source.py/SqlQueryPlan/DuckDbSqlClient/test_convert_query_data_source__plan0.sql +++ b/metricflow/test/snapshots/test_convert_data_source.py/SqlQueryPlan/DuckDbSqlClient/test_convert_query_data_source__plan0.sql @@ -1,13 +1,13 @@ -- Read Elements From Data Source 'revenue' SELECT - revenue_src_10006.revenue AS txn_revenue - , revenue_src_10006.created_at AS ds - , DATE_TRUNC('week', revenue_src_10006.created_at) AS ds__week - , DATE_TRUNC('month', revenue_src_10006.created_at) AS ds__month - , DATE_TRUNC('quarter', revenue_src_10006.created_at) AS ds__quarter - , DATE_TRUNC('year', revenue_src_10006.created_at) AS ds__year - , revenue_src_10006.user_id AS user + revenue_src_10007.revenue AS txn_revenue + , revenue_src_10007.created_at AS ds + , DATE_TRUNC('week', revenue_src_10007.created_at) AS ds__week + , DATE_TRUNC('month', revenue_src_10007.created_at) AS ds__month + , DATE_TRUNC('quarter', revenue_src_10007.created_at) AS ds__quarter + , DATE_TRUNC('year', revenue_src_10007.created_at) AS ds__year + , revenue_src_10007.user_id AS user FROM ( -- User Defined SQL Query SELECT * FROM ***************************.fct_revenue -) revenue_src_10006 +) revenue_src_10007 diff --git a/metricflow/test/snapshots/test_convert_data_source.py/SqlQueryPlan/DuckDbSqlClient/test_convert_table_data_source_with_measures__plan0.sql b/metricflow/test/snapshots/test_convert_data_source.py/SqlQueryPlan/DuckDbSqlClient/test_convert_table_data_source_with_measures__plan0.sql index c755126f21..5849e34eea 100644 --- a/metricflow/test/snapshots/test_convert_data_source.py/SqlQueryPlan/DuckDbSqlClient/test_convert_table_data_source_with_measures__plan0.sql +++ b/metricflow/test/snapshots/test_convert_data_source.py/SqlQueryPlan/DuckDbSqlClient/test_convert_table_data_source_with_measures__plan0.sql @@ -1,29 +1,29 @@ -- Read Elements From Data Source 'id_verifications' SELECT 1 AS identity_verifications - , id_verifications_src_10003.ds - , DATE_TRUNC('week', id_verifications_src_10003.ds) AS ds__week - , DATE_TRUNC('month', id_verifications_src_10003.ds) AS ds__month - , DATE_TRUNC('quarter', id_verifications_src_10003.ds) AS ds__quarter - , DATE_TRUNC('year', id_verifications_src_10003.ds) AS ds__year - , id_verifications_src_10003.ds_partitioned - , DATE_TRUNC('week', id_verifications_src_10003.ds_partitioned) AS ds_partitioned__week - , DATE_TRUNC('month', id_verifications_src_10003.ds_partitioned) AS ds_partitioned__month - , DATE_TRUNC('quarter', id_verifications_src_10003.ds_partitioned) AS ds_partitioned__quarter - , DATE_TRUNC('year', id_verifications_src_10003.ds_partitioned) AS ds_partitioned__year - , id_verifications_src_10003.verification_type - , id_verifications_src_10003.ds AS verification__ds - , DATE_TRUNC('week', id_verifications_src_10003.ds) AS verification__ds__week - , DATE_TRUNC('month', id_verifications_src_10003.ds) AS verification__ds__month - , DATE_TRUNC('quarter', id_verifications_src_10003.ds) AS verification__ds__quarter - , DATE_TRUNC('year', id_verifications_src_10003.ds) AS verification__ds__year - , id_verifications_src_10003.ds_partitioned AS verification__ds_partitioned - , DATE_TRUNC('week', id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__week - , DATE_TRUNC('month', id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__month - , DATE_TRUNC('quarter', id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__quarter - , DATE_TRUNC('year', id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__year - , id_verifications_src_10003.verification_type AS verification__verification_type - , id_verifications_src_10003.verification_id AS verification - , id_verifications_src_10003.user_id AS user - , id_verifications_src_10003.user_id AS verification__user -FROM ***************************.fct_id_verifications id_verifications_src_10003 + , id_verifications_src_10004.ds + , DATE_TRUNC('week', id_verifications_src_10004.ds) AS ds__week + , DATE_TRUNC('month', id_verifications_src_10004.ds) AS ds__month + , DATE_TRUNC('quarter', id_verifications_src_10004.ds) AS ds__quarter + , DATE_TRUNC('year', id_verifications_src_10004.ds) AS ds__year + , id_verifications_src_10004.ds_partitioned + , DATE_TRUNC('week', id_verifications_src_10004.ds_partitioned) AS ds_partitioned__week + , DATE_TRUNC('month', id_verifications_src_10004.ds_partitioned) AS ds_partitioned__month + , DATE_TRUNC('quarter', id_verifications_src_10004.ds_partitioned) AS ds_partitioned__quarter + , DATE_TRUNC('year', id_verifications_src_10004.ds_partitioned) AS ds_partitioned__year + , id_verifications_src_10004.verification_type + , id_verifications_src_10004.ds AS verification__ds + , DATE_TRUNC('week', id_verifications_src_10004.ds) AS verification__ds__week + , DATE_TRUNC('month', id_verifications_src_10004.ds) AS verification__ds__month + , DATE_TRUNC('quarter', id_verifications_src_10004.ds) AS verification__ds__quarter + , DATE_TRUNC('year', id_verifications_src_10004.ds) AS verification__ds__year + , id_verifications_src_10004.ds_partitioned AS verification__ds_partitioned + , DATE_TRUNC('week', id_verifications_src_10004.ds_partitioned) AS verification__ds_partitioned__week + , DATE_TRUNC('month', id_verifications_src_10004.ds_partitioned) AS verification__ds_partitioned__month + , DATE_TRUNC('quarter', id_verifications_src_10004.ds_partitioned) AS verification__ds_partitioned__quarter + , DATE_TRUNC('year', id_verifications_src_10004.ds_partitioned) AS verification__ds_partitioned__year + , id_verifications_src_10004.verification_type AS verification__verification_type + , id_verifications_src_10004.verification_id AS verification + , id_verifications_src_10004.user_id AS user + , id_verifications_src_10004.user_id AS verification__user +FROM ***************************.fct_id_verifications id_verifications_src_10004 diff --git a/metricflow/test/snapshots/test_convert_data_source.py/SqlQueryPlan/DuckDbSqlClient/test_convert_table_data_source_without_measures__plan0.sql b/metricflow/test/snapshots/test_convert_data_source.py/SqlQueryPlan/DuckDbSqlClient/test_convert_table_data_source_without_measures__plan0.sql index 75ae7f94bb..99fd2570f1 100644 --- a/metricflow/test/snapshots/test_convert_data_source.py/SqlQueryPlan/DuckDbSqlClient/test_convert_table_data_source_without_measures__plan0.sql +++ b/metricflow/test/snapshots/test_convert_data_source.py/SqlQueryPlan/DuckDbSqlClient/test_convert_table_data_source_without_measures__plan0.sql @@ -1,16 +1,16 @@ -- Read Elements From Data Source 'users_latest' SELECT - users_latest_src_10008.ds - , DATE_TRUNC('week', users_latest_src_10008.ds) AS ds__week - , DATE_TRUNC('month', users_latest_src_10008.ds) AS ds__month - , DATE_TRUNC('quarter', users_latest_src_10008.ds) AS ds__quarter - , DATE_TRUNC('year', users_latest_src_10008.ds) AS ds__year - , users_latest_src_10008.home_state_latest - , users_latest_src_10008.ds AS user__ds - , DATE_TRUNC('week', users_latest_src_10008.ds) AS user__ds__week - , DATE_TRUNC('month', users_latest_src_10008.ds) AS user__ds__month - , DATE_TRUNC('quarter', users_latest_src_10008.ds) AS user__ds__quarter - , DATE_TRUNC('year', users_latest_src_10008.ds) AS user__ds__year - , users_latest_src_10008.home_state_latest AS user__home_state_latest - , users_latest_src_10008.user_id AS user -FROM ***************************.dim_users_latest users_latest_src_10008 + users_latest_src_10009.ds + , DATE_TRUNC('week', users_latest_src_10009.ds) AS ds__week + , DATE_TRUNC('month', users_latest_src_10009.ds) AS ds__month + , DATE_TRUNC('quarter', users_latest_src_10009.ds) AS ds__quarter + , DATE_TRUNC('year', users_latest_src_10009.ds) AS ds__year + , users_latest_src_10009.home_state_latest + , users_latest_src_10009.ds AS user__ds + , DATE_TRUNC('week', users_latest_src_10009.ds) AS user__ds__week + , DATE_TRUNC('month', users_latest_src_10009.ds) AS user__ds__month + , DATE_TRUNC('quarter', users_latest_src_10009.ds) AS user__ds__quarter + , DATE_TRUNC('year', users_latest_src_10009.ds) AS user__ds__year + , users_latest_src_10009.home_state_latest AS user__home_state_latest + , users_latest_src_10009.user_id AS user +FROM ***************************.dim_users_latest users_latest_src_10009 diff --git a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_common_data_source__dfp_0.xml b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_common_data_source__dfp_0.xml index 31e8b720fe..6d6b64cc8d 100644 --- a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_common_data_source__dfp_0.xml +++ b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_common_data_source__dfp_0.xml @@ -72,7 +72,7 @@ - + @@ -93,12 +93,12 @@ - + - + @@ -175,7 +175,7 @@ - + @@ -196,12 +196,12 @@ - + - + diff --git a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric__dfp_0.xml b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric__dfp_0.xml index 6579c01935..d1faf5232b 100644 --- a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric__dfp_0.xml +++ b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric__dfp_0.xml @@ -32,12 +32,12 @@ - + - + diff --git a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan__dfp_0.xml b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan__dfp_0.xml index 9ac4d2ba53..d0ab4fa1fc 100644 --- a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan__dfp_0.xml +++ b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan__dfp_0.xml @@ -83,7 +83,7 @@ - + @@ -104,12 +104,12 @@ - + - + diff --git a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_expr_metrics_plan__dfp_0.xml b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_expr_metrics_plan__dfp_0.xml index 4c14018a03..88c4822890 100644 --- a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_expr_metrics_plan__dfp_0.xml +++ b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_expr_metrics_plan__dfp_0.xml @@ -69,7 +69,7 @@ - + @@ -90,12 +90,12 @@ - + - + diff --git a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_joined_plan__dfp_0.xml b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_joined_plan__dfp_0.xml index af78df719e..8570d5b25c 100644 --- a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_joined_plan__dfp_0.xml +++ b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_joined_plan__dfp_0.xml @@ -63,7 +63,7 @@ - + @@ -84,12 +84,12 @@ - + - + diff --git a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_limit_rows_plan__dfp_0.xml b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_limit_rows_plan__dfp_0.xml index a681506877..90a5fb834f 100644 --- a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_limit_rows_plan__dfp_0.xml +++ b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_limit_rows_plan__dfp_0.xml @@ -38,7 +38,7 @@ - + diff --git a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_plan__dfp_0.xml b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_plan__dfp_0.xml index 2e2e6fc62b..ebb85b7fe6 100644 --- a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_plan__dfp_0.xml +++ b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_plan__dfp_0.xml @@ -136,7 +136,7 @@ - + @@ -157,12 +157,12 @@ - + - + @@ -197,7 +197,7 @@ - + diff --git a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_with_reused_measure_plan__dfp_0.xml b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_with_reused_measure_plan__dfp_0.xml index a1ce4df35e..0ed44c6f89 100644 --- a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_with_reused_measure_plan__dfp_0.xml +++ b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_with_reused_measure_plan__dfp_0.xml @@ -86,7 +86,7 @@ - + @@ -119,7 +119,7 @@ - + diff --git a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multi_data_source_ratio_metrics_plan__dfp_0.xml b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multi_data_source_ratio_metrics_plan__dfp_0.xml index 89f2ac90bd..2ddb4a80c0 100644 --- a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multi_data_source_ratio_metrics_plan__dfp_0.xml +++ b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multi_data_source_ratio_metrics_plan__dfp_0.xml @@ -96,7 +96,7 @@ - + @@ -117,12 +117,12 @@ - + - + @@ -185,12 +185,12 @@ - + - + @@ -211,12 +211,12 @@ - + - + diff --git a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multihop_join_plan__dfp_0.xml b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multihop_join_plan__dfp_0.xml index 61326466d1..ab6f399632 100644 --- a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multihop_join_plan__dfp_0.xml +++ b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multihop_join_plan__dfp_0.xml @@ -69,12 +69,12 @@ - + - + @@ -122,7 +122,7 @@ - + @@ -225,7 +225,7 @@ - + diff --git a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multiple_metrics_plan__dfp_0.xml b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multiple_metrics_plan__dfp_0.xml index d3bafbedc6..b3f834c7cf 100644 --- a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multiple_metrics_plan__dfp_0.xml +++ b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multiple_metrics_plan__dfp_0.xml @@ -39,7 +39,7 @@ - + @@ -81,7 +81,7 @@ - + diff --git a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_order_by_plan__dfp_0.xml b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_order_by_plan__dfp_0.xml index 12b308f99d..ed1d1ad6fa 100644 --- a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_order_by_plan__dfp_0.xml +++ b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_order_by_plan__dfp_0.xml @@ -58,7 +58,7 @@ - + diff --git a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_simple_plan__dfp_0.xml b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_simple_plan__dfp_0.xml index 6aecb79f03..6aed77c6ea 100644 --- a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_simple_plan__dfp_0.xml +++ b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_simple_plan__dfp_0.xml @@ -31,7 +31,7 @@ - + diff --git a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_single_data_source_ratio_metrics_plan__dfp_0.xml b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_single_data_source_ratio_metrics_plan__dfp_0.xml index cc31e30582..7b25e61c71 100644 --- a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_single_data_source_ratio_metrics_plan__dfp_0.xml +++ b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_single_data_source_ratio_metrics_plan__dfp_0.xml @@ -77,7 +77,7 @@ - + @@ -98,12 +98,12 @@ - + - + diff --git a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan__dfp_0.xml b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan__dfp_0.xml index 62c4a762bf..02da3ef1cb 100644 --- a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan__dfp_0.xml +++ b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan__dfp_0.xml @@ -89,7 +89,7 @@ - + @@ -110,12 +110,12 @@ - + - + diff --git a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan_time_dimension__dfp_0.xml b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan_time_dimension__dfp_0.xml index 763545e19a..1f28ec105a 100644 --- a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan_time_dimension__dfp_0.xml +++ b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan_time_dimension__dfp_0.xml @@ -62,7 +62,7 @@ - + diff --git a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_with_common_linkable_plan__dfp_0.xml b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_with_common_linkable_plan__dfp_0.xml index 38ab874521..38f2f27f61 100644 --- a/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_with_common_linkable_plan__dfp_0.xml +++ b/metricflow/test/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_with_common_linkable_plan__dfp_0.xml @@ -74,7 +74,7 @@ - + @@ -95,12 +95,12 @@ - + - + diff --git a/metricflow/test/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDbSqlClient/test_joined_plan__ep_0.xml b/metricflow/test/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDbSqlClient/test_joined_plan__ep_0.xml index aff9172522..3923df0fe8 100644 --- a/metricflow/test/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDbSqlClient/test_joined_plan__ep_0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDbSqlClient/test_joined_plan__ep_0.xml @@ -10,7 +10,7 @@ - + @@ -27,11 +27,11 @@ - + - + - + diff --git a/metricflow/test/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDbSqlClient/test_multihop_joined_plan__ep_0.xml b/metricflow/test/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDbSqlClient/test_multihop_joined_plan__ep_0.xml index 0e0abc3109..70a44e1520 100644 --- a/metricflow/test/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDbSqlClient/test_multihop_joined_plan__ep_0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDbSqlClient/test_multihop_joined_plan__ep_0.xml @@ -10,31 +10,31 @@ - - + + - - - - + + + + - + - + - + - + - + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_compute_metrics_node_simple_expr__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_compute_metrics_node_simple_expr__plan0.xml index 0fee39c242..9336688cf2 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_compute_metrics_node_simple_expr__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_compute_metrics_node_simple_expr__plan0.xml @@ -62,7 +62,7 @@ - + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_composite_identifier__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_composite_identifier__plan0.sql index 19c7d6a3ca..91cac67684 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_composite_identifier__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_composite_identifier__plan0.sql @@ -46,24 +46,24 @@ FROM ( -- Read Elements From Data Source 'messages_source' SELECT 1 AS messages - , messages_source_src_10015.ds - , DATE_TRUNC('week', messages_source_src_10015.ds) AS ds__week - , DATE_TRUNC('month', messages_source_src_10015.ds) AS ds__month - , DATE_TRUNC('quarter', messages_source_src_10015.ds) AS ds__quarter - , DATE_TRUNC('year', messages_source_src_10015.ds) AS ds__year - , messages_source_src_10015.team_id - , messages_source_src_10015.ds AS user_id__ds - , DATE_TRUNC('week', messages_source_src_10015.ds) AS user_id__ds__week - , DATE_TRUNC('month', messages_source_src_10015.ds) AS user_id__ds__month - , DATE_TRUNC('quarter', messages_source_src_10015.ds) AS user_id__ds__quarter - , DATE_TRUNC('year', messages_source_src_10015.ds) AS user_id__ds__year - , messages_source_src_10015.team_id AS user_id__team_id - , messages_source_src_10015.user_id - , messages_source_src_10015.team_id AS user_team___team_id - , messages_source_src_10015.user_id AS user_team___user_id - , messages_source_src_10015.team_id AS user_id__user_team___team_id - , messages_source_src_10015.user_id AS user_id__user_team___user_id - FROM ***************************.fct_messages messages_source_src_10015 + , messages_source_src_10017.ds + , DATE_TRUNC('week', messages_source_src_10017.ds) AS ds__week + , DATE_TRUNC('month', messages_source_src_10017.ds) AS ds__month + , DATE_TRUNC('quarter', messages_source_src_10017.ds) AS ds__quarter + , DATE_TRUNC('year', messages_source_src_10017.ds) AS ds__year + , messages_source_src_10017.team_id + , messages_source_src_10017.ds AS user_id__ds + , DATE_TRUNC('week', messages_source_src_10017.ds) AS user_id__ds__week + , DATE_TRUNC('month', messages_source_src_10017.ds) AS user_id__ds__month + , DATE_TRUNC('quarter', messages_source_src_10017.ds) AS user_id__ds__quarter + , DATE_TRUNC('year', messages_source_src_10017.ds) AS user_id__ds__year + , messages_source_src_10017.team_id AS user_id__team_id + , messages_source_src_10017.user_id + , messages_source_src_10017.team_id AS user_team___team_id + , messages_source_src_10017.user_id AS user_team___user_id + , messages_source_src_10017.team_id AS user_id__user_team___team_id + , messages_source_src_10017.user_id AS user_id__user_team___user_id + FROM ***************************.fct_messages messages_source_src_10017 ) subq_0 ) subq_1 ) subq_2 diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_composite_identifier__plan0_optimized.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_composite_identifier__plan0_optimized.sql index 5874a6ce5c..5d6458aa19 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_composite_identifier__plan0_optimized.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_composite_identifier__plan0_optimized.sql @@ -13,7 +13,7 @@ FROM ( team_id AS user_team___team_id , user_id AS user_team___user_id , 1 AS messages - FROM ***************************.fct_messages messages_source_src_10015 + FROM ***************************.fct_messages messages_source_src_10017 ) subq_6 GROUP BY user_team___team_id diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_composite_identifier_with_join__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_composite_identifier_with_join__plan0.sql index f0944ea181..db32ddab0d 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_composite_identifier_with_join__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_composite_identifier_with_join__plan0.sql @@ -63,24 +63,24 @@ FROM ( -- Read Elements From Data Source 'messages_source' SELECT 1 AS messages - , messages_source_src_10015.ds - , DATE_TRUNC('week', messages_source_src_10015.ds) AS ds__week - , DATE_TRUNC('month', messages_source_src_10015.ds) AS ds__month - , DATE_TRUNC('quarter', messages_source_src_10015.ds) AS ds__quarter - , DATE_TRUNC('year', messages_source_src_10015.ds) AS ds__year - , messages_source_src_10015.team_id - , messages_source_src_10015.ds AS user_id__ds - , DATE_TRUNC('week', messages_source_src_10015.ds) AS user_id__ds__week - , DATE_TRUNC('month', messages_source_src_10015.ds) AS user_id__ds__month - , DATE_TRUNC('quarter', messages_source_src_10015.ds) AS user_id__ds__quarter - , DATE_TRUNC('year', messages_source_src_10015.ds) AS user_id__ds__year - , messages_source_src_10015.team_id AS user_id__team_id - , messages_source_src_10015.user_id - , messages_source_src_10015.team_id AS user_team___team_id - , messages_source_src_10015.user_id AS user_team___user_id - , messages_source_src_10015.team_id AS user_id__user_team___team_id - , messages_source_src_10015.user_id AS user_id__user_team___user_id - FROM ***************************.fct_messages messages_source_src_10015 + , messages_source_src_10017.ds + , DATE_TRUNC('week', messages_source_src_10017.ds) AS ds__week + , DATE_TRUNC('month', messages_source_src_10017.ds) AS ds__month + , DATE_TRUNC('quarter', messages_source_src_10017.ds) AS ds__quarter + , DATE_TRUNC('year', messages_source_src_10017.ds) AS ds__year + , messages_source_src_10017.team_id + , messages_source_src_10017.ds AS user_id__ds + , DATE_TRUNC('week', messages_source_src_10017.ds) AS user_id__ds__week + , DATE_TRUNC('month', messages_source_src_10017.ds) AS user_id__ds__month + , DATE_TRUNC('quarter', messages_source_src_10017.ds) AS user_id__ds__quarter + , DATE_TRUNC('year', messages_source_src_10017.ds) AS user_id__ds__year + , messages_source_src_10017.team_id AS user_id__team_id + , messages_source_src_10017.user_id + , messages_source_src_10017.team_id AS user_team___team_id + , messages_source_src_10017.user_id AS user_team___user_id + , messages_source_src_10017.team_id AS user_id__user_team___team_id + , messages_source_src_10017.user_id AS user_id__user_team___user_id + FROM ***************************.fct_messages messages_source_src_10017 ) subq_0 ) subq_1 ) subq_2 @@ -94,50 +94,50 @@ FROM ( FROM ( -- Read Elements From Data Source 'users_source' SELECT - users_source_src_10017.created_at AS ds - , DATE_TRUNC('week', users_source_src_10017.created_at) AS ds__week - , DATE_TRUNC('month', users_source_src_10017.created_at) AS ds__month - , DATE_TRUNC('quarter', users_source_src_10017.created_at) AS ds__quarter - , DATE_TRUNC('year', users_source_src_10017.created_at) AS ds__year - , users_source_src_10017.team_id - , users_source_src_10017.country - , users_source_src_10017.created_at AS user_id__ds - , DATE_TRUNC('week', users_source_src_10017.created_at) AS user_id__ds__week - , DATE_TRUNC('month', users_source_src_10017.created_at) AS user_id__ds__month - , DATE_TRUNC('quarter', users_source_src_10017.created_at) AS user_id__ds__quarter - , DATE_TRUNC('year', users_source_src_10017.created_at) AS user_id__ds__year - , users_source_src_10017.team_id AS user_id__team_id - , users_source_src_10017.country AS user_id__country - , users_source_src_10017.created_at AS user_composite_ident_2__ds - , DATE_TRUNC('week', users_source_src_10017.created_at) AS user_composite_ident_2__ds__week - , DATE_TRUNC('month', users_source_src_10017.created_at) AS user_composite_ident_2__ds__month - , DATE_TRUNC('quarter', users_source_src_10017.created_at) AS user_composite_ident_2__ds__quarter - , DATE_TRUNC('year', users_source_src_10017.created_at) AS user_composite_ident_2__ds__year - , users_source_src_10017.team_id AS user_composite_ident_2__team_id - , users_source_src_10017.country AS user_composite_ident_2__country - , users_source_src_10017.created_at AS user_team__ds - , DATE_TRUNC('week', users_source_src_10017.created_at) AS user_team__ds__week - , DATE_TRUNC('month', users_source_src_10017.created_at) AS user_team__ds__month - , DATE_TRUNC('quarter', users_source_src_10017.created_at) AS user_team__ds__quarter - , DATE_TRUNC('year', users_source_src_10017.created_at) AS user_team__ds__year - , users_source_src_10017.team_id AS user_team__team_id - , users_source_src_10017.country AS user_team__country - , users_source_src_10017.id AS user_id - , users_source_src_10017.ident_2 AS user_composite_ident_2___ident_2 - , users_source_src_10017.id AS user_composite_ident_2___user_id - , users_source_src_10017.team_id AS user_team___team_id - , users_source_src_10017.id AS user_team___user_id - , users_source_src_10017.ident_2 AS user_id__user_composite_ident_2___ident_2 - , users_source_src_10017.id AS user_id__user_composite_ident_2___user_id - , users_source_src_10017.team_id AS user_id__user_team___team_id - , users_source_src_10017.id AS user_id__user_team___user_id - , users_source_src_10017.id AS user_composite_ident_2__user_id - , users_source_src_10017.team_id AS user_composite_ident_2__user_team___team_id - , users_source_src_10017.id AS user_composite_ident_2__user_team___user_id - , users_source_src_10017.id AS user_team__user_id - , users_source_src_10017.ident_2 AS user_team__user_composite_ident_2___ident_2 - , users_source_src_10017.id AS user_team__user_composite_ident_2___user_id - FROM ***************************.fct_users users_source_src_10017 + users_source_src_10019.created_at AS ds + , DATE_TRUNC('week', users_source_src_10019.created_at) AS ds__week + , DATE_TRUNC('month', users_source_src_10019.created_at) AS ds__month + , DATE_TRUNC('quarter', users_source_src_10019.created_at) AS ds__quarter + , DATE_TRUNC('year', users_source_src_10019.created_at) AS ds__year + , users_source_src_10019.team_id + , users_source_src_10019.country + , users_source_src_10019.created_at AS user_id__ds + , DATE_TRUNC('week', users_source_src_10019.created_at) AS user_id__ds__week + , DATE_TRUNC('month', users_source_src_10019.created_at) AS user_id__ds__month + , DATE_TRUNC('quarter', users_source_src_10019.created_at) AS user_id__ds__quarter + , DATE_TRUNC('year', users_source_src_10019.created_at) AS user_id__ds__year + , users_source_src_10019.team_id AS user_id__team_id + , users_source_src_10019.country AS user_id__country + , users_source_src_10019.created_at AS user_composite_ident_2__ds + , DATE_TRUNC('week', users_source_src_10019.created_at) AS user_composite_ident_2__ds__week + , DATE_TRUNC('month', users_source_src_10019.created_at) AS user_composite_ident_2__ds__month + , DATE_TRUNC('quarter', users_source_src_10019.created_at) AS user_composite_ident_2__ds__quarter + , DATE_TRUNC('year', users_source_src_10019.created_at) AS user_composite_ident_2__ds__year + , users_source_src_10019.team_id AS user_composite_ident_2__team_id + , users_source_src_10019.country AS user_composite_ident_2__country + , users_source_src_10019.created_at AS user_team__ds + , DATE_TRUNC('week', users_source_src_10019.created_at) AS user_team__ds__week + , DATE_TRUNC('month', users_source_src_10019.created_at) AS user_team__ds__month + , DATE_TRUNC('quarter', users_source_src_10019.created_at) AS user_team__ds__quarter + , DATE_TRUNC('year', users_source_src_10019.created_at) AS user_team__ds__year + , users_source_src_10019.team_id AS user_team__team_id + , users_source_src_10019.country AS user_team__country + , users_source_src_10019.id AS user_id + , users_source_src_10019.ident_2 AS user_composite_ident_2___ident_2 + , users_source_src_10019.id AS user_composite_ident_2___user_id + , users_source_src_10019.team_id AS user_team___team_id + , users_source_src_10019.id AS user_team___user_id + , users_source_src_10019.ident_2 AS user_id__user_composite_ident_2___ident_2 + , users_source_src_10019.id AS user_id__user_composite_ident_2___user_id + , users_source_src_10019.team_id AS user_id__user_team___team_id + , users_source_src_10019.id AS user_id__user_team___user_id + , users_source_src_10019.id AS user_composite_ident_2__user_id + , users_source_src_10019.team_id AS user_composite_ident_2__user_team___team_id + , users_source_src_10019.id AS user_composite_ident_2__user_team___user_id + , users_source_src_10019.id AS user_team__user_id + , users_source_src_10019.ident_2 AS user_team__user_composite_ident_2___ident_2 + , users_source_src_10019.id AS user_team__user_composite_ident_2___user_id + FROM ***************************.fct_users users_source_src_10019 ) subq_3 ) subq_4 ON diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_composite_identifier_with_join__plan0_optimized.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_composite_identifier_with_join__plan0_optimized.sql index 197f4ee9ff..d1a7f469af 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_composite_identifier_with_join__plan0_optimized.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_composite_identifier_with_join__plan0_optimized.sql @@ -6,7 +6,7 @@ SELECT subq_10.user_team___team_id AS user_team___team_id , subq_10.user_team___user_id AS user_team___user_id - , users_source_src_10017.country AS user_team__country + , users_source_src_10019.country AS user_team__country , SUM(subq_10.messages) AS messages FROM ( -- Read Elements From Data Source 'messages_source' @@ -17,17 +17,17 @@ FROM ( team_id AS user_team___team_id , user_id AS user_team___user_id , 1 AS messages - FROM ***************************.fct_messages messages_source_src_10015 + FROM ***************************.fct_messages messages_source_src_10017 ) subq_10 LEFT OUTER JOIN - ***************************.fct_users users_source_src_10017 + ***************************.fct_users users_source_src_10019 ON ( - subq_10.user_team___team_id = users_source_src_10017.team_id + subq_10.user_team___team_id = users_source_src_10019.team_id ) AND ( - subq_10.user_team___user_id = users_source_src_10017.id + subq_10.user_team___user_id = users_source_src_10019.id ) GROUP BY subq_10.user_team___team_id , subq_10.user_team___user_id - , users_source_src_10017.country + , users_source_src_10019.country diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_composite_identifier_with_order_by__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_composite_identifier_with_order_by__plan0.sql index 729cf82253..a9238e4659 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_composite_identifier_with_order_by__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_composite_identifier_with_order_by__plan0.sql @@ -52,24 +52,24 @@ FROM ( -- Read Elements From Data Source 'messages_source' SELECT 1 AS messages - , messages_source_src_10015.ds - , DATE_TRUNC('week', messages_source_src_10015.ds) AS ds__week - , DATE_TRUNC('month', messages_source_src_10015.ds) AS ds__month - , DATE_TRUNC('quarter', messages_source_src_10015.ds) AS ds__quarter - , DATE_TRUNC('year', messages_source_src_10015.ds) AS ds__year - , messages_source_src_10015.team_id - , messages_source_src_10015.ds AS user_id__ds - , DATE_TRUNC('week', messages_source_src_10015.ds) AS user_id__ds__week - , DATE_TRUNC('month', messages_source_src_10015.ds) AS user_id__ds__month - , DATE_TRUNC('quarter', messages_source_src_10015.ds) AS user_id__ds__quarter - , DATE_TRUNC('year', messages_source_src_10015.ds) AS user_id__ds__year - , messages_source_src_10015.team_id AS user_id__team_id - , messages_source_src_10015.user_id - , messages_source_src_10015.team_id AS user_team___team_id - , messages_source_src_10015.user_id AS user_team___user_id - , messages_source_src_10015.team_id AS user_id__user_team___team_id - , messages_source_src_10015.user_id AS user_id__user_team___user_id - FROM ***************************.fct_messages messages_source_src_10015 + , messages_source_src_10017.ds + , DATE_TRUNC('week', messages_source_src_10017.ds) AS ds__week + , DATE_TRUNC('month', messages_source_src_10017.ds) AS ds__month + , DATE_TRUNC('quarter', messages_source_src_10017.ds) AS ds__quarter + , DATE_TRUNC('year', messages_source_src_10017.ds) AS ds__year + , messages_source_src_10017.team_id + , messages_source_src_10017.ds AS user_id__ds + , DATE_TRUNC('week', messages_source_src_10017.ds) AS user_id__ds__week + , DATE_TRUNC('month', messages_source_src_10017.ds) AS user_id__ds__month + , DATE_TRUNC('quarter', messages_source_src_10017.ds) AS user_id__ds__quarter + , DATE_TRUNC('year', messages_source_src_10017.ds) AS user_id__ds__year + , messages_source_src_10017.team_id AS user_id__team_id + , messages_source_src_10017.user_id + , messages_source_src_10017.team_id AS user_team___team_id + , messages_source_src_10017.user_id AS user_team___user_id + , messages_source_src_10017.team_id AS user_id__user_team___team_id + , messages_source_src_10017.user_id AS user_id__user_team___user_id + FROM ***************************.fct_messages messages_source_src_10017 ) subq_0 ) subq_1 ) subq_2 diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_composite_identifier_with_order_by__plan0_optimized.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_composite_identifier_with_order_by__plan0_optimized.sql index 0d8ba1d7e2..2704ce4673 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_composite_identifier_with_order_by__plan0_optimized.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_composite_identifier_with_order_by__plan0_optimized.sql @@ -14,7 +14,7 @@ FROM ( team_id AS user_team___team_id , user_id AS user_team___user_id , 1 AS messages - FROM ***************************.fct_messages messages_source_src_10015 + FROM ***************************.fct_messages messages_source_src_10017 ) subq_7 GROUP BY user_team___team_id diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node__plan0.sql index 9fdb178f2b..05cbc2c7c0 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node__plan0.sql @@ -88,38 +88,38 @@ FROM ( -- Read Elements From Data Source 'listings_latest' SELECT 1 AS listings - , listings_latest_src_10004.capacity AS largest_listing - , listings_latest_src_10004.capacity AS smallest_listing - , listings_latest_src_10004.created_at AS ds - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS ds__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS ds__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS ds__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS ds__year - , listings_latest_src_10004.created_at - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS created_at__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS created_at__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS created_at__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS created_at__year - , listings_latest_src_10004.country AS country_latest - , listings_latest_src_10004.is_lux AS is_lux_latest - , listings_latest_src_10004.capacity AS capacity_latest - , listings_latest_src_10004.created_at AS listing__ds - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS listing__ds__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS listing__ds__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS listing__ds__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS listing__ds__year - , listings_latest_src_10004.created_at AS listing__created_at - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS listing__created_at__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS listing__created_at__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS listing__created_at__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS listing__created_at__year - , listings_latest_src_10004.country AS listing__country_latest - , listings_latest_src_10004.is_lux AS listing__is_lux_latest - , listings_latest_src_10004.capacity AS listing__capacity_latest - , listings_latest_src_10004.listing_id AS listing - , listings_latest_src_10004.user_id AS user - , listings_latest_src_10004.user_id AS listing__user - FROM ***************************.dim_listings_latest listings_latest_src_10004 + , listings_latest_src_10005.capacity AS largest_listing + , listings_latest_src_10005.capacity AS smallest_listing + , listings_latest_src_10005.created_at AS ds + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS ds__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS ds__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS ds__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS ds__year + , listings_latest_src_10005.created_at + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS created_at__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS created_at__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS created_at__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS created_at__year + , listings_latest_src_10005.country AS country_latest + , listings_latest_src_10005.is_lux AS is_lux_latest + , listings_latest_src_10005.capacity AS capacity_latest + , listings_latest_src_10005.created_at AS listing__ds + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS listing__ds__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS listing__ds__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS listing__ds__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS listing__ds__year + , listings_latest_src_10005.created_at AS listing__created_at + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS listing__created_at__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS listing__created_at__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS listing__created_at__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS listing__created_at__year + , listings_latest_src_10005.country AS listing__country_latest + , listings_latest_src_10005.is_lux AS listing__is_lux_latest + , listings_latest_src_10005.capacity AS listing__capacity_latest + , listings_latest_src_10005.listing_id AS listing + , listings_latest_src_10005.user_id AS user + , listings_latest_src_10005.user_id AS listing__user + FROM ***************************.dim_listings_latest listings_latest_src_10005 ) subq_2 ) subq_3 ON diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node__plan0_optimized.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node__plan0_optimized.sql index c92dc4aec4..4ded6af2e2 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node__plan0_optimized.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node__plan0_optimized.sql @@ -3,7 +3,7 @@ -- Compute Metrics via Expressions SELECT subq_7.listing AS listing - , listings_latest_src_10004.country AS listing__country_latest + , listings_latest_src_10005.country AS listing__country_latest , SUM(subq_7.bookings) AS bookings FROM ( -- Read Elements From Data Source 'bookings_source' @@ -18,9 +18,9 @@ FROM ( ) bookings_source_src_10001 ) subq_7 LEFT OUTER JOIN - ***************************.dim_listings_latest listings_latest_src_10004 + ***************************.dim_listings_latest listings_latest_src_10005 ON - subq_7.listing = listings_latest_src_10004.listing_id + subq_7.listing = listings_latest_src_10005.listing_id GROUP BY subq_7.listing - , listings_latest_src_10004.country + , listings_latest_src_10005.country diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node_ratio_from_multiple_data_sources__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node_ratio_from_multiple_data_sources__plan0.sql index 31907d0386..add52432dc 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node_ratio_from_multiple_data_sources__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node_ratio_from_multiple_data_sources__plan0.sql @@ -208,38 +208,38 @@ FROM ( -- Read Elements From Data Source 'listings_latest' SELECT 1 AS listings - , listings_latest_src_10004.capacity AS largest_listing - , listings_latest_src_10004.capacity AS smallest_listing - , listings_latest_src_10004.created_at AS ds - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS ds__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS ds__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS ds__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS ds__year - , listings_latest_src_10004.created_at - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS created_at__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS created_at__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS created_at__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS created_at__year - , listings_latest_src_10004.country AS country_latest - , listings_latest_src_10004.is_lux AS is_lux_latest - , listings_latest_src_10004.capacity AS capacity_latest - , listings_latest_src_10004.created_at AS listing__ds - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS listing__ds__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS listing__ds__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS listing__ds__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS listing__ds__year - , listings_latest_src_10004.created_at AS listing__created_at - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS listing__created_at__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS listing__created_at__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS listing__created_at__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS listing__created_at__year - , listings_latest_src_10004.country AS listing__country_latest - , listings_latest_src_10004.is_lux AS listing__is_lux_latest - , listings_latest_src_10004.capacity AS listing__capacity_latest - , listings_latest_src_10004.listing_id AS listing - , listings_latest_src_10004.user_id AS user - , listings_latest_src_10004.user_id AS listing__user - FROM ***************************.dim_listings_latest listings_latest_src_10004 + , listings_latest_src_10005.capacity AS largest_listing + , listings_latest_src_10005.capacity AS smallest_listing + , listings_latest_src_10005.created_at AS ds + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS ds__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS ds__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS ds__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS ds__year + , listings_latest_src_10005.created_at + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS created_at__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS created_at__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS created_at__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS created_at__year + , listings_latest_src_10005.country AS country_latest + , listings_latest_src_10005.is_lux AS is_lux_latest + , listings_latest_src_10005.capacity AS capacity_latest + , listings_latest_src_10005.created_at AS listing__ds + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS listing__ds__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS listing__ds__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS listing__ds__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS listing__ds__year + , listings_latest_src_10005.created_at AS listing__created_at + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS listing__created_at__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS listing__created_at__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS listing__created_at__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS listing__created_at__year + , listings_latest_src_10005.country AS listing__country_latest + , listings_latest_src_10005.is_lux AS listing__is_lux_latest + , listings_latest_src_10005.capacity AS listing__capacity_latest + , listings_latest_src_10005.listing_id AS listing + , listings_latest_src_10005.user_id AS user + , listings_latest_src_10005.user_id AS listing__user + FROM ***************************.dim_listings_latest listings_latest_src_10005 ) subq_3 ) subq_4 ) subq_5 @@ -316,35 +316,35 @@ FROM ( -- Read Elements From Data Source 'views_source' SELECT 1 AS views - , views_source_src_10009.ds - , DATE_TRUNC('week', views_source_src_10009.ds) AS ds__week - , DATE_TRUNC('month', views_source_src_10009.ds) AS ds__month - , DATE_TRUNC('quarter', views_source_src_10009.ds) AS ds__quarter - , DATE_TRUNC('year', views_source_src_10009.ds) AS ds__year - , views_source_src_10009.ds_partitioned - , DATE_TRUNC('week', views_source_src_10009.ds_partitioned) AS ds_partitioned__week - , DATE_TRUNC('month', views_source_src_10009.ds_partitioned) AS ds_partitioned__month - , DATE_TRUNC('quarter', views_source_src_10009.ds_partitioned) AS ds_partitioned__quarter - , DATE_TRUNC('year', views_source_src_10009.ds_partitioned) AS ds_partitioned__year - , views_source_src_10009.ds AS create_a_cycle_in_the_join_graph__ds - , DATE_TRUNC('week', views_source_src_10009.ds) AS create_a_cycle_in_the_join_graph__ds__week - , DATE_TRUNC('month', views_source_src_10009.ds) AS create_a_cycle_in_the_join_graph__ds__month - , DATE_TRUNC('quarter', views_source_src_10009.ds) AS create_a_cycle_in_the_join_graph__ds__quarter - , DATE_TRUNC('year', views_source_src_10009.ds) AS create_a_cycle_in_the_join_graph__ds__year - , views_source_src_10009.ds_partitioned AS create_a_cycle_in_the_join_graph__ds_partitioned - , DATE_TRUNC('week', views_source_src_10009.ds_partitioned) AS create_a_cycle_in_the_join_graph__ds_partitioned__week - , DATE_TRUNC('month', views_source_src_10009.ds_partitioned) AS create_a_cycle_in_the_join_graph__ds_partitioned__month - , DATE_TRUNC('quarter', views_source_src_10009.ds_partitioned) AS create_a_cycle_in_the_join_graph__ds_partitioned__quarter - , DATE_TRUNC('year', views_source_src_10009.ds_partitioned) AS create_a_cycle_in_the_join_graph__ds_partitioned__year - , views_source_src_10009.listing_id AS listing - , views_source_src_10009.user_id AS user - , views_source_src_10009.user_id AS create_a_cycle_in_the_join_graph - , views_source_src_10009.listing_id AS create_a_cycle_in_the_join_graph__listing - , views_source_src_10009.user_id AS create_a_cycle_in_the_join_graph__user + , views_source_src_10010.ds + , DATE_TRUNC('week', views_source_src_10010.ds) AS ds__week + , DATE_TRUNC('month', views_source_src_10010.ds) AS ds__month + , DATE_TRUNC('quarter', views_source_src_10010.ds) AS ds__quarter + , DATE_TRUNC('year', views_source_src_10010.ds) AS ds__year + , views_source_src_10010.ds_partitioned + , DATE_TRUNC('week', views_source_src_10010.ds_partitioned) AS ds_partitioned__week + , DATE_TRUNC('month', views_source_src_10010.ds_partitioned) AS ds_partitioned__month + , DATE_TRUNC('quarter', views_source_src_10010.ds_partitioned) AS ds_partitioned__quarter + , DATE_TRUNC('year', views_source_src_10010.ds_partitioned) AS ds_partitioned__year + , views_source_src_10010.ds AS create_a_cycle_in_the_join_graph__ds + , DATE_TRUNC('week', views_source_src_10010.ds) AS create_a_cycle_in_the_join_graph__ds__week + , DATE_TRUNC('month', views_source_src_10010.ds) AS create_a_cycle_in_the_join_graph__ds__month + , DATE_TRUNC('quarter', views_source_src_10010.ds) AS create_a_cycle_in_the_join_graph__ds__quarter + , DATE_TRUNC('year', views_source_src_10010.ds) AS create_a_cycle_in_the_join_graph__ds__year + , views_source_src_10010.ds_partitioned AS create_a_cycle_in_the_join_graph__ds_partitioned + , DATE_TRUNC('week', views_source_src_10010.ds_partitioned) AS create_a_cycle_in_the_join_graph__ds_partitioned__week + , DATE_TRUNC('month', views_source_src_10010.ds_partitioned) AS create_a_cycle_in_the_join_graph__ds_partitioned__month + , DATE_TRUNC('quarter', views_source_src_10010.ds_partitioned) AS create_a_cycle_in_the_join_graph__ds_partitioned__quarter + , DATE_TRUNC('year', views_source_src_10010.ds_partitioned) AS create_a_cycle_in_the_join_graph__ds_partitioned__year + , views_source_src_10010.listing_id AS listing + , views_source_src_10010.user_id AS user + , views_source_src_10010.user_id AS create_a_cycle_in_the_join_graph + , views_source_src_10010.listing_id AS create_a_cycle_in_the_join_graph__listing + , views_source_src_10010.user_id AS create_a_cycle_in_the_join_graph__user FROM ( -- User Defined SQL Query SELECT user_id, listing_id, ds, ds_partitioned FROM ***************************.fct_views - ) views_source_src_10009 + ) views_source_src_10010 ) subq_9 ) subq_10 ) subq_11 @@ -398,38 +398,38 @@ FROM ( -- Read Elements From Data Source 'listings_latest' SELECT 1 AS listings - , listings_latest_src_10004.capacity AS largest_listing - , listings_latest_src_10004.capacity AS smallest_listing - , listings_latest_src_10004.created_at AS ds - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS ds__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS ds__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS ds__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS ds__year - , listings_latest_src_10004.created_at - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS created_at__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS created_at__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS created_at__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS created_at__year - , listings_latest_src_10004.country AS country_latest - , listings_latest_src_10004.is_lux AS is_lux_latest - , listings_latest_src_10004.capacity AS capacity_latest - , listings_latest_src_10004.created_at AS listing__ds - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS listing__ds__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS listing__ds__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS listing__ds__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS listing__ds__year - , listings_latest_src_10004.created_at AS listing__created_at - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS listing__created_at__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS listing__created_at__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS listing__created_at__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS listing__created_at__year - , listings_latest_src_10004.country AS listing__country_latest - , listings_latest_src_10004.is_lux AS listing__is_lux_latest - , listings_latest_src_10004.capacity AS listing__capacity_latest - , listings_latest_src_10004.listing_id AS listing - , listings_latest_src_10004.user_id AS user - , listings_latest_src_10004.user_id AS listing__user - FROM ***************************.dim_listings_latest listings_latest_src_10004 + , listings_latest_src_10005.capacity AS largest_listing + , listings_latest_src_10005.capacity AS smallest_listing + , listings_latest_src_10005.created_at AS ds + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS ds__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS ds__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS ds__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS ds__year + , listings_latest_src_10005.created_at + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS created_at__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS created_at__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS created_at__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS created_at__year + , listings_latest_src_10005.country AS country_latest + , listings_latest_src_10005.is_lux AS is_lux_latest + , listings_latest_src_10005.capacity AS capacity_latest + , listings_latest_src_10005.created_at AS listing__ds + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS listing__ds__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS listing__ds__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS listing__ds__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS listing__ds__year + , listings_latest_src_10005.created_at AS listing__created_at + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS listing__created_at__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS listing__created_at__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS listing__created_at__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS listing__created_at__year + , listings_latest_src_10005.country AS listing__country_latest + , listings_latest_src_10005.is_lux AS listing__is_lux_latest + , listings_latest_src_10005.capacity AS listing__capacity_latest + , listings_latest_src_10005.listing_id AS listing + , listings_latest_src_10005.user_id AS user + , listings_latest_src_10005.user_id AS listing__user + FROM ***************************.dim_listings_latest listings_latest_src_10005 ) subq_12 ) subq_13 ) subq_14 diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node_ratio_from_multiple_data_sources__plan0_optimized.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node_ratio_from_multiple_data_sources__plan0_optimized.sql index 53f8e603a3..6d06121457 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node_ratio_from_multiple_data_sources__plan0_optimized.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node_ratio_from_multiple_data_sources__plan0_optimized.sql @@ -13,7 +13,7 @@ FROM ( -- Aggregate Measures SELECT subq_22.ds AS ds - , listings_latest_src_10004.country AS listing__country_latest + , listings_latest_src_10005.country AS listing__country_latest , SUM(subq_22.bookings) AS bookings FROM ( -- Read Elements From Data Source 'bookings_source' @@ -30,12 +30,12 @@ FROM ( ) bookings_source_src_10001 ) subq_22 LEFT OUTER JOIN - ***************************.dim_listings_latest listings_latest_src_10004 + ***************************.dim_listings_latest listings_latest_src_10005 ON - subq_22.listing = listings_latest_src_10004.listing_id + subq_22.listing = listings_latest_src_10005.listing_id GROUP BY subq_22.ds - , listings_latest_src_10004.country + , listings_latest_src_10005.country ) subq_28 INNER JOIN ( -- Join Standard Outputs @@ -44,7 +44,7 @@ INNER JOIN ( -- Aggregate Measures SELECT subq_31.ds AS ds - , listings_latest_src_10004.country AS listing__country_latest + , listings_latest_src_10005.country AS listing__country_latest , SUM(subq_31.views) AS views FROM ( -- Read Elements From Data Source 'views_source' @@ -58,15 +58,15 @@ INNER JOIN ( FROM ( -- User Defined SQL Query SELECT user_id, listing_id, ds, ds_partitioned FROM ***************************.fct_views - ) views_source_src_10009 + ) views_source_src_10010 ) subq_31 LEFT OUTER JOIN - ***************************.dim_listings_latest listings_latest_src_10004 + ***************************.dim_listings_latest listings_latest_src_10005 ON - subq_31.listing = listings_latest_src_10004.listing_id + subq_31.listing = listings_latest_src_10005.listing_id GROUP BY subq_31.ds - , listings_latest_src_10004.country + , listings_latest_src_10005.country ) subq_37 ON ( diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node_ratio_from_single_data_source__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node_ratio_from_single_data_source__plan0.sql index 0e6e9a83b8..09f55724b6 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node_ratio_from_single_data_source__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node_ratio_from_single_data_source__plan0.sql @@ -91,38 +91,38 @@ FROM ( -- Read Elements From Data Source 'listings_latest' SELECT 1 AS listings - , listings_latest_src_10004.capacity AS largest_listing - , listings_latest_src_10004.capacity AS smallest_listing - , listings_latest_src_10004.created_at AS ds - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS ds__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS ds__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS ds__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS ds__year - , listings_latest_src_10004.created_at - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS created_at__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS created_at__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS created_at__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS created_at__year - , listings_latest_src_10004.country AS country_latest - , listings_latest_src_10004.is_lux AS is_lux_latest - , listings_latest_src_10004.capacity AS capacity_latest - , listings_latest_src_10004.created_at AS listing__ds - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS listing__ds__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS listing__ds__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS listing__ds__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS listing__ds__year - , listings_latest_src_10004.created_at AS listing__created_at - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS listing__created_at__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS listing__created_at__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS listing__created_at__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS listing__created_at__year - , listings_latest_src_10004.country AS listing__country_latest - , listings_latest_src_10004.is_lux AS listing__is_lux_latest - , listings_latest_src_10004.capacity AS listing__capacity_latest - , listings_latest_src_10004.listing_id AS listing - , listings_latest_src_10004.user_id AS user - , listings_latest_src_10004.user_id AS listing__user - FROM ***************************.dim_listings_latest listings_latest_src_10004 + , listings_latest_src_10005.capacity AS largest_listing + , listings_latest_src_10005.capacity AS smallest_listing + , listings_latest_src_10005.created_at AS ds + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS ds__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS ds__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS ds__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS ds__year + , listings_latest_src_10005.created_at + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS created_at__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS created_at__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS created_at__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS created_at__year + , listings_latest_src_10005.country AS country_latest + , listings_latest_src_10005.is_lux AS is_lux_latest + , listings_latest_src_10005.capacity AS capacity_latest + , listings_latest_src_10005.created_at AS listing__ds + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS listing__ds__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS listing__ds__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS listing__ds__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS listing__ds__year + , listings_latest_src_10005.created_at AS listing__created_at + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS listing__created_at__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS listing__created_at__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS listing__created_at__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS listing__created_at__year + , listings_latest_src_10005.country AS listing__country_latest + , listings_latest_src_10005.is_lux AS listing__is_lux_latest + , listings_latest_src_10005.capacity AS listing__capacity_latest + , listings_latest_src_10005.listing_id AS listing + , listings_latest_src_10005.user_id AS user + , listings_latest_src_10005.user_id AS listing__user + FROM ***************************.dim_listings_latest listings_latest_src_10005 ) subq_2 ) subq_3 ON diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node_ratio_from_single_data_source__plan0_optimized.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node_ratio_from_single_data_source__plan0_optimized.sql index d4ff05fa1c..f2dded656b 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node_ratio_from_single_data_source__plan0_optimized.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node_ratio_from_single_data_source__plan0_optimized.sql @@ -8,7 +8,7 @@ FROM ( -- Aggregate Measures SELECT subq_7.listing AS listing - , listings_latest_src_10004.country AS listing__country_latest + , listings_latest_src_10005.country AS listing__country_latest , SUM(subq_7.bookings) AS bookings , COUNT(DISTINCT subq_7.bookers) AS bookers FROM ( @@ -25,10 +25,10 @@ FROM ( ) bookings_source_src_10001 ) subq_7 LEFT OUTER JOIN - ***************************.dim_listings_latest listings_latest_src_10004 + ***************************.dim_listings_latest listings_latest_src_10005 ON - subq_7.listing = listings_latest_src_10004.listing_id + subq_7.listing = listings_latest_src_10005.listing_id GROUP BY subq_7.listing - , listings_latest_src_10004.country + , listings_latest_src_10005.country ) subq_11 diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node_simple_expr__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node_simple_expr__plan0.sql index 42f0c6c580..6314a60e5f 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node_simple_expr__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node_simple_expr__plan0.sql @@ -88,38 +88,38 @@ FROM ( -- Read Elements From Data Source 'listings_latest' SELECT 1 AS listings - , listings_latest_src_10004.capacity AS largest_listing - , listings_latest_src_10004.capacity AS smallest_listing - , listings_latest_src_10004.created_at AS ds - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS ds__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS ds__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS ds__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS ds__year - , listings_latest_src_10004.created_at - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS created_at__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS created_at__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS created_at__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS created_at__year - , listings_latest_src_10004.country AS country_latest - , listings_latest_src_10004.is_lux AS is_lux_latest - , listings_latest_src_10004.capacity AS capacity_latest - , listings_latest_src_10004.created_at AS listing__ds - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS listing__ds__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS listing__ds__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS listing__ds__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS listing__ds__year - , listings_latest_src_10004.created_at AS listing__created_at - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS listing__created_at__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS listing__created_at__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS listing__created_at__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS listing__created_at__year - , listings_latest_src_10004.country AS listing__country_latest - , listings_latest_src_10004.is_lux AS listing__is_lux_latest - , listings_latest_src_10004.capacity AS listing__capacity_latest - , listings_latest_src_10004.listing_id AS listing - , listings_latest_src_10004.user_id AS user - , listings_latest_src_10004.user_id AS listing__user - FROM ***************************.dim_listings_latest listings_latest_src_10004 + , listings_latest_src_10005.capacity AS largest_listing + , listings_latest_src_10005.capacity AS smallest_listing + , listings_latest_src_10005.created_at AS ds + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS ds__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS ds__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS ds__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS ds__year + , listings_latest_src_10005.created_at + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS created_at__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS created_at__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS created_at__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS created_at__year + , listings_latest_src_10005.country AS country_latest + , listings_latest_src_10005.is_lux AS is_lux_latest + , listings_latest_src_10005.capacity AS capacity_latest + , listings_latest_src_10005.created_at AS listing__ds + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS listing__ds__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS listing__ds__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS listing__ds__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS listing__ds__year + , listings_latest_src_10005.created_at AS listing__created_at + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS listing__created_at__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS listing__created_at__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS listing__created_at__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS listing__created_at__year + , listings_latest_src_10005.country AS listing__country_latest + , listings_latest_src_10005.is_lux AS listing__is_lux_latest + , listings_latest_src_10005.capacity AS listing__capacity_latest + , listings_latest_src_10005.listing_id AS listing + , listings_latest_src_10005.user_id AS user + , listings_latest_src_10005.user_id AS listing__user + FROM ***************************.dim_listings_latest listings_latest_src_10005 ) subq_2 ) subq_3 ON diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node_simple_expr__plan0_optimized.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node_simple_expr__plan0_optimized.sql index cbc93f25c5..be8c4f681b 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node_simple_expr__plan0_optimized.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_compute_metrics_node_simple_expr__plan0_optimized.sql @@ -8,17 +8,17 @@ FROM ( -- Aggregate Measures SELECT bookings_source_src_10001.listing_id AS listing - , listings_latest_src_10004.country AS listing__country_latest + , listings_latest_src_10005.country AS listing__country_latest , SUM(bookings_source_src_10001.booking_value) AS booking_value FROM ( -- User Defined SQL Query SELECT * FROM ***************************.fct_bookings ) bookings_source_src_10001 LEFT OUTER JOIN - ***************************.dim_listings_latest listings_latest_src_10004 + ***************************.dim_listings_latest listings_latest_src_10005 ON - bookings_source_src_10001.listing_id = listings_latest_src_10004.listing_id + bookings_source_src_10001.listing_id = listings_latest_src_10005.listing_id GROUP BY bookings_source_src_10001.listing_id - , listings_latest_src_10004.country + , listings_latest_src_10005.country ) subq_11 diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric__plan0.sql index c9adb7c74a..645ab1ef7a 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric__plan0.sql @@ -31,17 +31,17 @@ FROM ( FROM ( -- Read Elements From Data Source 'revenue' SELECT - revenue_src_10006.revenue AS txn_revenue - , revenue_src_10006.created_at AS ds - , DATE_TRUNC('week', revenue_src_10006.created_at) AS ds__week - , DATE_TRUNC('month', revenue_src_10006.created_at) AS ds__month - , DATE_TRUNC('quarter', revenue_src_10006.created_at) AS ds__quarter - , DATE_TRUNC('year', revenue_src_10006.created_at) AS ds__year - , revenue_src_10006.user_id AS user + revenue_src_10007.revenue AS txn_revenue + , revenue_src_10007.created_at AS ds + , DATE_TRUNC('week', revenue_src_10007.created_at) AS ds__week + , DATE_TRUNC('month', revenue_src_10007.created_at) AS ds__month + , DATE_TRUNC('quarter', revenue_src_10007.created_at) AS ds__quarter + , DATE_TRUNC('year', revenue_src_10007.created_at) AS ds__year + , revenue_src_10007.user_id AS user FROM ( -- User Defined SQL Query SELECT * FROM ***************************.fct_revenue - ) revenue_src_10006 + ) revenue_src_10007 ) subq_0 ) subq_1 ) subq_3 diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric__plan0_optimized.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric__plan0_optimized.sql index 6ce7eb9f16..9eb18c7706 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric__plan0_optimized.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric__plan0_optimized.sql @@ -10,6 +10,6 @@ SELECT FROM ( -- User Defined SQL Query SELECT * FROM ***************************.fct_revenue -) revenue_src_10006 +) revenue_src_10007 GROUP BY DATE_TRUNC('month', created_at) diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_grain_to_date__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_grain_to_date__plan0.sql index 9c5aac9f71..d56ca5db59 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_grain_to_date__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_grain_to_date__plan0.sql @@ -31,17 +31,17 @@ FROM ( FROM ( -- Read Elements From Data Source 'revenue' SELECT - revenue_src_10006.revenue AS txn_revenue - , revenue_src_10006.created_at AS ds - , DATE_TRUNC('week', revenue_src_10006.created_at) AS ds__week - , DATE_TRUNC('month', revenue_src_10006.created_at) AS ds__month - , DATE_TRUNC('quarter', revenue_src_10006.created_at) AS ds__quarter - , DATE_TRUNC('year', revenue_src_10006.created_at) AS ds__year - , revenue_src_10006.user_id AS user + revenue_src_10007.revenue AS txn_revenue + , revenue_src_10007.created_at AS ds + , DATE_TRUNC('week', revenue_src_10007.created_at) AS ds__week + , DATE_TRUNC('month', revenue_src_10007.created_at) AS ds__month + , DATE_TRUNC('quarter', revenue_src_10007.created_at) AS ds__quarter + , DATE_TRUNC('year', revenue_src_10007.created_at) AS ds__year + , revenue_src_10007.user_id AS user FROM ( -- User Defined SQL Query SELECT * FROM ***************************.fct_revenue - ) revenue_src_10006 + ) revenue_src_10007 ) subq_0 ) subq_1 ) subq_3 diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_grain_to_date__plan0_optimized.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_grain_to_date__plan0_optimized.sql index 70a814685d..73d6f53157 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_grain_to_date__plan0_optimized.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_grain_to_date__plan0_optimized.sql @@ -10,6 +10,6 @@ SELECT FROM ( -- User Defined SQL Query SELECT * FROM ***************************.fct_revenue -) revenue_src_10006 +) revenue_src_10007 GROUP BY DATE_TRUNC('month', created_at) diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_no_ds__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_no_ds__plan0.sql index 8a8b927c31..1b8e6aadb0 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_no_ds__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_no_ds__plan0.sql @@ -28,17 +28,17 @@ FROM ( FROM ( -- Read Elements From Data Source 'revenue' SELECT - revenue_src_10006.revenue AS txn_revenue - , revenue_src_10006.created_at AS ds - , DATE_TRUNC('week', revenue_src_10006.created_at) AS ds__week - , DATE_TRUNC('month', revenue_src_10006.created_at) AS ds__month - , DATE_TRUNC('quarter', revenue_src_10006.created_at) AS ds__quarter - , DATE_TRUNC('year', revenue_src_10006.created_at) AS ds__year - , revenue_src_10006.user_id AS user + revenue_src_10007.revenue AS txn_revenue + , revenue_src_10007.created_at AS ds + , DATE_TRUNC('week', revenue_src_10007.created_at) AS ds__week + , DATE_TRUNC('month', revenue_src_10007.created_at) AS ds__month + , DATE_TRUNC('quarter', revenue_src_10007.created_at) AS ds__quarter + , DATE_TRUNC('year', revenue_src_10007.created_at) AS ds__year + , revenue_src_10007.user_id AS user FROM ( -- User Defined SQL Query SELECT * FROM ***************************.fct_revenue - ) revenue_src_10006 + ) revenue_src_10007 ) subq_0 ) subq_1 ) subq_3 diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_no_ds__plan0_optimized.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_no_ds__plan0_optimized.sql index a852f552b0..9e3110067e 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_no_ds__plan0_optimized.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_no_ds__plan0_optimized.sql @@ -9,4 +9,4 @@ SELECT FROM ( -- User Defined SQL Query SELECT * FROM ***************************.fct_revenue -) revenue_src_10006 +) revenue_src_10007 diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_no_window__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_no_window__plan0.sql index e460bce945..87e138974d 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_no_window__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_no_window__plan0.sql @@ -31,17 +31,17 @@ FROM ( FROM ( -- Read Elements From Data Source 'revenue' SELECT - revenue_src_10006.revenue AS txn_revenue - , revenue_src_10006.created_at AS ds - , DATE_TRUNC('week', revenue_src_10006.created_at) AS ds__week - , DATE_TRUNC('month', revenue_src_10006.created_at) AS ds__month - , DATE_TRUNC('quarter', revenue_src_10006.created_at) AS ds__quarter - , DATE_TRUNC('year', revenue_src_10006.created_at) AS ds__year - , revenue_src_10006.user_id AS user + revenue_src_10007.revenue AS txn_revenue + , revenue_src_10007.created_at AS ds + , DATE_TRUNC('week', revenue_src_10007.created_at) AS ds__week + , DATE_TRUNC('month', revenue_src_10007.created_at) AS ds__month + , DATE_TRUNC('quarter', revenue_src_10007.created_at) AS ds__quarter + , DATE_TRUNC('year', revenue_src_10007.created_at) AS ds__year + , revenue_src_10007.user_id AS user FROM ( -- User Defined SQL Query SELECT * FROM ***************************.fct_revenue - ) revenue_src_10006 + ) revenue_src_10007 ) subq_0 ) subq_1 ) subq_3 diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_no_window__plan0_optimized.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_no_window__plan0_optimized.sql index 870ee251a6..b1dd9cac86 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_no_window__plan0_optimized.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_no_window__plan0_optimized.sql @@ -10,6 +10,6 @@ SELECT FROM ( -- User Defined SQL Query SELECT * FROM ***************************.fct_revenue -) revenue_src_10006 +) revenue_src_10007 GROUP BY DATE_TRUNC('month', created_at) diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_no_window_with_time_constraint__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_no_window_with_time_constraint__plan0.sql index 72136f3a44..7cc39c259f 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_no_window_with_time_constraint__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_no_window_with_time_constraint__plan0.sql @@ -46,17 +46,17 @@ FROM ( FROM ( -- Read Elements From Data Source 'revenue' SELECT - revenue_src_10006.revenue AS txn_revenue - , revenue_src_10006.created_at AS ds - , DATE_TRUNC('week', revenue_src_10006.created_at) AS ds__week - , DATE_TRUNC('month', revenue_src_10006.created_at) AS ds__month - , DATE_TRUNC('quarter', revenue_src_10006.created_at) AS ds__quarter - , DATE_TRUNC('year', revenue_src_10006.created_at) AS ds__year - , revenue_src_10006.user_id AS user + revenue_src_10007.revenue AS txn_revenue + , revenue_src_10007.created_at AS ds + , DATE_TRUNC('week', revenue_src_10007.created_at) AS ds__week + , DATE_TRUNC('month', revenue_src_10007.created_at) AS ds__month + , DATE_TRUNC('quarter', revenue_src_10007.created_at) AS ds__quarter + , DATE_TRUNC('year', revenue_src_10007.created_at) AS ds__year + , revenue_src_10007.user_id AS user FROM ( -- User Defined SQL Query SELECT * FROM ***************************.fct_revenue - ) revenue_src_10006 + ) revenue_src_10007 ) subq_0 ) subq_1 WHERE subq_1.metric_time BETWEEN CAST('2000-01-01' AS TIMESTAMP) AND CAST('2020-01-01' AS TIMESTAMP) diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql index 53bd8842bd..7ca3598979 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql @@ -11,7 +11,7 @@ SELECT FROM ( -- User Defined SQL Query SELECT * FROM ***************************.fct_revenue -) revenue_src_10006 +) revenue_src_10007 WHERE created_at BETWEEN CAST('2000-01-01' AS TIMESTAMP) AND CAST('2020-01-01' AS TIMESTAMP) GROUP BY DATE_TRUNC('month', created_at) diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_with_time_constraint__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_with_time_constraint__plan0.sql index fa6672724b..8e7bbd8c93 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_with_time_constraint__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_with_time_constraint__plan0.sql @@ -46,17 +46,17 @@ FROM ( FROM ( -- Read Elements From Data Source 'revenue' SELECT - revenue_src_10006.revenue AS txn_revenue - , revenue_src_10006.created_at AS ds - , DATE_TRUNC('week', revenue_src_10006.created_at) AS ds__week - , DATE_TRUNC('month', revenue_src_10006.created_at) AS ds__month - , DATE_TRUNC('quarter', revenue_src_10006.created_at) AS ds__quarter - , DATE_TRUNC('year', revenue_src_10006.created_at) AS ds__year - , revenue_src_10006.user_id AS user + revenue_src_10007.revenue AS txn_revenue + , revenue_src_10007.created_at AS ds + , DATE_TRUNC('week', revenue_src_10007.created_at) AS ds__week + , DATE_TRUNC('month', revenue_src_10007.created_at) AS ds__month + , DATE_TRUNC('quarter', revenue_src_10007.created_at) AS ds__quarter + , DATE_TRUNC('year', revenue_src_10007.created_at) AS ds__year + , revenue_src_10007.user_id AS user FROM ( -- User Defined SQL Query SELECT * FROM ***************************.fct_revenue - ) revenue_src_10006 + ) revenue_src_10007 ) subq_0 ) subq_1 WHERE subq_1.metric_time BETWEEN CAST('2019-12-01' AS TIMESTAMP) AND CAST('2020-01-01' AS TIMESTAMP) diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_with_time_constraint__plan0_optimized.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_with_time_constraint__plan0_optimized.sql index 5e6e5237f3..3769f1c4fe 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_with_time_constraint__plan0_optimized.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_cumulative_metric_with_time_constraint__plan0_optimized.sql @@ -11,7 +11,7 @@ SELECT FROM ( -- User Defined SQL Query SELECT * FROM ***************************.fct_revenue -) revenue_src_10006 +) revenue_src_10007 WHERE created_at BETWEEN CAST('2019-12-01' AS TIMESTAMP) AND CAST('2020-01-01' AS TIMESTAMP) GROUP BY DATE_TRUNC('month', created_at) diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_distinct_values__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_distinct_values__plan0.sql index 462e53bef5..9626bad99c 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_distinct_values__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_distinct_values__plan0.sql @@ -197,38 +197,38 @@ FROM ( -- Read Elements From Data Source 'listings_latest' SELECT 1 AS listings - , listings_latest_src_10004.capacity AS largest_listing - , listings_latest_src_10004.capacity AS smallest_listing - , listings_latest_src_10004.created_at AS ds - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS ds__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS ds__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS ds__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS ds__year - , listings_latest_src_10004.created_at - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS created_at__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS created_at__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS created_at__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS created_at__year - , listings_latest_src_10004.country AS country_latest - , listings_latest_src_10004.is_lux AS is_lux_latest - , listings_latest_src_10004.capacity AS capacity_latest - , listings_latest_src_10004.created_at AS listing__ds - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS listing__ds__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS listing__ds__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS listing__ds__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS listing__ds__year - , listings_latest_src_10004.created_at AS listing__created_at - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS listing__created_at__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS listing__created_at__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS listing__created_at__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS listing__created_at__year - , listings_latest_src_10004.country AS listing__country_latest - , listings_latest_src_10004.is_lux AS listing__is_lux_latest - , listings_latest_src_10004.capacity AS listing__capacity_latest - , listings_latest_src_10004.listing_id AS listing - , listings_latest_src_10004.user_id AS user - , listings_latest_src_10004.user_id AS listing__user - FROM ***************************.dim_listings_latest listings_latest_src_10004 + , listings_latest_src_10005.capacity AS largest_listing + , listings_latest_src_10005.capacity AS smallest_listing + , listings_latest_src_10005.created_at AS ds + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS ds__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS ds__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS ds__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS ds__year + , listings_latest_src_10005.created_at + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS created_at__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS created_at__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS created_at__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS created_at__year + , listings_latest_src_10005.country AS country_latest + , listings_latest_src_10005.is_lux AS is_lux_latest + , listings_latest_src_10005.capacity AS capacity_latest + , listings_latest_src_10005.created_at AS listing__ds + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS listing__ds__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS listing__ds__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS listing__ds__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS listing__ds__year + , listings_latest_src_10005.created_at AS listing__created_at + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS listing__created_at__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS listing__created_at__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS listing__created_at__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS listing__created_at__year + , listings_latest_src_10005.country AS listing__country_latest + , listings_latest_src_10005.is_lux AS listing__is_lux_latest + , listings_latest_src_10005.capacity AS listing__capacity_latest + , listings_latest_src_10005.listing_id AS listing + , listings_latest_src_10005.user_id AS user + , listings_latest_src_10005.user_id AS listing__user + FROM ***************************.dim_listings_latest listings_latest_src_10005 ) subq_3 ) subq_4 ) subq_5 diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_distinct_values__plan0_optimized.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_distinct_values__plan0_optimized.sql index c479c10486..c2ffa7198c 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_distinct_values__plan0_optimized.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_distinct_values__plan0_optimized.sql @@ -7,16 +7,16 @@ -- ['listing__country_latest'] -- Order By ['listing__country_latest'] Limit 100 SELECT - listings_latest_src_10004.country AS listing__country_latest + listings_latest_src_10005.country AS listing__country_latest FROM ( -- User Defined SQL Query SELECT * FROM ***************************.fct_bookings ) bookings_source_src_10001 LEFT OUTER JOIN - ***************************.dim_listings_latest listings_latest_src_10004 + ***************************.dim_listings_latest listings_latest_src_10005 ON - bookings_source_src_10001.listing_id = listings_latest_src_10004.listing_id + bookings_source_src_10001.listing_id = listings_latest_src_10005.listing_id GROUP BY - listings_latest_src_10004.country + listings_latest_src_10005.country ORDER BY listing__country_latest LIMIT 100 diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_filter_with_where_constraint_on_join_dim__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_filter_with_where_constraint_on_join_dim__plan0.sql index 0e88ef0ddc..2050c90afe 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_filter_with_where_constraint_on_join_dim__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_filter_with_where_constraint_on_join_dim__plan0.sql @@ -203,38 +203,38 @@ FROM ( -- Read Elements From Data Source 'listings_latest' SELECT 1 AS listings - , listings_latest_src_10004.capacity AS largest_listing - , listings_latest_src_10004.capacity AS smallest_listing - , listings_latest_src_10004.created_at AS ds - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS ds__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS ds__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS ds__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS ds__year - , listings_latest_src_10004.created_at - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS created_at__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS created_at__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS created_at__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS created_at__year - , listings_latest_src_10004.country AS country_latest - , listings_latest_src_10004.is_lux AS is_lux_latest - , listings_latest_src_10004.capacity AS capacity_latest - , listings_latest_src_10004.created_at AS listing__ds - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS listing__ds__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS listing__ds__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS listing__ds__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS listing__ds__year - , listings_latest_src_10004.created_at AS listing__created_at - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS listing__created_at__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS listing__created_at__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS listing__created_at__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS listing__created_at__year - , listings_latest_src_10004.country AS listing__country_latest - , listings_latest_src_10004.is_lux AS listing__is_lux_latest - , listings_latest_src_10004.capacity AS listing__capacity_latest - , listings_latest_src_10004.listing_id AS listing - , listings_latest_src_10004.user_id AS user - , listings_latest_src_10004.user_id AS listing__user - FROM ***************************.dim_listings_latest listings_latest_src_10004 + , listings_latest_src_10005.capacity AS largest_listing + , listings_latest_src_10005.capacity AS smallest_listing + , listings_latest_src_10005.created_at AS ds + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS ds__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS ds__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS ds__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS ds__year + , listings_latest_src_10005.created_at + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS created_at__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS created_at__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS created_at__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS created_at__year + , listings_latest_src_10005.country AS country_latest + , listings_latest_src_10005.is_lux AS is_lux_latest + , listings_latest_src_10005.capacity AS capacity_latest + , listings_latest_src_10005.created_at AS listing__ds + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS listing__ds__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS listing__ds__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS listing__ds__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS listing__ds__year + , listings_latest_src_10005.created_at AS listing__created_at + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS listing__created_at__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS listing__created_at__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS listing__created_at__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS listing__created_at__year + , listings_latest_src_10005.country AS listing__country_latest + , listings_latest_src_10005.is_lux AS listing__is_lux_latest + , listings_latest_src_10005.capacity AS listing__capacity_latest + , listings_latest_src_10005.listing_id AS listing + , listings_latest_src_10005.user_id AS user + , listings_latest_src_10005.user_id AS listing__user + FROM ***************************.dim_listings_latest listings_latest_src_10005 ) subq_3 ) subq_4 ) subq_5 diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql index c5a1407424..40d9edad54 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql @@ -12,7 +12,7 @@ FROM ( -- ['bookings', 'is_instant', 'listing__country_latest'] SELECT subq_13.is_instant AS is_instant - , listings_latest_src_10004.country AS listing__country_latest + , listings_latest_src_10005.country AS listing__country_latest , subq_13.bookings AS bookings FROM ( -- Read Elements From Data Source 'bookings_source' @@ -29,9 +29,9 @@ FROM ( ) bookings_source_src_10001 ) subq_13 LEFT OUTER JOIN - ***************************.dim_listings_latest listings_latest_src_10004 + ***************************.dim_listings_latest listings_latest_src_10005 ON - subq_13.listing = listings_latest_src_10004.listing_id + subq_13.listing = listings_latest_src_10005.listing_id ) subq_18 WHERE listing__country_latest = 'us' GROUP BY diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_join_conversion_events_node__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_join_conversion_events_node__plan0.sql new file mode 100644 index 0000000000..a36b5a2394 --- /dev/null +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_join_conversion_events_node__plan0.sql @@ -0,0 +1,83 @@ +-- Find conversions for IdentifierSpec(element_name='user', identifier_links=()) within the range of 7 day +SELECT + subq_3.ds + , subq_3.ds__week + , subq_3.ds__month + , subq_3.ds__quarter + , subq_3.ds__year + , subq_3.user + , subq_3.referrer_id + , subq_3.buys + , subq_3.visits + , subq_3.visitors +FROM ( + -- Dedupe the fanout on (MetadataSpec(element_name='mf_internal_uuid'),) in the conversion data set + SELECT DISTINCT + first_value(subq_0.visits) OVER (PARTITION BY subq_2.user, subq_2.ds ORDER BY subq_0.ds DESC) AS visits + , first_value(subq_0.visitors) OVER (PARTITION BY subq_2.user, subq_2.ds ORDER BY subq_0.ds DESC) AS visitors + , first_value(subq_0.referrer_id) OVER (PARTITION BY subq_2.user, subq_2.ds ORDER BY subq_0.ds DESC) AS referrer_id + , first_value(subq_0.ds) OVER (PARTITION BY subq_2.user, subq_2.ds ORDER BY subq_0.ds DESC) AS ds + , first_value(subq_0.ds__week) OVER (PARTITION BY subq_2.user, subq_2.ds ORDER BY subq_0.ds DESC) AS ds__week + , first_value(subq_0.ds__month) OVER (PARTITION BY subq_2.user, subq_2.ds ORDER BY subq_0.ds DESC) AS ds__month + , first_value(subq_0.ds__quarter) OVER (PARTITION BY subq_2.user, subq_2.ds ORDER BY subq_0.ds DESC) AS ds__quarter + , first_value(subq_0.ds__year) OVER (PARTITION BY subq_2.user, subq_2.ds ORDER BY subq_0.ds DESC) AS ds__year + , first_value(subq_0.user) OVER (PARTITION BY subq_2.user, subq_2.ds ORDER BY subq_0.ds DESC) AS user + , subq_2.mf_internal_uuid AS mf_internal_uuid + , subq_2.buys AS buys + FROM ( + -- Read Elements From Data Source 'visits_source' + SELECT + 1 AS visits + , visits_source_src_10011.user_id AS visitors + , visits_source_src_10011.ds + , DATE_TRUNC('week', visits_source_src_10011.ds) AS ds__week + , DATE_TRUNC('month', visits_source_src_10011.ds) AS ds__month + , DATE_TRUNC('quarter', visits_source_src_10011.ds) AS ds__quarter + , DATE_TRUNC('year', visits_source_src_10011.ds) AS ds__year + , visits_source_src_10011.referrer_id + , visits_source_src_10011.user_id AS user + FROM ( + -- User Defined SQL Query + SELECT * FROM ***************************.fct_visits + ) visits_source_src_10011 + ) subq_0 + INNER JOIN ( + -- Add column with generated UUID + SELECT + subq_1.ds + , subq_1.ds__week + , subq_1.ds__month + , subq_1.ds__quarter + , subq_1.ds__year + , subq_1.user + , subq_1.buys + , subq_1.buyers + , GEN_RANDOM_UUID() AS mf_internal_uuid + FROM ( + -- Read Elements From Data Source 'buys_source' + SELECT + 1 AS buys + , buys_source_src_10002.user_id AS buyers + , buys_source_src_10002.ds + , DATE_TRUNC('week', buys_source_src_10002.ds) AS ds__week + , DATE_TRUNC('month', buys_source_src_10002.ds) AS ds__month + , DATE_TRUNC('quarter', buys_source_src_10002.ds) AS ds__quarter + , DATE_TRUNC('year', buys_source_src_10002.ds) AS ds__year + , buys_source_src_10002.user_id AS user + FROM ( + -- User Defined SQL Query + SELECT * FROM ***************************.fct_buys + ) buys_source_src_10002 + ) subq_1 + ) subq_2 + ON + ( + subq_0.user = subq_2.user + ) AND ( + ( + subq_0.ds <= subq_2.ds + ) AND ( + subq_0.ds > subq_2.ds - INTERVAL 7 day + ) + ) +) subq_3 diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_join_conversion_events_node__plan0_optimized.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_join_conversion_events_node__plan0_optimized.sql new file mode 100644 index 0000000000..28f43c0cc4 --- /dev/null +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_join_conversion_events_node__plan0_optimized.sql @@ -0,0 +1,67 @@ +-- Find conversions for IdentifierSpec(element_name='user', identifier_links=()) within the range of 7 day +SELECT + ds + , ds__week + , ds__month + , ds__quarter + , ds__year + , subq_7.user + , referrer_id + , buys + , visits + , visitors +FROM ( + -- Dedupe the fanout on (MetadataSpec(element_name='mf_internal_uuid'),) in the conversion data set + SELECT DISTINCT + first_value(subq_4.visits) OVER (PARTITION BY subq_6.user, subq_6.ds ORDER BY subq_4.ds DESC) AS visits + , first_value(subq_4.visitors) OVER (PARTITION BY subq_6.user, subq_6.ds ORDER BY subq_4.ds DESC) AS visitors + , first_value(subq_4.referrer_id) OVER (PARTITION BY subq_6.user, subq_6.ds ORDER BY subq_4.ds DESC) AS referrer_id + , first_value(subq_4.ds) OVER (PARTITION BY subq_6.user, subq_6.ds ORDER BY subq_4.ds DESC) AS ds + , first_value(subq_4.ds__week) OVER (PARTITION BY subq_6.user, subq_6.ds ORDER BY subq_4.ds DESC) AS ds__week + , first_value(subq_4.ds__month) OVER (PARTITION BY subq_6.user, subq_6.ds ORDER BY subq_4.ds DESC) AS ds__month + , first_value(subq_4.ds__quarter) OVER (PARTITION BY subq_6.user, subq_6.ds ORDER BY subq_4.ds DESC) AS ds__quarter + , first_value(subq_4.ds__year) OVER (PARTITION BY subq_6.user, subq_6.ds ORDER BY subq_4.ds DESC) AS ds__year + , first_value(subq_4.user) OVER (PARTITION BY subq_6.user, subq_6.ds ORDER BY subq_4.ds DESC) AS user + , subq_6.mf_internal_uuid AS mf_internal_uuid + , subq_6.buys AS buys + FROM ( + -- Read Elements From Data Source 'visits_source' + SELECT + 1 AS visits + , user_id AS visitors + , ds + , DATE_TRUNC('week', ds) AS ds__week + , DATE_TRUNC('month', ds) AS ds__month + , DATE_TRUNC('quarter', ds) AS ds__quarter + , DATE_TRUNC('year', ds) AS ds__year + , referrer_id + , user_id AS user + FROM ( + -- User Defined SQL Query + SELECT * FROM ***************************.fct_visits + ) visits_source_src_10011 + ) subq_4 + INNER JOIN ( + -- Read Elements From Data Source 'buys_source' + -- Add column with generated UUID + SELECT + ds + , user_id AS user + , 1 AS buys + , GEN_RANDOM_UUID() AS mf_internal_uuid + FROM ( + -- User Defined SQL Query + SELECT * FROM ***************************.fct_buys + ) buys_source_src_10002 + ) subq_6 + ON + ( + subq_4.user = subq_6.user + ) AND ( + ( + subq_4.ds <= subq_6.ds + ) AND ( + subq_4.ds > subq_6.ds - INTERVAL 7 day + ) + ) +) subq_7 diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_join_to_scd_dimension__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_join_to_scd_dimension__plan0.sql index b2b573ee8e..e4f5ea6fc5 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_join_to_scd_dimension__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_join_to_scd_dimension__plan0.sql @@ -80,31 +80,31 @@ FROM ( SELECT 1 AS bookings , CASE WHEN is_instant THEN 1 ELSE 0 END AS instant_bookings - , bookings_source_src_10018.booking_value - , bookings_source_src_10018.guest_id AS bookers - , bookings_source_src_10018.booking_value AS average_booking_value - , bookings_source_src_10018.booking_value AS booking_payments - , bookings_source_src_10018.is_instant - , bookings_source_src_10018.ds - , DATE_TRUNC('week', bookings_source_src_10018.ds) AS ds__week - , DATE_TRUNC('month', bookings_source_src_10018.ds) AS ds__month - , DATE_TRUNC('quarter', bookings_source_src_10018.ds) AS ds__quarter - , DATE_TRUNC('year', bookings_source_src_10018.ds) AS ds__year - , bookings_source_src_10018.ds_partitioned - , DATE_TRUNC('week', bookings_source_src_10018.ds_partitioned) AS ds_partitioned__week - , DATE_TRUNC('month', bookings_source_src_10018.ds_partitioned) AS ds_partitioned__month - , DATE_TRUNC('quarter', bookings_source_src_10018.ds_partitioned) AS ds_partitioned__quarter - , DATE_TRUNC('year', bookings_source_src_10018.ds_partitioned) AS ds_partitioned__year - , bookings_source_src_10018.booking_paid_at - , DATE_TRUNC('week', bookings_source_src_10018.booking_paid_at) AS booking_paid_at__week - , DATE_TRUNC('month', bookings_source_src_10018.booking_paid_at) AS booking_paid_at__month - , DATE_TRUNC('quarter', bookings_source_src_10018.booking_paid_at) AS booking_paid_at__quarter - , DATE_TRUNC('year', bookings_source_src_10018.booking_paid_at) AS booking_paid_at__year - , bookings_source_src_10018.listing_id AS listing - , bookings_source_src_10018.guest_id AS guest - , bookings_source_src_10018.host_id AS host - , bookings_source_src_10018.guest_id AS user - FROM ***************************.fct_bookings bookings_source_src_10018 + , bookings_source_src_10020.booking_value + , bookings_source_src_10020.guest_id AS bookers + , bookings_source_src_10020.booking_value AS average_booking_value + , bookings_source_src_10020.booking_value AS booking_payments + , bookings_source_src_10020.is_instant + , bookings_source_src_10020.ds + , DATE_TRUNC('week', bookings_source_src_10020.ds) AS ds__week + , DATE_TRUNC('month', bookings_source_src_10020.ds) AS ds__month + , DATE_TRUNC('quarter', bookings_source_src_10020.ds) AS ds__quarter + , DATE_TRUNC('year', bookings_source_src_10020.ds) AS ds__year + , bookings_source_src_10020.ds_partitioned + , DATE_TRUNC('week', bookings_source_src_10020.ds_partitioned) AS ds_partitioned__week + , DATE_TRUNC('month', bookings_source_src_10020.ds_partitioned) AS ds_partitioned__month + , DATE_TRUNC('quarter', bookings_source_src_10020.ds_partitioned) AS ds_partitioned__quarter + , DATE_TRUNC('year', bookings_source_src_10020.ds_partitioned) AS ds_partitioned__year + , bookings_source_src_10020.booking_paid_at + , DATE_TRUNC('week', bookings_source_src_10020.booking_paid_at) AS booking_paid_at__week + , DATE_TRUNC('month', bookings_source_src_10020.booking_paid_at) AS booking_paid_at__month + , DATE_TRUNC('quarter', bookings_source_src_10020.booking_paid_at) AS booking_paid_at__quarter + , DATE_TRUNC('year', bookings_source_src_10020.booking_paid_at) AS booking_paid_at__year + , bookings_source_src_10020.listing_id AS listing + , bookings_source_src_10020.guest_id AS guest + , bookings_source_src_10020.host_id AS host + , bookings_source_src_10020.guest_id AS user + FROM ***************************.fct_bookings bookings_source_src_10020 ) subq_0 ) subq_1 ) subq_2 @@ -119,36 +119,36 @@ FROM ( FROM ( -- Read Elements From Data Source 'listings' SELECT - listings_src_10020.active_from AS window_start - , DATE_TRUNC('week', listings_src_10020.active_from) AS window_start__week - , DATE_TRUNC('month', listings_src_10020.active_from) AS window_start__month - , DATE_TRUNC('quarter', listings_src_10020.active_from) AS window_start__quarter - , DATE_TRUNC('year', listings_src_10020.active_from) AS window_start__year - , listings_src_10020.active_to AS window_end - , DATE_TRUNC('week', listings_src_10020.active_to) AS window_end__week - , DATE_TRUNC('month', listings_src_10020.active_to) AS window_end__month - , DATE_TRUNC('quarter', listings_src_10020.active_to) AS window_end__quarter - , DATE_TRUNC('year', listings_src_10020.active_to) AS window_end__year - , listings_src_10020.country - , listings_src_10020.is_lux - , listings_src_10020.capacity - , listings_src_10020.active_from AS listing__window_start - , DATE_TRUNC('week', listings_src_10020.active_from) AS listing__window_start__week - , DATE_TRUNC('month', listings_src_10020.active_from) AS listing__window_start__month - , DATE_TRUNC('quarter', listings_src_10020.active_from) AS listing__window_start__quarter - , DATE_TRUNC('year', listings_src_10020.active_from) AS listing__window_start__year - , listings_src_10020.active_to AS listing__window_end - , DATE_TRUNC('week', listings_src_10020.active_to) AS listing__window_end__week - , DATE_TRUNC('month', listings_src_10020.active_to) AS listing__window_end__month - , DATE_TRUNC('quarter', listings_src_10020.active_to) AS listing__window_end__quarter - , DATE_TRUNC('year', listings_src_10020.active_to) AS listing__window_end__year - , listings_src_10020.country AS listing__country - , listings_src_10020.is_lux AS listing__is_lux - , listings_src_10020.capacity AS listing__capacity - , listings_src_10020.listing_id AS listing - , listings_src_10020.user_id AS user - , listings_src_10020.user_id AS listing__user - FROM ***************************.dim_listings listings_src_10020 + listings_src_10022.active_from AS window_start + , DATE_TRUNC('week', listings_src_10022.active_from) AS window_start__week + , DATE_TRUNC('month', listings_src_10022.active_from) AS window_start__month + , DATE_TRUNC('quarter', listings_src_10022.active_from) AS window_start__quarter + , DATE_TRUNC('year', listings_src_10022.active_from) AS window_start__year + , listings_src_10022.active_to AS window_end + , DATE_TRUNC('week', listings_src_10022.active_to) AS window_end__week + , DATE_TRUNC('month', listings_src_10022.active_to) AS window_end__month + , DATE_TRUNC('quarter', listings_src_10022.active_to) AS window_end__quarter + , DATE_TRUNC('year', listings_src_10022.active_to) AS window_end__year + , listings_src_10022.country + , listings_src_10022.is_lux + , listings_src_10022.capacity + , listings_src_10022.active_from AS listing__window_start + , DATE_TRUNC('week', listings_src_10022.active_from) AS listing__window_start__week + , DATE_TRUNC('month', listings_src_10022.active_from) AS listing__window_start__month + , DATE_TRUNC('quarter', listings_src_10022.active_from) AS listing__window_start__quarter + , DATE_TRUNC('year', listings_src_10022.active_from) AS listing__window_start__year + , listings_src_10022.active_to AS listing__window_end + , DATE_TRUNC('week', listings_src_10022.active_to) AS listing__window_end__week + , DATE_TRUNC('month', listings_src_10022.active_to) AS listing__window_end__month + , DATE_TRUNC('quarter', listings_src_10022.active_to) AS listing__window_end__quarter + , DATE_TRUNC('year', listings_src_10022.active_to) AS listing__window_end__year + , listings_src_10022.country AS listing__country + , listings_src_10022.is_lux AS listing__is_lux + , listings_src_10022.capacity AS listing__capacity + , listings_src_10022.listing_id AS listing + , listings_src_10022.user_id AS user + , listings_src_10022.user_id AS listing__user + FROM ***************************.dim_listings listings_src_10022 ) subq_3 ) subq_4 ON diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_join_to_scd_dimension__plan0_optimized.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_join_to_scd_dimension__plan0_optimized.sql index 806ee6523a..fc9c6b0586 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_join_to_scd_dimension__plan0_optimized.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_join_to_scd_dimension__plan0_optimized.sql @@ -12,7 +12,7 @@ FROM ( -- ['bookings', 'listing__capacity', 'metric_time'] SELECT subq_12.metric_time AS metric_time - , listings_src_10020.capacity AS listing__capacity + , listings_src_10022.capacity AS listing__capacity , subq_12.bookings AS bookings FROM ( -- Read Elements From Data Source 'bookings_source' @@ -23,21 +23,21 @@ FROM ( ds AS metric_time , listing_id AS listing , 1 AS bookings - FROM ***************************.fct_bookings bookings_source_src_10018 + FROM ***************************.fct_bookings bookings_source_src_10020 ) subq_12 LEFT OUTER JOIN - ***************************.dim_listings listings_src_10020 + ***************************.dim_listings listings_src_10022 ON ( - subq_12.listing = listings_src_10020.listing_id + subq_12.listing = listings_src_10022.listing_id ) AND ( ( - subq_12.metric_time >= listings_src_10020.active_from + subq_12.metric_time >= listings_src_10022.active_from ) AND ( ( - subq_12.metric_time < listings_src_10020.active_to + subq_12.metric_time < listings_src_10022.active_to ) OR ( - listings_src_10020.active_to IS NULL + listings_src_10022.active_to IS NULL ) ) ) diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_local_dimension_using_local_identifier__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_local_dimension_using_local_identifier__plan0.sql index 2e7ec02d12..7f12ee4a3d 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_local_dimension_using_local_identifier__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_local_dimension_using_local_identifier__plan0.sql @@ -57,38 +57,38 @@ FROM ( -- Read Elements From Data Source 'listings_latest' SELECT 1 AS listings - , listings_latest_src_10004.capacity AS largest_listing - , listings_latest_src_10004.capacity AS smallest_listing - , listings_latest_src_10004.created_at AS ds - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS ds__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS ds__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS ds__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS ds__year - , listings_latest_src_10004.created_at - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS created_at__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS created_at__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS created_at__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS created_at__year - , listings_latest_src_10004.country AS country_latest - , listings_latest_src_10004.is_lux AS is_lux_latest - , listings_latest_src_10004.capacity AS capacity_latest - , listings_latest_src_10004.created_at AS listing__ds - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS listing__ds__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS listing__ds__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS listing__ds__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS listing__ds__year - , listings_latest_src_10004.created_at AS listing__created_at - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS listing__created_at__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS listing__created_at__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS listing__created_at__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS listing__created_at__year - , listings_latest_src_10004.country AS listing__country_latest - , listings_latest_src_10004.is_lux AS listing__is_lux_latest - , listings_latest_src_10004.capacity AS listing__capacity_latest - , listings_latest_src_10004.listing_id AS listing - , listings_latest_src_10004.user_id AS user - , listings_latest_src_10004.user_id AS listing__user - FROM ***************************.dim_listings_latest listings_latest_src_10004 + , listings_latest_src_10005.capacity AS largest_listing + , listings_latest_src_10005.capacity AS smallest_listing + , listings_latest_src_10005.created_at AS ds + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS ds__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS ds__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS ds__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS ds__year + , listings_latest_src_10005.created_at + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS created_at__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS created_at__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS created_at__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS created_at__year + , listings_latest_src_10005.country AS country_latest + , listings_latest_src_10005.is_lux AS is_lux_latest + , listings_latest_src_10005.capacity AS capacity_latest + , listings_latest_src_10005.created_at AS listing__ds + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS listing__ds__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS listing__ds__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS listing__ds__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS listing__ds__year + , listings_latest_src_10005.created_at AS listing__created_at + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS listing__created_at__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS listing__created_at__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS listing__created_at__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS listing__created_at__year + , listings_latest_src_10005.country AS listing__country_latest + , listings_latest_src_10005.is_lux AS listing__is_lux_latest + , listings_latest_src_10005.capacity AS listing__capacity_latest + , listings_latest_src_10005.listing_id AS listing + , listings_latest_src_10005.user_id AS user + , listings_latest_src_10005.user_id AS listing__user + FROM ***************************.dim_listings_latest listings_latest_src_10005 ) subq_0 ) subq_1 ) subq_2 diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_local_dimension_using_local_identifier__plan0_optimized.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_local_dimension_using_local_identifier__plan0_optimized.sql index 3c0f240434..5182b302e3 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_local_dimension_using_local_identifier__plan0_optimized.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_local_dimension_using_local_identifier__plan0_optimized.sql @@ -11,7 +11,7 @@ FROM ( SELECT country AS listing__country_latest , 1 AS listings - FROM ***************************.dim_listings_latest listings_latest_src_10004 + FROM ***************************.dim_listings_latest listings_latest_src_10005 ) subq_6 GROUP BY listing__country_latest diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_measure_constraint__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_measure_constraint__plan0.sql index d1776b9dbf..9bc8662d40 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_measure_constraint__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_measure_constraint__plan0.sql @@ -224,38 +224,38 @@ FROM ( -- Read Elements From Data Source 'listings_latest' SELECT 1 AS listings - , listings_latest_src_10004.capacity AS largest_listing - , listings_latest_src_10004.capacity AS smallest_listing - , listings_latest_src_10004.created_at AS ds - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS ds__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS ds__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS ds__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS ds__year - , listings_latest_src_10004.created_at - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS created_at__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS created_at__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS created_at__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS created_at__year - , listings_latest_src_10004.country AS country_latest - , listings_latest_src_10004.is_lux AS is_lux_latest - , listings_latest_src_10004.capacity AS capacity_latest - , listings_latest_src_10004.created_at AS listing__ds - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS listing__ds__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS listing__ds__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS listing__ds__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS listing__ds__year - , listings_latest_src_10004.created_at AS listing__created_at - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS listing__created_at__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS listing__created_at__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS listing__created_at__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS listing__created_at__year - , listings_latest_src_10004.country AS listing__country_latest - , listings_latest_src_10004.is_lux AS listing__is_lux_latest - , listings_latest_src_10004.capacity AS listing__capacity_latest - , listings_latest_src_10004.listing_id AS listing - , listings_latest_src_10004.user_id AS user - , listings_latest_src_10004.user_id AS listing__user - FROM ***************************.dim_listings_latest listings_latest_src_10004 + , listings_latest_src_10005.capacity AS largest_listing + , listings_latest_src_10005.capacity AS smallest_listing + , listings_latest_src_10005.created_at AS ds + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS ds__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS ds__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS ds__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS ds__year + , listings_latest_src_10005.created_at + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS created_at__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS created_at__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS created_at__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS created_at__year + , listings_latest_src_10005.country AS country_latest + , listings_latest_src_10005.is_lux AS is_lux_latest + , listings_latest_src_10005.capacity AS capacity_latest + , listings_latest_src_10005.created_at AS listing__ds + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS listing__ds__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS listing__ds__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS listing__ds__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS listing__ds__year + , listings_latest_src_10005.created_at AS listing__created_at + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS listing__created_at__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS listing__created_at__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS listing__created_at__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS listing__created_at__year + , listings_latest_src_10005.country AS listing__country_latest + , listings_latest_src_10005.is_lux AS listing__is_lux_latest + , listings_latest_src_10005.capacity AS listing__capacity_latest + , listings_latest_src_10005.listing_id AS listing + , listings_latest_src_10005.user_id AS user + , listings_latest_src_10005.user_id AS listing__user + FROM ***************************.dim_listings_latest listings_latest_src_10005 ) subq_3 ) subq_4 ) subq_5 diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_measure_constraint__plan0_optimized.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_measure_constraint__plan0_optimized.sql index b4163117c1..73e0f36a00 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_measure_constraint__plan0_optimized.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_measure_constraint__plan0_optimized.sql @@ -26,7 +26,7 @@ FROM ( -- ['average_booking_value', 'bookings', 'listing__is_lux_latest', 'metric_time'] SELECT subq_19.metric_time AS metric_time - , listings_latest_src_10004.is_lux AS listing__is_lux_latest + , listings_latest_src_10005.is_lux AS listing__is_lux_latest , subq_19.bookings AS bookings , subq_19.average_booking_value AS average_booking_value FROM ( @@ -45,9 +45,9 @@ FROM ( ) bookings_source_src_10001 ) subq_19 LEFT OUTER JOIN - ***************************.dim_listings_latest listings_latest_src_10004 + ***************************.dim_listings_latest listings_latest_src_10005 ON - subq_19.listing = listings_latest_src_10004.listing_id + subq_19.listing = listings_latest_src_10005.listing_id ) subq_24 WHERE listing__is_lux_latest GROUP BY diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql index eaa4cf9017..b3177e6958 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql @@ -188,38 +188,38 @@ FROM ( -- Read Elements From Data Source 'listings_latest' SELECT 1 AS listings - , listings_latest_src_10004.capacity AS largest_listing - , listings_latest_src_10004.capacity AS smallest_listing - , listings_latest_src_10004.created_at AS ds - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS ds__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS ds__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS ds__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS ds__year - , listings_latest_src_10004.created_at - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS created_at__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS created_at__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS created_at__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS created_at__year - , listings_latest_src_10004.country AS country_latest - , listings_latest_src_10004.is_lux AS is_lux_latest - , listings_latest_src_10004.capacity AS capacity_latest - , listings_latest_src_10004.created_at AS listing__ds - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS listing__ds__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS listing__ds__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS listing__ds__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS listing__ds__year - , listings_latest_src_10004.created_at AS listing__created_at - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS listing__created_at__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS listing__created_at__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS listing__created_at__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS listing__created_at__year - , listings_latest_src_10004.country AS listing__country_latest - , listings_latest_src_10004.is_lux AS listing__is_lux_latest - , listings_latest_src_10004.capacity AS listing__capacity_latest - , listings_latest_src_10004.listing_id AS listing - , listings_latest_src_10004.user_id AS user - , listings_latest_src_10004.user_id AS listing__user - FROM ***************************.dim_listings_latest listings_latest_src_10004 + , listings_latest_src_10005.capacity AS largest_listing + , listings_latest_src_10005.capacity AS smallest_listing + , listings_latest_src_10005.created_at AS ds + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS ds__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS ds__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS ds__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS ds__year + , listings_latest_src_10005.created_at + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS created_at__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS created_at__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS created_at__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS created_at__year + , listings_latest_src_10005.country AS country_latest + , listings_latest_src_10005.is_lux AS is_lux_latest + , listings_latest_src_10005.capacity AS capacity_latest + , listings_latest_src_10005.created_at AS listing__ds + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS listing__ds__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS listing__ds__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS listing__ds__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS listing__ds__year + , listings_latest_src_10005.created_at AS listing__created_at + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS listing__created_at__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS listing__created_at__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS listing__created_at__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS listing__created_at__year + , listings_latest_src_10005.country AS listing__country_latest + , listings_latest_src_10005.is_lux AS listing__is_lux_latest + , listings_latest_src_10005.capacity AS listing__capacity_latest + , listings_latest_src_10005.listing_id AS listing + , listings_latest_src_10005.user_id AS user + , listings_latest_src_10005.user_id AS listing__user + FROM ***************************.dim_listings_latest listings_latest_src_10005 ) subq_4 ) subq_5 ) subq_6 diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql index 75aca6b344..b0c83b76e4 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql @@ -25,5 +25,5 @@ CROSS JOIN ( -- Aggregate Measures SELECT SUM(1) AS listings - FROM ***************************.dim_listings_latest listings_latest_src_10004 + FROM ***************************.dim_listings_latest listings_latest_src_10005 ) subq_17 diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multi_hop_through_scd_dimension__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multi_hop_through_scd_dimension__plan0.sql index de96078445..7a7dcfbc29 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multi_hop_through_scd_dimension__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multi_hop_through_scd_dimension__plan0.sql @@ -70,31 +70,31 @@ FROM ( SELECT 1 AS bookings , CASE WHEN is_instant THEN 1 ELSE 0 END AS instant_bookings - , bookings_source_src_10018.booking_value - , bookings_source_src_10018.guest_id AS bookers - , bookings_source_src_10018.booking_value AS average_booking_value - , bookings_source_src_10018.booking_value AS booking_payments - , bookings_source_src_10018.is_instant - , bookings_source_src_10018.ds - , DATE_TRUNC('week', bookings_source_src_10018.ds) AS ds__week - , DATE_TRUNC('month', bookings_source_src_10018.ds) AS ds__month - , DATE_TRUNC('quarter', bookings_source_src_10018.ds) AS ds__quarter - , DATE_TRUNC('year', bookings_source_src_10018.ds) AS ds__year - , bookings_source_src_10018.ds_partitioned - , DATE_TRUNC('week', bookings_source_src_10018.ds_partitioned) AS ds_partitioned__week - , DATE_TRUNC('month', bookings_source_src_10018.ds_partitioned) AS ds_partitioned__month - , DATE_TRUNC('quarter', bookings_source_src_10018.ds_partitioned) AS ds_partitioned__quarter - , DATE_TRUNC('year', bookings_source_src_10018.ds_partitioned) AS ds_partitioned__year - , bookings_source_src_10018.booking_paid_at - , DATE_TRUNC('week', bookings_source_src_10018.booking_paid_at) AS booking_paid_at__week - , DATE_TRUNC('month', bookings_source_src_10018.booking_paid_at) AS booking_paid_at__month - , DATE_TRUNC('quarter', bookings_source_src_10018.booking_paid_at) AS booking_paid_at__quarter - , DATE_TRUNC('year', bookings_source_src_10018.booking_paid_at) AS booking_paid_at__year - , bookings_source_src_10018.listing_id AS listing - , bookings_source_src_10018.guest_id AS guest - , bookings_source_src_10018.host_id AS host - , bookings_source_src_10018.guest_id AS user - FROM ***************************.fct_bookings bookings_source_src_10018 + , bookings_source_src_10020.booking_value + , bookings_source_src_10020.guest_id AS bookers + , bookings_source_src_10020.booking_value AS average_booking_value + , bookings_source_src_10020.booking_value AS booking_payments + , bookings_source_src_10020.is_instant + , bookings_source_src_10020.ds + , DATE_TRUNC('week', bookings_source_src_10020.ds) AS ds__week + , DATE_TRUNC('month', bookings_source_src_10020.ds) AS ds__month + , DATE_TRUNC('quarter', bookings_source_src_10020.ds) AS ds__quarter + , DATE_TRUNC('year', bookings_source_src_10020.ds) AS ds__year + , bookings_source_src_10020.ds_partitioned + , DATE_TRUNC('week', bookings_source_src_10020.ds_partitioned) AS ds_partitioned__week + , DATE_TRUNC('month', bookings_source_src_10020.ds_partitioned) AS ds_partitioned__month + , DATE_TRUNC('quarter', bookings_source_src_10020.ds_partitioned) AS ds_partitioned__quarter + , DATE_TRUNC('year', bookings_source_src_10020.ds_partitioned) AS ds_partitioned__year + , bookings_source_src_10020.booking_paid_at + , DATE_TRUNC('week', bookings_source_src_10020.booking_paid_at) AS booking_paid_at__week + , DATE_TRUNC('month', bookings_source_src_10020.booking_paid_at) AS booking_paid_at__month + , DATE_TRUNC('quarter', bookings_source_src_10020.booking_paid_at) AS booking_paid_at__quarter + , DATE_TRUNC('year', bookings_source_src_10020.booking_paid_at) AS booking_paid_at__year + , bookings_source_src_10020.listing_id AS listing + , bookings_source_src_10020.guest_id AS guest + , bookings_source_src_10020.host_id AS host + , bookings_source_src_10020.guest_id AS user + FROM ***************************.fct_bookings bookings_source_src_10020 ) subq_0 ) subq_1 ) subq_2 @@ -147,36 +147,36 @@ FROM ( FROM ( -- Read Elements From Data Source 'listings' SELECT - listings_src_10020.active_from AS window_start - , DATE_TRUNC('week', listings_src_10020.active_from) AS window_start__week - , DATE_TRUNC('month', listings_src_10020.active_from) AS window_start__month - , DATE_TRUNC('quarter', listings_src_10020.active_from) AS window_start__quarter - , DATE_TRUNC('year', listings_src_10020.active_from) AS window_start__year - , listings_src_10020.active_to AS window_end - , DATE_TRUNC('week', listings_src_10020.active_to) AS window_end__week - , DATE_TRUNC('month', listings_src_10020.active_to) AS window_end__month - , DATE_TRUNC('quarter', listings_src_10020.active_to) AS window_end__quarter - , DATE_TRUNC('year', listings_src_10020.active_to) AS window_end__year - , listings_src_10020.country - , listings_src_10020.is_lux - , listings_src_10020.capacity - , listings_src_10020.active_from AS listing__window_start - , DATE_TRUNC('week', listings_src_10020.active_from) AS listing__window_start__week - , DATE_TRUNC('month', listings_src_10020.active_from) AS listing__window_start__month - , DATE_TRUNC('quarter', listings_src_10020.active_from) AS listing__window_start__quarter - , DATE_TRUNC('year', listings_src_10020.active_from) AS listing__window_start__year - , listings_src_10020.active_to AS listing__window_end - , DATE_TRUNC('week', listings_src_10020.active_to) AS listing__window_end__week - , DATE_TRUNC('month', listings_src_10020.active_to) AS listing__window_end__month - , DATE_TRUNC('quarter', listings_src_10020.active_to) AS listing__window_end__quarter - , DATE_TRUNC('year', listings_src_10020.active_to) AS listing__window_end__year - , listings_src_10020.country AS listing__country - , listings_src_10020.is_lux AS listing__is_lux - , listings_src_10020.capacity AS listing__capacity - , listings_src_10020.listing_id AS listing - , listings_src_10020.user_id AS user - , listings_src_10020.user_id AS listing__user - FROM ***************************.dim_listings listings_src_10020 + listings_src_10022.active_from AS window_start + , DATE_TRUNC('week', listings_src_10022.active_from) AS window_start__week + , DATE_TRUNC('month', listings_src_10022.active_from) AS window_start__month + , DATE_TRUNC('quarter', listings_src_10022.active_from) AS window_start__quarter + , DATE_TRUNC('year', listings_src_10022.active_from) AS window_start__year + , listings_src_10022.active_to AS window_end + , DATE_TRUNC('week', listings_src_10022.active_to) AS window_end__week + , DATE_TRUNC('month', listings_src_10022.active_to) AS window_end__month + , DATE_TRUNC('quarter', listings_src_10022.active_to) AS window_end__quarter + , DATE_TRUNC('year', listings_src_10022.active_to) AS window_end__year + , listings_src_10022.country + , listings_src_10022.is_lux + , listings_src_10022.capacity + , listings_src_10022.active_from AS listing__window_start + , DATE_TRUNC('week', listings_src_10022.active_from) AS listing__window_start__week + , DATE_TRUNC('month', listings_src_10022.active_from) AS listing__window_start__month + , DATE_TRUNC('quarter', listings_src_10022.active_from) AS listing__window_start__quarter + , DATE_TRUNC('year', listings_src_10022.active_from) AS listing__window_start__year + , listings_src_10022.active_to AS listing__window_end + , DATE_TRUNC('week', listings_src_10022.active_to) AS listing__window_end__week + , DATE_TRUNC('month', listings_src_10022.active_to) AS listing__window_end__month + , DATE_TRUNC('quarter', listings_src_10022.active_to) AS listing__window_end__quarter + , DATE_TRUNC('year', listings_src_10022.active_to) AS listing__window_end__year + , listings_src_10022.country AS listing__country + , listings_src_10022.is_lux AS listing__is_lux + , listings_src_10022.capacity AS listing__capacity + , listings_src_10022.listing_id AS listing + , listings_src_10022.user_id AS user + , listings_src_10022.user_id AS listing__user + FROM ***************************.dim_listings listings_src_10022 ) subq_3 LEFT OUTER JOIN ( -- Pass Only Elements: @@ -210,20 +210,20 @@ FROM ( FROM ( -- Read Elements From Data Source 'users_latest' SELECT - users_latest_src_10024.ds - , DATE_TRUNC('week', users_latest_src_10024.ds) AS ds__week - , DATE_TRUNC('month', users_latest_src_10024.ds) AS ds__month - , DATE_TRUNC('quarter', users_latest_src_10024.ds) AS ds__quarter - , DATE_TRUNC('year', users_latest_src_10024.ds) AS ds__year - , users_latest_src_10024.home_state_latest - , users_latest_src_10024.ds AS user__ds - , DATE_TRUNC('week', users_latest_src_10024.ds) AS user__ds__week - , DATE_TRUNC('month', users_latest_src_10024.ds) AS user__ds__month - , DATE_TRUNC('quarter', users_latest_src_10024.ds) AS user__ds__quarter - , DATE_TRUNC('year', users_latest_src_10024.ds) AS user__ds__year - , users_latest_src_10024.home_state_latest AS user__home_state_latest - , users_latest_src_10024.user_id AS user - FROM ***************************.dim_users_latest users_latest_src_10024 + users_latest_src_10026.ds + , DATE_TRUNC('week', users_latest_src_10026.ds) AS ds__week + , DATE_TRUNC('month', users_latest_src_10026.ds) AS ds__month + , DATE_TRUNC('quarter', users_latest_src_10026.ds) AS ds__quarter + , DATE_TRUNC('year', users_latest_src_10026.ds) AS ds__year + , users_latest_src_10026.home_state_latest + , users_latest_src_10026.ds AS user__ds + , DATE_TRUNC('week', users_latest_src_10026.ds) AS user__ds__week + , DATE_TRUNC('month', users_latest_src_10026.ds) AS user__ds__month + , DATE_TRUNC('quarter', users_latest_src_10026.ds) AS user__ds__quarter + , DATE_TRUNC('year', users_latest_src_10026.ds) AS user__ds__year + , users_latest_src_10026.home_state_latest AS user__home_state_latest + , users_latest_src_10026.user_id AS user + FROM ***************************.dim_users_latest users_latest_src_10026 ) subq_4 ) subq_5 ON diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multi_hop_through_scd_dimension__plan0_optimized.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multi_hop_through_scd_dimension__plan0_optimized.sql index 61eae48b58..db5c297049 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multi_hop_through_scd_dimension__plan0_optimized.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multi_hop_through_scd_dimension__plan0_optimized.sql @@ -16,22 +16,22 @@ FROM ( ds AS metric_time , listing_id AS listing , 1 AS bookings - FROM ***************************.fct_bookings bookings_source_src_10018 + FROM ***************************.fct_bookings bookings_source_src_10020 ) subq_13 LEFT OUTER JOIN ( -- Join Standard Outputs -- Pass Only Elements: -- ['user__home_state_latest', 'window_start', 'window_end', 'listing'] SELECT - listings_src_10020.active_from AS window_start - , listings_src_10020.active_to AS window_end - , listings_src_10020.listing_id AS listing - , users_latest_src_10024.home_state_latest AS user__home_state_latest - FROM ***************************.dim_listings listings_src_10020 + listings_src_10022.active_from AS window_start + , listings_src_10022.active_to AS window_end + , listings_src_10022.listing_id AS listing + , users_latest_src_10026.home_state_latest AS user__home_state_latest + FROM ***************************.dim_listings listings_src_10022 LEFT OUTER JOIN - ***************************.dim_users_latest users_latest_src_10024 + ***************************.dim_users_latest users_latest_src_10026 ON - listings_src_10020.user_id = users_latest_src_10024.user_id + listings_src_10022.user_id = users_latest_src_10026.user_id ) subq_18 ON ( diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multi_hop_to_scd_dimension__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multi_hop_to_scd_dimension__plan0.sql index f517949c7d..066f02057d 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multi_hop_to_scd_dimension__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multi_hop_to_scd_dimension__plan0.sql @@ -70,31 +70,31 @@ FROM ( SELECT 1 AS bookings , CASE WHEN is_instant THEN 1 ELSE 0 END AS instant_bookings - , bookings_source_src_10018.booking_value - , bookings_source_src_10018.guest_id AS bookers - , bookings_source_src_10018.booking_value AS average_booking_value - , bookings_source_src_10018.booking_value AS booking_payments - , bookings_source_src_10018.is_instant - , bookings_source_src_10018.ds - , DATE_TRUNC('week', bookings_source_src_10018.ds) AS ds__week - , DATE_TRUNC('month', bookings_source_src_10018.ds) AS ds__month - , DATE_TRUNC('quarter', bookings_source_src_10018.ds) AS ds__quarter - , DATE_TRUNC('year', bookings_source_src_10018.ds) AS ds__year - , bookings_source_src_10018.ds_partitioned - , DATE_TRUNC('week', bookings_source_src_10018.ds_partitioned) AS ds_partitioned__week - , DATE_TRUNC('month', bookings_source_src_10018.ds_partitioned) AS ds_partitioned__month - , DATE_TRUNC('quarter', bookings_source_src_10018.ds_partitioned) AS ds_partitioned__quarter - , DATE_TRUNC('year', bookings_source_src_10018.ds_partitioned) AS ds_partitioned__year - , bookings_source_src_10018.booking_paid_at - , DATE_TRUNC('week', bookings_source_src_10018.booking_paid_at) AS booking_paid_at__week - , DATE_TRUNC('month', bookings_source_src_10018.booking_paid_at) AS booking_paid_at__month - , DATE_TRUNC('quarter', bookings_source_src_10018.booking_paid_at) AS booking_paid_at__quarter - , DATE_TRUNC('year', bookings_source_src_10018.booking_paid_at) AS booking_paid_at__year - , bookings_source_src_10018.listing_id AS listing - , bookings_source_src_10018.guest_id AS guest - , bookings_source_src_10018.host_id AS host - , bookings_source_src_10018.guest_id AS user - FROM ***************************.fct_bookings bookings_source_src_10018 + , bookings_source_src_10020.booking_value + , bookings_source_src_10020.guest_id AS bookers + , bookings_source_src_10020.booking_value AS average_booking_value + , bookings_source_src_10020.booking_value AS booking_payments + , bookings_source_src_10020.is_instant + , bookings_source_src_10020.ds + , DATE_TRUNC('week', bookings_source_src_10020.ds) AS ds__week + , DATE_TRUNC('month', bookings_source_src_10020.ds) AS ds__month + , DATE_TRUNC('quarter', bookings_source_src_10020.ds) AS ds__quarter + , DATE_TRUNC('year', bookings_source_src_10020.ds) AS ds__year + , bookings_source_src_10020.ds_partitioned + , DATE_TRUNC('week', bookings_source_src_10020.ds_partitioned) AS ds_partitioned__week + , DATE_TRUNC('month', bookings_source_src_10020.ds_partitioned) AS ds_partitioned__month + , DATE_TRUNC('quarter', bookings_source_src_10020.ds_partitioned) AS ds_partitioned__quarter + , DATE_TRUNC('year', bookings_source_src_10020.ds_partitioned) AS ds_partitioned__year + , bookings_source_src_10020.booking_paid_at + , DATE_TRUNC('week', bookings_source_src_10020.booking_paid_at) AS booking_paid_at__week + , DATE_TRUNC('month', bookings_source_src_10020.booking_paid_at) AS booking_paid_at__month + , DATE_TRUNC('quarter', bookings_source_src_10020.booking_paid_at) AS booking_paid_at__quarter + , DATE_TRUNC('year', bookings_source_src_10020.booking_paid_at) AS booking_paid_at__year + , bookings_source_src_10020.listing_id AS listing + , bookings_source_src_10020.guest_id AS guest + , bookings_source_src_10020.host_id AS host + , bookings_source_src_10020.guest_id AS user + FROM ***************************.fct_bookings bookings_source_src_10020 ) subq_0 ) subq_1 ) subq_2 @@ -129,10 +129,10 @@ FROM ( FROM ( -- Read Elements From Data Source 'lux_listing_mapping' SELECT - lux_listing_mapping_src_10021.listing_id AS listing - , lux_listing_mapping_src_10021.lux_listing_id AS lux_listing - , lux_listing_mapping_src_10021.lux_listing_id AS listing__lux_listing - FROM ***************************.dim_lux_listing_id_mapping lux_listing_mapping_src_10021 + lux_listing_mapping_src_10023.listing_id AS listing + , lux_listing_mapping_src_10023.lux_listing_id AS lux_listing + , lux_listing_mapping_src_10023.lux_listing_id AS listing__lux_listing + FROM ***************************.dim_lux_listing_id_mapping lux_listing_mapping_src_10023 ) subq_3 LEFT OUTER JOIN ( -- Pass Only Elements: @@ -186,30 +186,30 @@ FROM ( FROM ( -- Read Elements From Data Source 'lux_listings' SELECT - lux_listings_src_10022.valid_from AS window_start - , DATE_TRUNC('week', lux_listings_src_10022.valid_from) AS window_start__week - , DATE_TRUNC('month', lux_listings_src_10022.valid_from) AS window_start__month - , DATE_TRUNC('quarter', lux_listings_src_10022.valid_from) AS window_start__quarter - , DATE_TRUNC('year', lux_listings_src_10022.valid_from) AS window_start__year - , lux_listings_src_10022.valid_to AS window_end - , DATE_TRUNC('week', lux_listings_src_10022.valid_to) AS window_end__week - , DATE_TRUNC('month', lux_listings_src_10022.valid_to) AS window_end__month - , DATE_TRUNC('quarter', lux_listings_src_10022.valid_to) AS window_end__quarter - , DATE_TRUNC('year', lux_listings_src_10022.valid_to) AS window_end__year - , lux_listings_src_10022.is_confirmed_lux - , lux_listings_src_10022.valid_from AS lux_listing__window_start - , DATE_TRUNC('week', lux_listings_src_10022.valid_from) AS lux_listing__window_start__week - , DATE_TRUNC('month', lux_listings_src_10022.valid_from) AS lux_listing__window_start__month - , DATE_TRUNC('quarter', lux_listings_src_10022.valid_from) AS lux_listing__window_start__quarter - , DATE_TRUNC('year', lux_listings_src_10022.valid_from) AS lux_listing__window_start__year - , lux_listings_src_10022.valid_to AS lux_listing__window_end - , DATE_TRUNC('week', lux_listings_src_10022.valid_to) AS lux_listing__window_end__week - , DATE_TRUNC('month', lux_listings_src_10022.valid_to) AS lux_listing__window_end__month - , DATE_TRUNC('quarter', lux_listings_src_10022.valid_to) AS lux_listing__window_end__quarter - , DATE_TRUNC('year', lux_listings_src_10022.valid_to) AS lux_listing__window_end__year - , lux_listings_src_10022.is_confirmed_lux AS lux_listing__is_confirmed_lux - , lux_listings_src_10022.lux_listing_id AS lux_listing - FROM ***************************.dim_lux_listings lux_listings_src_10022 + lux_listings_src_10024.valid_from AS window_start + , DATE_TRUNC('week', lux_listings_src_10024.valid_from) AS window_start__week + , DATE_TRUNC('month', lux_listings_src_10024.valid_from) AS window_start__month + , DATE_TRUNC('quarter', lux_listings_src_10024.valid_from) AS window_start__quarter + , DATE_TRUNC('year', lux_listings_src_10024.valid_from) AS window_start__year + , lux_listings_src_10024.valid_to AS window_end + , DATE_TRUNC('week', lux_listings_src_10024.valid_to) AS window_end__week + , DATE_TRUNC('month', lux_listings_src_10024.valid_to) AS window_end__month + , DATE_TRUNC('quarter', lux_listings_src_10024.valid_to) AS window_end__quarter + , DATE_TRUNC('year', lux_listings_src_10024.valid_to) AS window_end__year + , lux_listings_src_10024.is_confirmed_lux + , lux_listings_src_10024.valid_from AS lux_listing__window_start + , DATE_TRUNC('week', lux_listings_src_10024.valid_from) AS lux_listing__window_start__week + , DATE_TRUNC('month', lux_listings_src_10024.valid_from) AS lux_listing__window_start__month + , DATE_TRUNC('quarter', lux_listings_src_10024.valid_from) AS lux_listing__window_start__quarter + , DATE_TRUNC('year', lux_listings_src_10024.valid_from) AS lux_listing__window_start__year + , lux_listings_src_10024.valid_to AS lux_listing__window_end + , DATE_TRUNC('week', lux_listings_src_10024.valid_to) AS lux_listing__window_end__week + , DATE_TRUNC('month', lux_listings_src_10024.valid_to) AS lux_listing__window_end__month + , DATE_TRUNC('quarter', lux_listings_src_10024.valid_to) AS lux_listing__window_end__quarter + , DATE_TRUNC('year', lux_listings_src_10024.valid_to) AS lux_listing__window_end__year + , lux_listings_src_10024.is_confirmed_lux AS lux_listing__is_confirmed_lux + , lux_listings_src_10024.lux_listing_id AS lux_listing + FROM ***************************.dim_lux_listings lux_listings_src_10024 ) subq_4 ) subq_5 ON diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multi_hop_to_scd_dimension__plan0_optimized.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multi_hop_to_scd_dimension__plan0_optimized.sql index d7d9f8b842..bdd70cecc4 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multi_hop_to_scd_dimension__plan0_optimized.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multi_hop_to_scd_dimension__plan0_optimized.sql @@ -16,7 +16,7 @@ FROM ( ds AS metric_time , listing_id AS listing , 1 AS bookings - FROM ***************************.fct_bookings bookings_source_src_10018 + FROM ***************************.fct_bookings bookings_source_src_10020 ) subq_13 LEFT OUTER JOIN ( -- Join Standard Outputs @@ -26,15 +26,15 @@ LEFT OUTER JOIN ( -- 'lux_listing__window_end', -- 'listing'] SELECT - lux_listings_src_10022.valid_from AS lux_listing__window_start - , lux_listings_src_10022.valid_to AS lux_listing__window_end - , lux_listing_mapping_src_10021.listing_id AS listing - , lux_listings_src_10022.is_confirmed_lux AS lux_listing__is_confirmed_lux - FROM ***************************.dim_lux_listing_id_mapping lux_listing_mapping_src_10021 + lux_listings_src_10024.valid_from AS lux_listing__window_start + , lux_listings_src_10024.valid_to AS lux_listing__window_end + , lux_listing_mapping_src_10023.listing_id AS listing + , lux_listings_src_10024.is_confirmed_lux AS lux_listing__is_confirmed_lux + FROM ***************************.dim_lux_listing_id_mapping lux_listing_mapping_src_10023 LEFT OUTER JOIN - ***************************.dim_lux_listings lux_listings_src_10022 + ***************************.dim_lux_listings lux_listings_src_10024 ON - lux_listing_mapping_src_10021.lux_listing_id = lux_listings_src_10022.lux_listing_id + lux_listing_mapping_src_10023.lux_listing_id = lux_listings_src_10024.lux_listing_id ) subq_18 ON ( diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multi_join_node__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multi_join_node__plan0.sql index 01c0c91626..b5b4f06973 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multi_join_node__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multi_join_node__plan0.sql @@ -77,38 +77,38 @@ LEFT OUTER JOIN ( -- Read Elements From Data Source 'listings_latest' SELECT 1 AS listings - , listings_latest_src_10004.capacity AS largest_listing - , listings_latest_src_10004.capacity AS smallest_listing - , listings_latest_src_10004.created_at AS ds - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS ds__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS ds__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS ds__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS ds__year - , listings_latest_src_10004.created_at - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS created_at__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS created_at__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS created_at__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS created_at__year - , listings_latest_src_10004.country AS country_latest - , listings_latest_src_10004.is_lux AS is_lux_latest - , listings_latest_src_10004.capacity AS capacity_latest - , listings_latest_src_10004.created_at AS listing__ds - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS listing__ds__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS listing__ds__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS listing__ds__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS listing__ds__year - , listings_latest_src_10004.created_at AS listing__created_at - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS listing__created_at__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS listing__created_at__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS listing__created_at__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS listing__created_at__year - , listings_latest_src_10004.country AS listing__country_latest - , listings_latest_src_10004.is_lux AS listing__is_lux_latest - , listings_latest_src_10004.capacity AS listing__capacity_latest - , listings_latest_src_10004.listing_id AS listing - , listings_latest_src_10004.user_id AS user - , listings_latest_src_10004.user_id AS listing__user - FROM ***************************.dim_listings_latest listings_latest_src_10004 + , listings_latest_src_10005.capacity AS largest_listing + , listings_latest_src_10005.capacity AS smallest_listing + , listings_latest_src_10005.created_at AS ds + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS ds__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS ds__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS ds__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS ds__year + , listings_latest_src_10005.created_at + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS created_at__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS created_at__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS created_at__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS created_at__year + , listings_latest_src_10005.country AS country_latest + , listings_latest_src_10005.is_lux AS is_lux_latest + , listings_latest_src_10005.capacity AS capacity_latest + , listings_latest_src_10005.created_at AS listing__ds + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS listing__ds__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS listing__ds__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS listing__ds__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS listing__ds__year + , listings_latest_src_10005.created_at AS listing__created_at + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS listing__created_at__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS listing__created_at__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS listing__created_at__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS listing__created_at__year + , listings_latest_src_10005.country AS listing__country_latest + , listings_latest_src_10005.is_lux AS listing__is_lux_latest + , listings_latest_src_10005.capacity AS listing__capacity_latest + , listings_latest_src_10005.listing_id AS listing + , listings_latest_src_10005.user_id AS user + , listings_latest_src_10005.user_id AS listing__user + FROM ***************************.dim_listings_latest listings_latest_src_10005 ) subq_2 ) subq_3 ON @@ -123,38 +123,38 @@ LEFT OUTER JOIN ( -- Read Elements From Data Source 'listings_latest' SELECT 1 AS listings - , listings_latest_src_10004.capacity AS largest_listing - , listings_latest_src_10004.capacity AS smallest_listing - , listings_latest_src_10004.created_at AS ds - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS ds__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS ds__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS ds__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS ds__year - , listings_latest_src_10004.created_at - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS created_at__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS created_at__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS created_at__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS created_at__year - , listings_latest_src_10004.country AS country_latest - , listings_latest_src_10004.is_lux AS is_lux_latest - , listings_latest_src_10004.capacity AS capacity_latest - , listings_latest_src_10004.created_at AS listing__ds - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS listing__ds__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS listing__ds__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS listing__ds__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS listing__ds__year - , listings_latest_src_10004.created_at AS listing__created_at - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS listing__created_at__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS listing__created_at__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS listing__created_at__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS listing__created_at__year - , listings_latest_src_10004.country AS listing__country_latest - , listings_latest_src_10004.is_lux AS listing__is_lux_latest - , listings_latest_src_10004.capacity AS listing__capacity_latest - , listings_latest_src_10004.listing_id AS listing - , listings_latest_src_10004.user_id AS user - , listings_latest_src_10004.user_id AS listing__user - FROM ***************************.dim_listings_latest listings_latest_src_10004 + , listings_latest_src_10005.capacity AS largest_listing + , listings_latest_src_10005.capacity AS smallest_listing + , listings_latest_src_10005.created_at AS ds + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS ds__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS ds__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS ds__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS ds__year + , listings_latest_src_10005.created_at + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS created_at__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS created_at__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS created_at__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS created_at__year + , listings_latest_src_10005.country AS country_latest + , listings_latest_src_10005.is_lux AS is_lux_latest + , listings_latest_src_10005.capacity AS capacity_latest + , listings_latest_src_10005.created_at AS listing__ds + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS listing__ds__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS listing__ds__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS listing__ds__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS listing__ds__year + , listings_latest_src_10005.created_at AS listing__created_at + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS listing__created_at__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS listing__created_at__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS listing__created_at__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS listing__created_at__year + , listings_latest_src_10005.country AS listing__country_latest + , listings_latest_src_10005.is_lux AS listing__is_lux_latest + , listings_latest_src_10005.capacity AS listing__capacity_latest + , listings_latest_src_10005.listing_id AS listing + , listings_latest_src_10005.user_id AS user + , listings_latest_src_10005.user_id AS listing__user + FROM ***************************.dim_listings_latest listings_latest_src_10005 ) subq_4 ) subq_5 ON diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multi_join_node__plan0_optimized.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multi_join_node__plan0_optimized.sql index 1093bb0b49..b9b3110aab 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multi_join_node__plan0_optimized.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multi_join_node__plan0_optimized.sql @@ -23,7 +23,7 @@ LEFT OUTER JOIN ( SELECT listing_id AS listing , country AS country_latest - FROM ***************************.dim_listings_latest listings_latest_src_10004 + FROM ***************************.dim_listings_latest listings_latest_src_10005 ) subq_9 ON subq_7.listing = subq_9.listing @@ -34,7 +34,7 @@ LEFT OUTER JOIN ( SELECT listing_id AS listing , country AS country_latest - FROM ***************************.dim_listings_latest listings_latest_src_10004 + FROM ***************************.dim_listings_latest listings_latest_src_10005 ) subq_11 ON subq_7.listing = subq_11.listing diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multihop_node__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multihop_node__plan0.sql index eb170aa5f4..58aa9d73cf 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multihop_node__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multihop_node__plan0.sql @@ -63,31 +63,31 @@ FROM ( FROM ( -- Read Elements From Data Source 'account_month_txns' SELECT - account_month_txns_src_10010.txn_count - , account_month_txns_src_10010.ds_partitioned - , DATE_TRUNC('week', account_month_txns_src_10010.ds_partitioned) AS ds_partitioned__week - , DATE_TRUNC('month', account_month_txns_src_10010.ds_partitioned) AS ds_partitioned__month - , DATE_TRUNC('quarter', account_month_txns_src_10010.ds_partitioned) AS ds_partitioned__quarter - , DATE_TRUNC('year', account_month_txns_src_10010.ds_partitioned) AS ds_partitioned__year - , account_month_txns_src_10010.ds - , DATE_TRUNC('week', account_month_txns_src_10010.ds) AS ds__week - , DATE_TRUNC('month', account_month_txns_src_10010.ds) AS ds__month - , DATE_TRUNC('quarter', account_month_txns_src_10010.ds) AS ds__quarter - , DATE_TRUNC('year', account_month_txns_src_10010.ds) AS ds__year - , account_month_txns_src_10010.account_month - , account_month_txns_src_10010.ds_partitioned AS account_id__ds_partitioned - , DATE_TRUNC('week', account_month_txns_src_10010.ds_partitioned) AS account_id__ds_partitioned__week - , DATE_TRUNC('month', account_month_txns_src_10010.ds_partitioned) AS account_id__ds_partitioned__month - , DATE_TRUNC('quarter', account_month_txns_src_10010.ds_partitioned) AS account_id__ds_partitioned__quarter - , DATE_TRUNC('year', account_month_txns_src_10010.ds_partitioned) AS account_id__ds_partitioned__year - , account_month_txns_src_10010.ds AS account_id__ds - , DATE_TRUNC('week', account_month_txns_src_10010.ds) AS account_id__ds__week - , DATE_TRUNC('month', account_month_txns_src_10010.ds) AS account_id__ds__month - , DATE_TRUNC('quarter', account_month_txns_src_10010.ds) AS account_id__ds__quarter - , DATE_TRUNC('year', account_month_txns_src_10010.ds) AS account_id__ds__year - , account_month_txns_src_10010.account_month AS account_id__account_month - , account_month_txns_src_10010.account_id - FROM ***************************.account_month_txns account_month_txns_src_10010 + account_month_txns_src_10012.txn_count + , account_month_txns_src_10012.ds_partitioned + , DATE_TRUNC('week', account_month_txns_src_10012.ds_partitioned) AS ds_partitioned__week + , DATE_TRUNC('month', account_month_txns_src_10012.ds_partitioned) AS ds_partitioned__month + , DATE_TRUNC('quarter', account_month_txns_src_10012.ds_partitioned) AS ds_partitioned__quarter + , DATE_TRUNC('year', account_month_txns_src_10012.ds_partitioned) AS ds_partitioned__year + , account_month_txns_src_10012.ds + , DATE_TRUNC('week', account_month_txns_src_10012.ds) AS ds__week + , DATE_TRUNC('month', account_month_txns_src_10012.ds) AS ds__month + , DATE_TRUNC('quarter', account_month_txns_src_10012.ds) AS ds__quarter + , DATE_TRUNC('year', account_month_txns_src_10012.ds) AS ds__year + , account_month_txns_src_10012.account_month + , account_month_txns_src_10012.ds_partitioned AS account_id__ds_partitioned + , DATE_TRUNC('week', account_month_txns_src_10012.ds_partitioned) AS account_id__ds_partitioned__week + , DATE_TRUNC('month', account_month_txns_src_10012.ds_partitioned) AS account_id__ds_partitioned__month + , DATE_TRUNC('quarter', account_month_txns_src_10012.ds_partitioned) AS account_id__ds_partitioned__quarter + , DATE_TRUNC('year', account_month_txns_src_10012.ds_partitioned) AS account_id__ds_partitioned__year + , account_month_txns_src_10012.ds AS account_id__ds + , DATE_TRUNC('week', account_month_txns_src_10012.ds) AS account_id__ds__week + , DATE_TRUNC('month', account_month_txns_src_10012.ds) AS account_id__ds__month + , DATE_TRUNC('quarter', account_month_txns_src_10012.ds) AS account_id__ds__quarter + , DATE_TRUNC('year', account_month_txns_src_10012.ds) AS account_id__ds__year + , account_month_txns_src_10012.account_month AS account_id__account_month + , account_month_txns_src_10012.account_id + FROM ***************************.account_month_txns account_month_txns_src_10012 ) subq_0 ) subq_1 ) subq_2 @@ -126,22 +126,22 @@ FROM ( FROM ( -- Read Elements From Data Source 'bridge_table' SELECT - bridge_table_src_10011.extra_dim - , bridge_table_src_10011.ds_partitioned - , DATE_TRUNC('week', bridge_table_src_10011.ds_partitioned) AS ds_partitioned__week - , DATE_TRUNC('month', bridge_table_src_10011.ds_partitioned) AS ds_partitioned__month - , DATE_TRUNC('quarter', bridge_table_src_10011.ds_partitioned) AS ds_partitioned__quarter - , DATE_TRUNC('year', bridge_table_src_10011.ds_partitioned) AS ds_partitioned__year - , bridge_table_src_10011.extra_dim AS account_id__extra_dim - , bridge_table_src_10011.ds_partitioned AS account_id__ds_partitioned - , DATE_TRUNC('week', bridge_table_src_10011.ds_partitioned) AS account_id__ds_partitioned__week - , DATE_TRUNC('month', bridge_table_src_10011.ds_partitioned) AS account_id__ds_partitioned__month - , DATE_TRUNC('quarter', bridge_table_src_10011.ds_partitioned) AS account_id__ds_partitioned__quarter - , DATE_TRUNC('year', bridge_table_src_10011.ds_partitioned) AS account_id__ds_partitioned__year - , bridge_table_src_10011.account_id - , bridge_table_src_10011.customer_id - , bridge_table_src_10011.customer_id AS account_id__customer_id - FROM ***************************.bridge_table bridge_table_src_10011 + bridge_table_src_10013.extra_dim + , bridge_table_src_10013.ds_partitioned + , DATE_TRUNC('week', bridge_table_src_10013.ds_partitioned) AS ds_partitioned__week + , DATE_TRUNC('month', bridge_table_src_10013.ds_partitioned) AS ds_partitioned__month + , DATE_TRUNC('quarter', bridge_table_src_10013.ds_partitioned) AS ds_partitioned__quarter + , DATE_TRUNC('year', bridge_table_src_10013.ds_partitioned) AS ds_partitioned__year + , bridge_table_src_10013.extra_dim AS account_id__extra_dim + , bridge_table_src_10013.ds_partitioned AS account_id__ds_partitioned + , DATE_TRUNC('week', bridge_table_src_10013.ds_partitioned) AS account_id__ds_partitioned__week + , DATE_TRUNC('month', bridge_table_src_10013.ds_partitioned) AS account_id__ds_partitioned__month + , DATE_TRUNC('quarter', bridge_table_src_10013.ds_partitioned) AS account_id__ds_partitioned__quarter + , DATE_TRUNC('year', bridge_table_src_10013.ds_partitioned) AS account_id__ds_partitioned__year + , bridge_table_src_10013.account_id + , bridge_table_src_10013.customer_id + , bridge_table_src_10013.customer_id AS account_id__customer_id + FROM ***************************.bridge_table bridge_table_src_10013 ) subq_3 LEFT OUTER JOIN ( -- Pass Only Elements: @@ -179,22 +179,22 @@ FROM ( FROM ( -- Read Elements From Data Source 'customer_table' SELECT - customer_table_src_10013.customer_name - , customer_table_src_10013.customer_atomic_weight - , customer_table_src_10013.ds_partitioned - , DATE_TRUNC('week', customer_table_src_10013.ds_partitioned) AS ds_partitioned__week - , DATE_TRUNC('month', customer_table_src_10013.ds_partitioned) AS ds_partitioned__month - , DATE_TRUNC('quarter', customer_table_src_10013.ds_partitioned) AS ds_partitioned__quarter - , DATE_TRUNC('year', customer_table_src_10013.ds_partitioned) AS ds_partitioned__year - , customer_table_src_10013.customer_name AS customer_id__customer_name - , customer_table_src_10013.customer_atomic_weight AS customer_id__customer_atomic_weight - , customer_table_src_10013.ds_partitioned AS customer_id__ds_partitioned - , DATE_TRUNC('week', customer_table_src_10013.ds_partitioned) AS customer_id__ds_partitioned__week - , DATE_TRUNC('month', customer_table_src_10013.ds_partitioned) AS customer_id__ds_partitioned__month - , DATE_TRUNC('quarter', customer_table_src_10013.ds_partitioned) AS customer_id__ds_partitioned__quarter - , DATE_TRUNC('year', customer_table_src_10013.ds_partitioned) AS customer_id__ds_partitioned__year - , customer_table_src_10013.customer_id - FROM ***************************.customer_table customer_table_src_10013 + customer_table_src_10015.customer_name + , customer_table_src_10015.customer_atomic_weight + , customer_table_src_10015.ds_partitioned + , DATE_TRUNC('week', customer_table_src_10015.ds_partitioned) AS ds_partitioned__week + , DATE_TRUNC('month', customer_table_src_10015.ds_partitioned) AS ds_partitioned__month + , DATE_TRUNC('quarter', customer_table_src_10015.ds_partitioned) AS ds_partitioned__quarter + , DATE_TRUNC('year', customer_table_src_10015.ds_partitioned) AS ds_partitioned__year + , customer_table_src_10015.customer_name AS customer_id__customer_name + , customer_table_src_10015.customer_atomic_weight AS customer_id__customer_atomic_weight + , customer_table_src_10015.ds_partitioned AS customer_id__ds_partitioned + , DATE_TRUNC('week', customer_table_src_10015.ds_partitioned) AS customer_id__ds_partitioned__week + , DATE_TRUNC('month', customer_table_src_10015.ds_partitioned) AS customer_id__ds_partitioned__month + , DATE_TRUNC('quarter', customer_table_src_10015.ds_partitioned) AS customer_id__ds_partitioned__quarter + , DATE_TRUNC('year', customer_table_src_10015.ds_partitioned) AS customer_id__ds_partitioned__year + , customer_table_src_10015.customer_id + FROM ***************************.customer_table customer_table_src_10015 ) subq_4 ) subq_5 ON diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multihop_node__plan0_optimized.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multihop_node__plan0_optimized.sql index 1bd003f415..d64e2a881b 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multihop_node__plan0_optimized.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multihop_node__plan0_optimized.sql @@ -5,31 +5,31 @@ -- Compute Metrics via Expressions SELECT subq_18.customer_id__customer_name AS account_id__customer_id__customer_name - , SUM(account_month_txns_src_10010.txn_count) AS txn_count -FROM ***************************.account_month_txns account_month_txns_src_10010 + , SUM(account_month_txns_src_10012.txn_count) AS txn_count +FROM ***************************.account_month_txns account_month_txns_src_10012 LEFT OUTER JOIN ( -- Join Standard Outputs -- Pass Only Elements: -- ['customer_id__customer_name', 'ds_partitioned', 'account_id'] SELECT - bridge_table_src_10011.ds_partitioned AS ds_partitioned - , bridge_table_src_10011.account_id AS account_id - , customer_table_src_10013.customer_name AS customer_id__customer_name - FROM ***************************.bridge_table bridge_table_src_10011 + bridge_table_src_10013.ds_partitioned AS ds_partitioned + , bridge_table_src_10013.account_id AS account_id + , customer_table_src_10015.customer_name AS customer_id__customer_name + FROM ***************************.bridge_table bridge_table_src_10013 LEFT OUTER JOIN - ***************************.customer_table customer_table_src_10013 + ***************************.customer_table customer_table_src_10015 ON ( - bridge_table_src_10011.customer_id = customer_table_src_10013.customer_id + bridge_table_src_10013.customer_id = customer_table_src_10015.customer_id ) AND ( - bridge_table_src_10011.ds_partitioned = customer_table_src_10013.ds_partitioned + bridge_table_src_10013.ds_partitioned = customer_table_src_10015.ds_partitioned ) ) subq_18 ON ( - account_month_txns_src_10010.account_id = subq_18.account_id + account_month_txns_src_10012.account_id = subq_18.account_id ) AND ( - account_month_txns_src_10010.ds_partitioned = subq_18.ds_partitioned + account_month_txns_src_10012.ds_partitioned = subq_18.ds_partitioned ) GROUP BY subq_18.customer_id__customer_name diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multiple_metrics_no_dimensions__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multiple_metrics_no_dimensions__plan0.sql index b8f4022147..5092cd4b7f 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multiple_metrics_no_dimensions__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multiple_metrics_no_dimensions__plan0.sql @@ -284,38 +284,38 @@ CROSS JOIN ( -- Read Elements From Data Source 'listings_latest' SELECT 1 AS listings - , listings_latest_src_10004.capacity AS largest_listing - , listings_latest_src_10004.capacity AS smallest_listing - , listings_latest_src_10004.created_at AS ds - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS ds__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS ds__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS ds__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS ds__year - , listings_latest_src_10004.created_at - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS created_at__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS created_at__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS created_at__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS created_at__year - , listings_latest_src_10004.country AS country_latest - , listings_latest_src_10004.is_lux AS is_lux_latest - , listings_latest_src_10004.capacity AS capacity_latest - , listings_latest_src_10004.created_at AS listing__ds - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS listing__ds__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS listing__ds__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS listing__ds__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS listing__ds__year - , listings_latest_src_10004.created_at AS listing__created_at - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS listing__created_at__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS listing__created_at__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS listing__created_at__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS listing__created_at__year - , listings_latest_src_10004.country AS listing__country_latest - , listings_latest_src_10004.is_lux AS listing__is_lux_latest - , listings_latest_src_10004.capacity AS listing__capacity_latest - , listings_latest_src_10004.listing_id AS listing - , listings_latest_src_10004.user_id AS user - , listings_latest_src_10004.user_id AS listing__user - FROM ***************************.dim_listings_latest listings_latest_src_10004 + , listings_latest_src_10005.capacity AS largest_listing + , listings_latest_src_10005.capacity AS smallest_listing + , listings_latest_src_10005.created_at AS ds + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS ds__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS ds__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS ds__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS ds__year + , listings_latest_src_10005.created_at + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS created_at__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS created_at__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS created_at__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS created_at__year + , listings_latest_src_10005.country AS country_latest + , listings_latest_src_10005.is_lux AS is_lux_latest + , listings_latest_src_10005.capacity AS capacity_latest + , listings_latest_src_10005.created_at AS listing__ds + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS listing__ds__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS listing__ds__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS listing__ds__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS listing__ds__year + , listings_latest_src_10005.created_at AS listing__created_at + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS listing__created_at__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS listing__created_at__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS listing__created_at__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS listing__created_at__year + , listings_latest_src_10005.country AS listing__country_latest + , listings_latest_src_10005.is_lux AS listing__is_lux_latest + , listings_latest_src_10005.capacity AS listing__capacity_latest + , listings_latest_src_10005.listing_id AS listing + , listings_latest_src_10005.user_id AS user + , listings_latest_src_10005.user_id AS listing__user + FROM ***************************.dim_listings_latest listings_latest_src_10005 ) subq_5 ) subq_6 WHERE subq_6.metric_time BETWEEN CAST('2020-01-01' AS TIMESTAMP) AND CAST('2020-01-01' AS TIMESTAMP) diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multiple_metrics_no_dimensions__plan0_optimized.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multiple_metrics_no_dimensions__plan0_optimized.sql index 73f82abe2b..e687b557f2 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multiple_metrics_no_dimensions__plan0_optimized.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_multiple_metrics_no_dimensions__plan0_optimized.sql @@ -28,6 +28,6 @@ CROSS JOIN ( -- Compute Metrics via Expressions SELECT SUM(1) AS listings - FROM ***************************.dim_listings_latest listings_latest_src_10004 + FROM ***************************.dim_listings_latest listings_latest_src_10005 WHERE created_at BETWEEN CAST('2020-01-01' AS TIMESTAMP) AND CAST('2020-01-01' AS TIMESTAMP) ) subq_23 diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_partitioned_join__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_partitioned_join__plan0.sql index a664f1546a..8d3716a98c 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_partitioned_join__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_partitioned_join__plan0.sql @@ -66,32 +66,32 @@ FROM ( -- Read Elements From Data Source 'id_verifications' SELECT 1 AS identity_verifications - , id_verifications_src_10003.ds - , DATE_TRUNC('week', id_verifications_src_10003.ds) AS ds__week - , DATE_TRUNC('month', id_verifications_src_10003.ds) AS ds__month - , DATE_TRUNC('quarter', id_verifications_src_10003.ds) AS ds__quarter - , DATE_TRUNC('year', id_verifications_src_10003.ds) AS ds__year - , id_verifications_src_10003.ds_partitioned - , DATE_TRUNC('week', id_verifications_src_10003.ds_partitioned) AS ds_partitioned__week - , DATE_TRUNC('month', id_verifications_src_10003.ds_partitioned) AS ds_partitioned__month - , DATE_TRUNC('quarter', id_verifications_src_10003.ds_partitioned) AS ds_partitioned__quarter - , DATE_TRUNC('year', id_verifications_src_10003.ds_partitioned) AS ds_partitioned__year - , id_verifications_src_10003.verification_type - , id_verifications_src_10003.ds AS verification__ds - , DATE_TRUNC('week', id_verifications_src_10003.ds) AS verification__ds__week - , DATE_TRUNC('month', id_verifications_src_10003.ds) AS verification__ds__month - , DATE_TRUNC('quarter', id_verifications_src_10003.ds) AS verification__ds__quarter - , DATE_TRUNC('year', id_verifications_src_10003.ds) AS verification__ds__year - , id_verifications_src_10003.ds_partitioned AS verification__ds_partitioned - , DATE_TRUNC('week', id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__week - , DATE_TRUNC('month', id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__month - , DATE_TRUNC('quarter', id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__quarter - , DATE_TRUNC('year', id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__year - , id_verifications_src_10003.verification_type AS verification__verification_type - , id_verifications_src_10003.verification_id AS verification - , id_verifications_src_10003.user_id AS user - , id_verifications_src_10003.user_id AS verification__user - FROM ***************************.fct_id_verifications id_verifications_src_10003 + , id_verifications_src_10004.ds + , DATE_TRUNC('week', id_verifications_src_10004.ds) AS ds__week + , DATE_TRUNC('month', id_verifications_src_10004.ds) AS ds__month + , DATE_TRUNC('quarter', id_verifications_src_10004.ds) AS ds__quarter + , DATE_TRUNC('year', id_verifications_src_10004.ds) AS ds__year + , id_verifications_src_10004.ds_partitioned + , DATE_TRUNC('week', id_verifications_src_10004.ds_partitioned) AS ds_partitioned__week + , DATE_TRUNC('month', id_verifications_src_10004.ds_partitioned) AS ds_partitioned__month + , DATE_TRUNC('quarter', id_verifications_src_10004.ds_partitioned) AS ds_partitioned__quarter + , DATE_TRUNC('year', id_verifications_src_10004.ds_partitioned) AS ds_partitioned__year + , id_verifications_src_10004.verification_type + , id_verifications_src_10004.ds AS verification__ds + , DATE_TRUNC('week', id_verifications_src_10004.ds) AS verification__ds__week + , DATE_TRUNC('month', id_verifications_src_10004.ds) AS verification__ds__month + , DATE_TRUNC('quarter', id_verifications_src_10004.ds) AS verification__ds__quarter + , DATE_TRUNC('year', id_verifications_src_10004.ds) AS verification__ds__year + , id_verifications_src_10004.ds_partitioned AS verification__ds_partitioned + , DATE_TRUNC('week', id_verifications_src_10004.ds_partitioned) AS verification__ds_partitioned__week + , DATE_TRUNC('month', id_verifications_src_10004.ds_partitioned) AS verification__ds_partitioned__month + , DATE_TRUNC('quarter', id_verifications_src_10004.ds_partitioned) AS verification__ds_partitioned__quarter + , DATE_TRUNC('year', id_verifications_src_10004.ds_partitioned) AS verification__ds_partitioned__year + , id_verifications_src_10004.verification_type AS verification__verification_type + , id_verifications_src_10004.verification_id AS verification + , id_verifications_src_10004.user_id AS user + , id_verifications_src_10004.user_id AS verification__user + FROM ***************************.fct_id_verifications id_verifications_src_10004 ) subq_0 ) subq_1 ) subq_2 @@ -105,40 +105,40 @@ FROM ( FROM ( -- Read Elements From Data Source 'users_ds_source' SELECT - users_ds_source_src_10007.ds - , DATE_TRUNC('week', users_ds_source_src_10007.ds) AS ds__week - , DATE_TRUNC('month', users_ds_source_src_10007.ds) AS ds__month - , DATE_TRUNC('quarter', users_ds_source_src_10007.ds) AS ds__quarter - , DATE_TRUNC('year', users_ds_source_src_10007.ds) AS ds__year - , users_ds_source_src_10007.created_at - , DATE_TRUNC('week', users_ds_source_src_10007.created_at) AS created_at__week - , DATE_TRUNC('month', users_ds_source_src_10007.created_at) AS created_at__month - , DATE_TRUNC('quarter', users_ds_source_src_10007.created_at) AS created_at__quarter - , DATE_TRUNC('year', users_ds_source_src_10007.created_at) AS created_at__year - , users_ds_source_src_10007.ds_partitioned - , DATE_TRUNC('week', users_ds_source_src_10007.ds_partitioned) AS ds_partitioned__week - , DATE_TRUNC('month', users_ds_source_src_10007.ds_partitioned) AS ds_partitioned__month - , DATE_TRUNC('quarter', users_ds_source_src_10007.ds_partitioned) AS ds_partitioned__quarter - , DATE_TRUNC('year', users_ds_source_src_10007.ds_partitioned) AS ds_partitioned__year - , users_ds_source_src_10007.home_state - , users_ds_source_src_10007.ds AS user__ds - , DATE_TRUNC('week', users_ds_source_src_10007.ds) AS user__ds__week - , DATE_TRUNC('month', users_ds_source_src_10007.ds) AS user__ds__month - , DATE_TRUNC('quarter', users_ds_source_src_10007.ds) AS user__ds__quarter - , DATE_TRUNC('year', users_ds_source_src_10007.ds) AS user__ds__year - , users_ds_source_src_10007.created_at AS user__created_at - , DATE_TRUNC('week', users_ds_source_src_10007.created_at) AS user__created_at__week - , DATE_TRUNC('month', users_ds_source_src_10007.created_at) AS user__created_at__month - , DATE_TRUNC('quarter', users_ds_source_src_10007.created_at) AS user__created_at__quarter - , DATE_TRUNC('year', users_ds_source_src_10007.created_at) AS user__created_at__year - , users_ds_source_src_10007.ds_partitioned AS user__ds_partitioned - , DATE_TRUNC('week', users_ds_source_src_10007.ds_partitioned) AS user__ds_partitioned__week - , DATE_TRUNC('month', users_ds_source_src_10007.ds_partitioned) AS user__ds_partitioned__month - , DATE_TRUNC('quarter', users_ds_source_src_10007.ds_partitioned) AS user__ds_partitioned__quarter - , DATE_TRUNC('year', users_ds_source_src_10007.ds_partitioned) AS user__ds_partitioned__year - , users_ds_source_src_10007.home_state AS user__home_state - , users_ds_source_src_10007.user_id AS user - FROM ***************************.dim_users users_ds_source_src_10007 + users_ds_source_src_10008.ds + , DATE_TRUNC('week', users_ds_source_src_10008.ds) AS ds__week + , DATE_TRUNC('month', users_ds_source_src_10008.ds) AS ds__month + , DATE_TRUNC('quarter', users_ds_source_src_10008.ds) AS ds__quarter + , DATE_TRUNC('year', users_ds_source_src_10008.ds) AS ds__year + , users_ds_source_src_10008.created_at + , DATE_TRUNC('week', users_ds_source_src_10008.created_at) AS created_at__week + , DATE_TRUNC('month', users_ds_source_src_10008.created_at) AS created_at__month + , DATE_TRUNC('quarter', users_ds_source_src_10008.created_at) AS created_at__quarter + , DATE_TRUNC('year', users_ds_source_src_10008.created_at) AS created_at__year + , users_ds_source_src_10008.ds_partitioned + , DATE_TRUNC('week', users_ds_source_src_10008.ds_partitioned) AS ds_partitioned__week + , DATE_TRUNC('month', users_ds_source_src_10008.ds_partitioned) AS ds_partitioned__month + , DATE_TRUNC('quarter', users_ds_source_src_10008.ds_partitioned) AS ds_partitioned__quarter + , DATE_TRUNC('year', users_ds_source_src_10008.ds_partitioned) AS ds_partitioned__year + , users_ds_source_src_10008.home_state + , users_ds_source_src_10008.ds AS user__ds + , DATE_TRUNC('week', users_ds_source_src_10008.ds) AS user__ds__week + , DATE_TRUNC('month', users_ds_source_src_10008.ds) AS user__ds__month + , DATE_TRUNC('quarter', users_ds_source_src_10008.ds) AS user__ds__quarter + , DATE_TRUNC('year', users_ds_source_src_10008.ds) AS user__ds__year + , users_ds_source_src_10008.created_at AS user__created_at + , DATE_TRUNC('week', users_ds_source_src_10008.created_at) AS user__created_at__week + , DATE_TRUNC('month', users_ds_source_src_10008.created_at) AS user__created_at__month + , DATE_TRUNC('quarter', users_ds_source_src_10008.created_at) AS user__created_at__quarter + , DATE_TRUNC('year', users_ds_source_src_10008.created_at) AS user__created_at__year + , users_ds_source_src_10008.ds_partitioned AS user__ds_partitioned + , DATE_TRUNC('week', users_ds_source_src_10008.ds_partitioned) AS user__ds_partitioned__week + , DATE_TRUNC('month', users_ds_source_src_10008.ds_partitioned) AS user__ds_partitioned__month + , DATE_TRUNC('quarter', users_ds_source_src_10008.ds_partitioned) AS user__ds_partitioned__quarter + , DATE_TRUNC('year', users_ds_source_src_10008.ds_partitioned) AS user__ds_partitioned__year + , users_ds_source_src_10008.home_state AS user__home_state + , users_ds_source_src_10008.user_id AS user + FROM ***************************.dim_users users_ds_source_src_10008 ) subq_3 ) subq_4 ON diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_partitioned_join__plan0_optimized.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_partitioned_join__plan0_optimized.sql index 5820233b25..9b594d5d61 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_partitioned_join__plan0_optimized.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_partitioned_join__plan0_optimized.sql @@ -4,7 +4,7 @@ -- Aggregate Measures -- Compute Metrics via Expressions SELECT - users_ds_source_src_10007.home_state AS user__home_state + users_ds_source_src_10008.home_state AS user__home_state , SUM(subq_10.identity_verifications) AS identity_verifications FROM ( -- Read Elements From Data Source 'id_verifications' @@ -15,15 +15,15 @@ FROM ( ds_partitioned , user_id AS user , 1 AS identity_verifications - FROM ***************************.fct_id_verifications id_verifications_src_10003 + FROM ***************************.fct_id_verifications id_verifications_src_10004 ) subq_10 LEFT OUTER JOIN - ***************************.dim_users users_ds_source_src_10007 + ***************************.dim_users users_ds_source_src_10008 ON ( - subq_10.user = users_ds_source_src_10007.user_id + subq_10.user = users_ds_source_src_10008.user_id ) AND ( - subq_10.ds_partitioned = users_ds_source_src_10007.ds_partitioned + subq_10.ds_partitioned = users_ds_source_src_10008.ds_partitioned ) GROUP BY - users_ds_source_src_10007.home_state + users_ds_source_src_10008.home_state diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_single_join_node__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_single_join_node__plan0.sql index 458cbdc78e..07cc948b6f 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_single_join_node__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_single_join_node__plan0.sql @@ -76,38 +76,38 @@ LEFT OUTER JOIN ( -- Read Elements From Data Source 'listings_latest' SELECT 1 AS listings - , listings_latest_src_10004.capacity AS largest_listing - , listings_latest_src_10004.capacity AS smallest_listing - , listings_latest_src_10004.created_at AS ds - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS ds__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS ds__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS ds__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS ds__year - , listings_latest_src_10004.created_at - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS created_at__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS created_at__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS created_at__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS created_at__year - , listings_latest_src_10004.country AS country_latest - , listings_latest_src_10004.is_lux AS is_lux_latest - , listings_latest_src_10004.capacity AS capacity_latest - , listings_latest_src_10004.created_at AS listing__ds - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS listing__ds__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS listing__ds__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS listing__ds__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS listing__ds__year - , listings_latest_src_10004.created_at AS listing__created_at - , DATE_TRUNC('week', listings_latest_src_10004.created_at) AS listing__created_at__week - , DATE_TRUNC('month', listings_latest_src_10004.created_at) AS listing__created_at__month - , DATE_TRUNC('quarter', listings_latest_src_10004.created_at) AS listing__created_at__quarter - , DATE_TRUNC('year', listings_latest_src_10004.created_at) AS listing__created_at__year - , listings_latest_src_10004.country AS listing__country_latest - , listings_latest_src_10004.is_lux AS listing__is_lux_latest - , listings_latest_src_10004.capacity AS listing__capacity_latest - , listings_latest_src_10004.listing_id AS listing - , listings_latest_src_10004.user_id AS user - , listings_latest_src_10004.user_id AS listing__user - FROM ***************************.dim_listings_latest listings_latest_src_10004 + , listings_latest_src_10005.capacity AS largest_listing + , listings_latest_src_10005.capacity AS smallest_listing + , listings_latest_src_10005.created_at AS ds + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS ds__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS ds__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS ds__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS ds__year + , listings_latest_src_10005.created_at + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS created_at__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS created_at__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS created_at__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS created_at__year + , listings_latest_src_10005.country AS country_latest + , listings_latest_src_10005.is_lux AS is_lux_latest + , listings_latest_src_10005.capacity AS capacity_latest + , listings_latest_src_10005.created_at AS listing__ds + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS listing__ds__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS listing__ds__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS listing__ds__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS listing__ds__year + , listings_latest_src_10005.created_at AS listing__created_at + , DATE_TRUNC('week', listings_latest_src_10005.created_at) AS listing__created_at__week + , DATE_TRUNC('month', listings_latest_src_10005.created_at) AS listing__created_at__month + , DATE_TRUNC('quarter', listings_latest_src_10005.created_at) AS listing__created_at__quarter + , DATE_TRUNC('year', listings_latest_src_10005.created_at) AS listing__created_at__year + , listings_latest_src_10005.country AS listing__country_latest + , listings_latest_src_10005.is_lux AS listing__is_lux_latest + , listings_latest_src_10005.capacity AS listing__capacity_latest + , listings_latest_src_10005.listing_id AS listing + , listings_latest_src_10005.user_id AS user + , listings_latest_src_10005.user_id AS listing__user + FROM ***************************.dim_listings_latest listings_latest_src_10005 ) subq_2 ) subq_3 ON diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_single_join_node__plan0_optimized.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_single_join_node__plan0_optimized.sql index 3a3acc15c9..9e84b7a7a8 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_single_join_node__plan0_optimized.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDbSqlClient/test_single_join_node__plan0_optimized.sql @@ -1,7 +1,7 @@ -- Join Standard Outputs SELECT subq_5.listing AS listing - , listings_latest_src_10004.country AS listing__country_latest + , listings_latest_src_10005.country AS listing__country_latest , subq_5.bookings AS bookings FROM ( -- Read Elements From Data Source 'bookings_source' @@ -16,6 +16,6 @@ FROM ( ) bookings_source_src_10001 ) subq_5 LEFT OUTER JOIN - ***************************.dim_listings_latest listings_latest_src_10004 + ***************************.dim_listings_latest listings_latest_src_10005 ON - subq_5.listing = listings_latest_src_10004.listing_id + subq_5.listing = listings_latest_src_10005.listing_id diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_common_data_source__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_common_data_source__plan0.xml index a480efceb7..3aa16b73c5 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_common_data_source__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_common_data_source__plan0.xml @@ -1,285 +1,290 @@ - + - + - + - + - + + - + - + - + - + + - + - + - + - + + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -477,6 +482,7 @@ + @@ -488,262 +494,266 @@ - + - + - + - + + - + - + - + - + + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -941,6 +951,7 @@ + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_composite_identifier__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_composite_identifier__plan0.xml index 86cf3e8089..0c6730a8b3 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_composite_identifier__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_composite_identifier__plan0.xml @@ -16,6 +16,7 @@ + @@ -41,6 +42,7 @@ + @@ -60,6 +62,7 @@ + @@ -155,85 +158,87 @@ - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_composite_identifier_with_join__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_composite_identifier_with_join__plan0.xml index 98f6eb2e08..0aa957c4df 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_composite_identifier_with_join__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_composite_identifier_with_join__plan0.xml @@ -20,6 +20,7 @@ + @@ -53,6 +54,7 @@ + @@ -76,6 +78,7 @@ + @@ -103,6 +106,7 @@ + @@ -122,6 +126,7 @@ + @@ -217,85 +222,87 @@ - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -321,185 +328,187 @@ - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_composite_identifier_with_order_by__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_composite_identifier_with_order_by__plan0.xml index 13ec116169..e20e72bd07 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_composite_identifier_with_order_by__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_composite_identifier_with_order_by__plan0.xml @@ -24,6 +24,7 @@ + @@ -41,6 +42,7 @@ + @@ -66,6 +68,7 @@ + @@ -85,6 +88,7 @@ + @@ -180,85 +184,87 @@ - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node__plan0.xml index aa27b182da..7c44f36302 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node__plan0.xml @@ -16,6 +16,7 @@ + @@ -41,6 +42,7 @@ + @@ -64,6 +66,7 @@ + @@ -79,6 +82,7 @@ + @@ -276,6 +280,7 @@ + @@ -295,141 +300,143 @@ - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node_ratio_from_multiple_data_sources__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node_ratio_from_multiple_data_sources__plan0.xml index 1d638c18e1..697386249c 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node_ratio_from_multiple_data_sources__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node_ratio_from_multiple_data_sources__plan0.xml @@ -1,374 +1,382 @@ - + - + - + - + + - + - + - + - + - + - + + - + - + - + - + - + - + - + + - + - + - + - + - + - + + - + - + - + - + - + + - + - + - + - + - + - + - + + - + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -566,6 +574,7 @@ + @@ -577,303 +586,306 @@ - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -887,335 +899,341 @@ - + - + - + - + - + - + + - + - + - + - + - + + - + - + - + - + - + - + - + + - + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - + @@ -1224,303 +1242,306 @@ - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node_ratio_from_single_data_source__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node_ratio_from_single_data_source__plan0.xml index 87736d9e93..a7d32c35ec 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node_ratio_from_single_data_source__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node_ratio_from_single_data_source__plan0.xml @@ -16,6 +16,7 @@ + @@ -45,6 +46,7 @@ + @@ -72,6 +74,7 @@ + @@ -91,6 +94,7 @@ + @@ -288,6 +292,7 @@ + @@ -307,141 +312,143 @@ - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node_simple_expr__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node_simple_expr__plan0.xml index 67c7193c3e..93f422ea6c 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node_simple_expr__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node_simple_expr__plan0.xml @@ -16,6 +16,7 @@ + @@ -41,6 +42,7 @@ + @@ -64,6 +66,7 @@ + @@ -79,6 +82,7 @@ + @@ -276,6 +280,7 @@ + @@ -295,141 +300,143 @@ - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_constrain_time_range_node__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_constrain_time_range_node__plan0.xml index 347e5ab422..ccb55cefb3 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_constrain_time_range_node__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_constrain_time_range_node__plan0.xml @@ -17,6 +17,7 @@ + @@ -34,6 +35,7 @@ + @@ -49,6 +51,7 @@ + @@ -246,6 +249,7 @@ + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric__plan0.xml index 61ca539dfc..5792e5820d 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric__plan0.xml @@ -1,138 +1,143 @@ - + - + - + - + + - + - + - + - + + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - + - + - + - + - + - + - + - + - + + - + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_grain_to_date__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_grain_to_date__plan0.xml index 4f0a3a64ca..5863d36959 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_grain_to_date__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_grain_to_date__plan0.xml @@ -1,138 +1,143 @@ - + - + - + - + + - + - + - + - + + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - + - + - + - + - + - + - + - + - + + - + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_no_ds__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_no_ds__plan0.xml index 524b3e9746..335417cd6f 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_no_ds__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_no_ds__plan0.xml @@ -1,122 +1,127 @@ - + - + - + + - + - + + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - + - + - + - + - + - + - + - + - + + - + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_no_window__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_no_window__plan0.xml index 8f23dad803..5c8df0eecf 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_no_window__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_no_window__plan0.xml @@ -1,138 +1,143 @@ - + - + - + - + + - + - + - + - + + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - + - + - + - + - + - + - + - + - + + - + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_no_window_with_time_constraint__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_no_window_with_time_constraint__plan0.xml index 3a0eabc5d9..88bd7fbf17 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_no_window_with_time_constraint__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_no_window_with_time_constraint__plan0.xml @@ -1,192 +1,198 @@ - + - + - + - + + - + - + - + - + + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - + - + - + - + - + - + - + - + - + + - + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_with_time_constraint__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_with_time_constraint__plan0.xml index c82fcc4aaa..d912a47d0e 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_with_time_constraint__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_with_time_constraint__plan0.xml @@ -1,192 +1,198 @@ - + - + - + - + + - + - + - + - + + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - + - + - + - + - + - + - + - + - + + - + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_derived_metric__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_derived_metric__plan0.xml index 4bea59c302..1df54ed5c7 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_derived_metric__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_derived_metric__plan0.xml @@ -1,298 +1,304 @@ - + - + - + + - + - + - + - + - + + - + - + - + - + + - + - + - + - + + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -490,6 +496,7 @@ + @@ -501,262 +508,266 @@ - + - + - + - + + - + - + - + - + + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -954,6 +965,7 @@ + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_distinct_values__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_distinct_values__plan0.xml index 8de25306ea..7a4b9f99c8 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_distinct_values__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_distinct_values__plan0.xml @@ -1,324 +1,332 @@ - + - + - + - + + - + - + - + + - + - + - + - + + - + - + - + - + + - + - + - + - + + - + - + - + - + - + - + + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -516,6 +524,7 @@ + @@ -527,303 +536,306 @@ - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_filter_node__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_filter_node__plan0.xml index 46e9f5983a..94395ca542 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_filter_node__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_filter_node__plan0.xml @@ -10,6 +10,7 @@ + @@ -207,6 +208,7 @@ + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_filter_with_where_constraint_node__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_filter_with_where_constraint_node__plan0.xml index dbaa571130..a14130b8cb 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_filter_with_where_constraint_node__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_filter_with_where_constraint_node__plan0.xml @@ -13,6 +13,7 @@ + @@ -28,6 +29,7 @@ + @@ -225,6 +227,7 @@ + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_filter_with_where_constraint_on_join_dim__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_filter_with_where_constraint_on_join_dim__plan0.xml index bc53b841a8..d4d7230203 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_filter_with_where_constraint_on_join_dim__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_filter_with_where_constraint_on_join_dim__plan0.xml @@ -1,345 +1,353 @@ - + - + - + - + + - + - + - + - + + - + - + - + - + + - + - + - + - + - + + - + - + - + - + - + + - + - + - + - + - + - + - + + - + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -537,6 +545,7 @@ + @@ -548,303 +557,306 @@ - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_join_conversion_events_node__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_join_conversion_events_node__plan0.xml new file mode 100644 index 0000000000..587d6165e5 --- /dev/null +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_join_conversion_events_node__plan0.xml @@ -0,0 +1,241 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_join_to_scd_dimension__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_join_to_scd_dimension__plan0.xml index fc0037ebfc..a68ad5fcdb 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_join_to_scd_dimension__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_join_to_scd_dimension__plan0.xml @@ -12,6 +12,7 @@ + @@ -29,6 +30,7 @@ + @@ -44,6 +46,7 @@ + @@ -62,6 +65,7 @@ + @@ -81,6 +85,7 @@ + @@ -116,6 +121,7 @@ + @@ -135,6 +141,7 @@ + @@ -258,117 +265,119 @@ - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -398,129 +407,131 @@ - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_limit_rows__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_limit_rows__plan0.xml index ca80767100..84e02be46b 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_limit_rows__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_limit_rows__plan0.xml @@ -1,275 +1,280 @@ - + - + - + - + + - + - + - + - + + - + - + - + - + + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -467,6 +472,7 @@ + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_local_dimension_using_local_identifier__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_local_dimension_using_local_identifier__plan0.xml index feeb1adfcb..893037d84d 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_local_dimension_using_local_identifier__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_local_dimension_using_local_identifier__plan0.xml @@ -1,335 +1,340 @@ - + - + - + - + + - + - + - + - + + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_measure_aggregation_node__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_measure_aggregation_node__plan0.xml index eed275d38c..28bd8ea49c 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_measure_aggregation_node__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_measure_aggregation_node__plan0.xml @@ -20,6 +20,7 @@ + @@ -43,6 +44,7 @@ + @@ -240,6 +242,7 @@ + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_measure_constraint__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_measure_constraint__plan0.xml index c725852208..8465ef7da1 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_measure_constraint__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_measure_constraint__plan0.xml @@ -1,73 +1,76 @@ - + - + - + + - + - + - + - + - + - + + - + - + - + - + - + - + - + + - + - + @@ -77,343 +80,350 @@ - + - + + - + - + - + - + - + + - + - + - + - + - + - + + - + - + - + - + - + - + + - + - + - + - + - + - + - + - + + - + - + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -611,6 +621,7 @@ + @@ -622,303 +633,306 @@ - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -934,249 +948,252 @@ - + - + - + - + + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -1374,6 +1391,7 @@ + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_measure_constraint_with_reused_measure__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_measure_constraint_with_reused_measure__plan0.xml index 8e83b2d0e4..9a59dd9e30 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_measure_constraint_with_reused_measure__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_measure_constraint_with_reused_measure__plan0.xml @@ -1,340 +1,348 @@ - + - + - + + - + - + - + - + - + + - + - + - + - + - + - + + - + - + - + - + + - + - + - + - + + - + - + - + - + - + + - + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -532,6 +540,7 @@ + @@ -544,249 +553,252 @@ - + - + - + - + + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -984,6 +996,7 @@ + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_measure_constraint_with_single_expr_and_alias__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_measure_constraint_with_single_expr_and_alias__plan0.xml index 23783414ab..2988db2729 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_measure_constraint_with_single_expr_and_alias__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_measure_constraint_with_single_expr_and_alias__plan0.xml @@ -1,298 +1,304 @@ - + - + - + + - + - + - + - + + - + - + - + - + + - + - + - + - + - + + - + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -490,6 +496,7 @@ + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.xml index 7ab9db8261..64dc21984a 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.xml @@ -1,280 +1,286 @@ - + - + + - + - + - + - + + - + - + - + - + - + + - + - + + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -472,6 +478,7 @@ + @@ -482,310 +489,314 @@ - + - + + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_multi_hop_through_scd_dimension__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_multi_hop_through_scd_dimension__plan0.xml index 020070e828..53f1ba1049 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_multi_hop_through_scd_dimension__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_multi_hop_through_scd_dimension__plan0.xml @@ -16,6 +16,7 @@ + @@ -41,6 +42,7 @@ + @@ -60,6 +62,7 @@ + @@ -95,6 +98,7 @@ + @@ -114,6 +118,7 @@ + @@ -237,117 +242,119 @@ - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -379,6 +386,7 @@ + @@ -522,7 +530,7 @@ - + @@ -530,127 +538,129 @@ + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -726,65 +736,67 @@ - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_multi_hop_to_scd_dimension__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_multi_hop_to_scd_dimension__plan0.xml index e19de4764f..0ee0e06a2a 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_multi_hop_to_scd_dimension__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_multi_hop_to_scd_dimension__plan0.xml @@ -16,6 +16,7 @@ + @@ -41,6 +42,7 @@ + @@ -60,6 +62,7 @@ + @@ -95,6 +98,7 @@ + @@ -114,6 +118,7 @@ + @@ -237,117 +242,119 @@ - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -382,6 +389,7 @@ + @@ -441,7 +449,7 @@ - + @@ -449,23 +457,25 @@ + - + - + - + - + + @@ -592,105 +602,107 @@ - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_multi_join_node__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_multi_join_node__plan0.xml index 4e6aee1391..a62e77c163 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_multi_join_node__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_multi_join_node__plan0.xml @@ -32,6 +32,7 @@ + @@ -47,6 +48,7 @@ + @@ -244,6 +246,7 @@ + @@ -263,141 +266,143 @@ - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -418,141 +423,143 @@ - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_multihop_node__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_multihop_node__plan0.xml index b0076dc05e..35c4d38837 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_multihop_node__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_multihop_node__plan0.xml @@ -12,6 +12,7 @@ + @@ -29,6 +30,7 @@ + @@ -44,6 +46,7 @@ + @@ -75,6 +78,7 @@ + @@ -94,6 +98,7 @@ + @@ -213,109 +218,111 @@ - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -343,6 +350,7 @@ + @@ -434,7 +442,7 @@ - + @@ -442,71 +450,73 @@ + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -592,73 +602,75 @@ - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_multiple_metrics_no_dimensions__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_multiple_metrics_no_dimensions__plan0.xml index f4399656a0..b054f56fde 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_multiple_metrics_no_dimensions__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_multiple_metrics_no_dimensions__plan0.xml @@ -1,479 +1,485 @@ - + - + - + - + - + + - + - + - + + - + - + + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -671,6 +677,7 @@ + @@ -683,473 +690,479 @@ - + - + - + + - + - + + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_nested_derived_metric__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_nested_derived_metric__plan0.xml index 131cb46293..870dff590f 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_nested_derived_metric__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_nested_derived_metric__plan0.xml @@ -1,344 +1,352 @@ - + - + - + + - + - + - + - + - + - + - + + - + - + - + + - + - + - + - + - + + - + - + - + - + + - + - + - + - + + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -536,6 +544,7 @@ + @@ -547,262 +556,266 @@ - + - + - + - + + - + - + - + - + + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -1000,6 +1013,7 @@ + @@ -1013,262 +1027,266 @@ - + - + - + - + + - + - + - + - + + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -1466,6 +1484,7 @@ + @@ -1477,262 +1496,266 @@ - + - + - + - + + - + - + - + - + + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -1930,6 +1953,7 @@ + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_order_by_node__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_order_by_node__plan0.xml index 69bcc0baa3..6d0ba4a8d8 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_order_by_node__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_order_by_node__plan0.xml @@ -24,6 +24,7 @@ + @@ -41,6 +42,7 @@ + @@ -66,6 +68,7 @@ + @@ -85,6 +88,7 @@ + @@ -282,6 +286,7 @@ + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_partitioned_join__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_partitioned_join__plan0.xml index 15411aa690..ac86abee07 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_partitioned_join__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_partitioned_join__plan0.xml @@ -1,337 +1,344 @@ - + - + - + - + + - + - + - + - + + - + - + - + - + + - + - + - + - + - + - + - - - - - - - + + + + + + + + - + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -344,158 +351,160 @@ - + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_semi_additive_join_node__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_semi_additive_join_node__plan0.xml index 57765accb3..3baadf72d2 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_semi_additive_join_node__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_semi_additive_join_node__plan0.xml @@ -50,6 +50,7 @@ + @@ -95,6 +96,7 @@ + @@ -109,6 +111,7 @@ + @@ -154,6 +157,7 @@ + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_semi_additive_join_node_with_grouping__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_semi_additive_join_node_with_grouping__plan0.xml index 1ef9811e05..716c33702e 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_semi_additive_join_node_with_grouping__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_semi_additive_join_node_with_grouping__plan0.xml @@ -50,6 +50,7 @@ + @@ -95,6 +96,7 @@ + @@ -117,6 +119,7 @@ + @@ -162,6 +165,7 @@ + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_semi_additive_join_node_with_queried_group_by__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_semi_additive_join_node_with_queried_group_by__plan0.xml index 95a0705568..8d5abb7302 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_semi_additive_join_node_with_queried_group_by__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_semi_additive_join_node_with_queried_group_by__plan0.xml @@ -50,6 +50,7 @@ + @@ -95,6 +96,7 @@ + @@ -113,6 +115,7 @@ + @@ -158,6 +161,7 @@ + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_single_join_node__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_single_join_node__plan0.xml index 67fdc58b30..24f6ba62e9 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_single_join_node__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_single_join_node__plan0.xml @@ -22,6 +22,7 @@ + @@ -37,6 +38,7 @@ + @@ -234,6 +236,7 @@ + @@ -253,141 +256,143 @@ - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_source_node__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_source_node__plan0.xml index ff63322654..73ce5f4a0f 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_source_node__plan0.xml +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_source_node__plan0.xml @@ -196,6 +196,7 @@ + diff --git a/metricflow/test/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.xml b/metricflow/test/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.xml index 7668b69f70..d7929d7422 100644 --- a/metricflow/test/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.xml +++ b/metricflow/test/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.xml @@ -184,6 +184,7 @@ + @@ -381,6 +382,7 @@ + diff --git a/metricflow/test/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/test_metric_time_dimension_transform_node_using_primary_time__plan0.xml b/metricflow/test/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/test_metric_time_dimension_transform_node_using_primary_time__plan0.xml index 612d9a69f6..6998762a6a 100644 --- a/metricflow/test/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/test_metric_time_dimension_transform_node_using_primary_time__plan0.xml +++ b/metricflow/test/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/test_metric_time_dimension_transform_node_using_primary_time__plan0.xml @@ -212,6 +212,7 @@ + @@ -409,6 +410,7 @@ + diff --git a/metricflow/test/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/test_simple_query_with_metric_time_dimension__plan0.xml b/metricflow/test/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/test_simple_query_with_metric_time_dimension__plan0.xml index a09a871f53..195e74486a 100644 --- a/metricflow/test/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/test_simple_query_with_metric_time_dimension__plan0.xml +++ b/metricflow/test/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/test_simple_query_with_metric_time_dimension__plan0.xml @@ -1,285 +1,290 @@ - + - + - + - + - + + - + - + - + - + + - + - + - + - + + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -477,6 +482,7 @@ + @@ -488,234 +494,238 @@ - + - + - + - + + - + - + - + - + + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -913,6 +923,7 @@ + diff --git a/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_1_data_source__dfp_0.xml b/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_1_data_source__dfp_0.xml index 31e8b720fe..6d6b64cc8d 100644 --- a/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_1_data_source__dfp_0.xml +++ b/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_1_data_source__dfp_0.xml @@ -72,7 +72,7 @@ - + @@ -93,12 +93,12 @@ - + - + @@ -175,7 +175,7 @@ - + @@ -196,12 +196,12 @@ - + - + diff --git a/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_2_data_sources__dfp_0.xml b/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_2_data_sources__dfp_0.xml index d6419c9573..d45d18dc09 100644 --- a/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_2_data_sources__dfp_0.xml +++ b/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_2_data_sources__dfp_0.xml @@ -37,7 +37,7 @@ - + @@ -72,12 +72,12 @@ - + - + diff --git a/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_ratio_metrics_from_1_data_source__dfp_0.xml b/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_ratio_metrics_from_1_data_source__dfp_0.xml index 2bc1ee36cc..b1a400b37d 100644 --- a/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_ratio_metrics_from_1_data_source__dfp_0.xml +++ b/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_ratio_metrics_from_1_data_source__dfp_0.xml @@ -41,7 +41,7 @@ - + @@ -85,7 +85,7 @@ - + diff --git a/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_3_metrics_from_2_data_sources__dfp_0.xml b/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_3_metrics_from_2_data_sources__dfp_0.xml index ddd357846a..36dc06b531 100644 --- a/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_3_metrics_from_2_data_sources__dfp_0.xml +++ b/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_3_metrics_from_2_data_sources__dfp_0.xml @@ -37,7 +37,7 @@ - + @@ -77,7 +77,7 @@ - + @@ -112,12 +112,12 @@ - + - + diff --git a/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfp_0.xml b/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfp_0.xml index 637f6fc209..43b93cde03 100644 --- a/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfp_0.xml +++ b/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfp_0.xml @@ -37,7 +37,7 @@ - + @@ -107,7 +107,7 @@ - + diff --git a/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric__dfp_0.xml b/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric__dfp_0.xml index e0aed960d0..619338764a 100644 --- a/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric__dfp_0.xml +++ b/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric__dfp_0.xml @@ -45,7 +45,7 @@ - + @@ -85,7 +85,7 @@ - + diff --git a/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_with_non_derived_metric__dfp_0.xml b/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_with_non_derived_metric__dfp_0.xml index 61c059dabd..39b386acf8 100644 --- a/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_with_non_derived_metric__dfp_0.xml +++ b/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_with_non_derived_metric__dfp_0.xml @@ -37,7 +37,7 @@ - + @@ -88,7 +88,7 @@ - + @@ -128,7 +128,7 @@ - + diff --git a/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_nested_derived_metric__dfp_0.xml b/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_nested_derived_metric__dfp_0.xml index 83e0ab7d26..b75773a9eb 100644 --- a/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_nested_derived_metric__dfp_0.xml +++ b/metricflow/test/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_nested_derived_metric__dfp_0.xml @@ -56,7 +56,7 @@ - + @@ -96,7 +96,7 @@ - + @@ -138,7 +138,7 @@ - + @@ -178,7 +178,7 @@ - +