diff --git a/tests/snapshots/test_data_warehouse_tasks.py/data_warehouse_validation_manifest/BigQuery/test_build_metric_tasks__query0.sql b/tests/snapshots/test_data_warehouse_tasks.py/data_warehouse_validation_manifest/BigQuery/test_build_metric_tasks__query0.sql deleted file mode 100644 index 81221ddb4c..0000000000 --- a/tests/snapshots/test_data_warehouse_tasks.py/data_warehouse_validation_manifest/BigQuery/test_build_metric_tasks__query0.sql +++ /dev/null @@ -1,17 +0,0 @@ --- Aggregate Measures --- Compute Metrics via Expressions -SELECT - metric_time__day - , SUM(count_dogs) AS count_dogs -FROM ( - -- Read Elements From Semantic Model 'animals' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: - -- ['count_dogs', 'metric_time__day'] - SELECT - DATE_TRUNC(ds, day) AS metric_time__day - , 1 AS count_dogs - FROM ***************************.fct_animals animals_src_0 -) subq_2 -GROUP BY - metric_time__day diff --git a/tests/snapshots/test_data_warehouse_tasks.py/data_warehouse_validation_manifest/Databricks/test_build_metric_tasks__query0.sql b/tests/snapshots/test_data_warehouse_tasks.py/data_warehouse_validation_manifest/Databricks/test_build_metric_tasks__query0.sql deleted file mode 100644 index a8484a1d11..0000000000 --- a/tests/snapshots/test_data_warehouse_tasks.py/data_warehouse_validation_manifest/Databricks/test_build_metric_tasks__query0.sql +++ /dev/null @@ -1,17 +0,0 @@ --- Aggregate Measures --- Compute Metrics via Expressions -SELECT - metric_time__day - , SUM(count_dogs) AS count_dogs -FROM ( - -- Read Elements From Semantic Model 'animals' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: - -- ['count_dogs', 'metric_time__day'] - SELECT - DATE_TRUNC('day', ds) AS metric_time__day - , 1 AS count_dogs - FROM ***************************.fct_animals animals_src_0 -) subq_2 -GROUP BY - metric_time__day diff --git a/tests/snapshots/test_data_warehouse_tasks.py/data_warehouse_validation_manifest/DuckDB/test_build_metric_tasks__query0.sql b/tests/snapshots/test_data_warehouse_tasks.py/data_warehouse_validation_manifest/DuckDB/test_build_metric_tasks__query0.sql deleted file mode 100644 index a8484a1d11..0000000000 --- a/tests/snapshots/test_data_warehouse_tasks.py/data_warehouse_validation_manifest/DuckDB/test_build_metric_tasks__query0.sql +++ /dev/null @@ -1,17 +0,0 @@ --- Aggregate Measures --- Compute Metrics via Expressions -SELECT - metric_time__day - , SUM(count_dogs) AS count_dogs -FROM ( - -- Read Elements From Semantic Model 'animals' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: - -- ['count_dogs', 'metric_time__day'] - SELECT - DATE_TRUNC('day', ds) AS metric_time__day - , 1 AS count_dogs - FROM ***************************.fct_animals animals_src_0 -) subq_2 -GROUP BY - metric_time__day diff --git a/tests/snapshots/test_data_warehouse_tasks.py/data_warehouse_validation_manifest/Postgres/test_build_metric_tasks__query0.sql b/tests/snapshots/test_data_warehouse_tasks.py/data_warehouse_validation_manifest/Postgres/test_build_metric_tasks__query0.sql deleted file mode 100644 index a8484a1d11..0000000000 --- a/tests/snapshots/test_data_warehouse_tasks.py/data_warehouse_validation_manifest/Postgres/test_build_metric_tasks__query0.sql +++ /dev/null @@ -1,17 +0,0 @@ --- Aggregate Measures --- Compute Metrics via Expressions -SELECT - metric_time__day - , SUM(count_dogs) AS count_dogs -FROM ( - -- Read Elements From Semantic Model 'animals' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: - -- ['count_dogs', 'metric_time__day'] - SELECT - DATE_TRUNC('day', ds) AS metric_time__day - , 1 AS count_dogs - FROM ***************************.fct_animals animals_src_0 -) subq_2 -GROUP BY - metric_time__day diff --git a/tests/snapshots/test_data_warehouse_tasks.py/data_warehouse_validation_manifest/Redshift/test_build_metric_tasks__query0.sql b/tests/snapshots/test_data_warehouse_tasks.py/data_warehouse_validation_manifest/Redshift/test_build_metric_tasks__query0.sql deleted file mode 100644 index a8484a1d11..0000000000 --- a/tests/snapshots/test_data_warehouse_tasks.py/data_warehouse_validation_manifest/Redshift/test_build_metric_tasks__query0.sql +++ /dev/null @@ -1,17 +0,0 @@ --- Aggregate Measures --- Compute Metrics via Expressions -SELECT - metric_time__day - , SUM(count_dogs) AS count_dogs -FROM ( - -- Read Elements From Semantic Model 'animals' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: - -- ['count_dogs', 'metric_time__day'] - SELECT - DATE_TRUNC('day', ds) AS metric_time__day - , 1 AS count_dogs - FROM ***************************.fct_animals animals_src_0 -) subq_2 -GROUP BY - metric_time__day diff --git a/tests/snapshots/test_data_warehouse_tasks.py/data_warehouse_validation_manifest/Snowflake/test_build_metric_tasks__query0.sql b/tests/snapshots/test_data_warehouse_tasks.py/data_warehouse_validation_manifest/Snowflake/test_build_metric_tasks__query0.sql deleted file mode 100644 index a8484a1d11..0000000000 --- a/tests/snapshots/test_data_warehouse_tasks.py/data_warehouse_validation_manifest/Snowflake/test_build_metric_tasks__query0.sql +++ /dev/null @@ -1,17 +0,0 @@ --- Aggregate Measures --- Compute Metrics via Expressions -SELECT - metric_time__day - , SUM(count_dogs) AS count_dogs -FROM ( - -- Read Elements From Semantic Model 'animals' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: - -- ['count_dogs', 'metric_time__day'] - SELECT - DATE_TRUNC('day', ds) AS metric_time__day - , 1 AS count_dogs - FROM ***************************.fct_animals animals_src_0 -) subq_2 -GROUP BY - metric_time__day diff --git a/tests/snapshots/test_data_warehouse_tasks.py/data_warehouse_validation_manifest/Trino/test_build_metric_tasks__query0.sql b/tests/snapshots/test_data_warehouse_tasks.py/data_warehouse_validation_manifest/Trino/test_build_metric_tasks__query0.sql deleted file mode 100644 index a8484a1d11..0000000000 --- a/tests/snapshots/test_data_warehouse_tasks.py/data_warehouse_validation_manifest/Trino/test_build_metric_tasks__query0.sql +++ /dev/null @@ -1,17 +0,0 @@ --- Aggregate Measures --- Compute Metrics via Expressions -SELECT - metric_time__day - , SUM(count_dogs) AS count_dogs -FROM ( - -- Read Elements From Semantic Model 'animals' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: - -- ['count_dogs', 'metric_time__day'] - SELECT - DATE_TRUNC('day', ds) AS metric_time__day - , 1 AS count_dogs - FROM ***************************.fct_animals animals_src_0 -) subq_2 -GROUP BY - metric_time__day diff --git a/tests/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_conversion_metric__plan0.sql b/tests/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_conversion_metric__plan0.sql deleted file mode 100644 index 0a56dd7299..0000000000 --- a/tests/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_conversion_metric__plan0.sql +++ /dev/null @@ -1,350 +0,0 @@ --- Compute Metrics via Expressions -SELECT - subq_15.visit__referrer_id - , CAST(subq_15.buys AS DOUBLE) / CAST(NULLIF(subq_15.visits, 0) AS DOUBLE) AS visit_buy_conversion_rate -FROM ( - -- Combine Metrics - SELECT - COALESCE(subq_3.visit__referrer_id, subq_14.visit__referrer_id) AS visit__referrer_id - , MAX(subq_3.visits) AS visits - , MAX(subq_14.buys) AS buys - FROM ( - -- Aggregate Measures - SELECT - subq_2.visit__referrer_id - , SUM(subq_2.visits) AS visits - FROM ( - -- Pass Only Elements: - -- ['visits', 'visit__referrer_id'] - SELECT - subq_1.visit__referrer_id - , subq_1.visits - FROM ( - -- Metric Time Dimension 'ds' - SELECT - subq_0.ds__day - , subq_0.ds__week - , subq_0.ds__month - , subq_0.ds__quarter - , subq_0.ds__year - , subq_0.ds__extract_year - , subq_0.ds__extract_quarter - , subq_0.ds__extract_month - , subq_0.ds__extract_day - , subq_0.ds__extract_dow - , subq_0.ds__extract_doy - , subq_0.visit__ds__day - , subq_0.visit__ds__week - , subq_0.visit__ds__month - , subq_0.visit__ds__quarter - , subq_0.visit__ds__year - , subq_0.visit__ds__extract_year - , subq_0.visit__ds__extract_quarter - , subq_0.visit__ds__extract_month - , subq_0.visit__ds__extract_day - , subq_0.visit__ds__extract_dow - , subq_0.visit__ds__extract_doy - , subq_0.ds__day AS metric_time__day - , subq_0.ds__week AS metric_time__week - , subq_0.ds__month AS metric_time__month - , subq_0.ds__quarter AS metric_time__quarter - , subq_0.ds__year AS metric_time__year - , subq_0.ds__extract_year AS metric_time__extract_year - , subq_0.ds__extract_quarter AS metric_time__extract_quarter - , subq_0.ds__extract_month AS metric_time__extract_month - , subq_0.ds__extract_day AS metric_time__extract_day - , subq_0.ds__extract_dow AS metric_time__extract_dow - , subq_0.ds__extract_doy AS metric_time__extract_doy - , subq_0.user - , subq_0.visit__user - , subq_0.referrer_id - , subq_0.visit__referrer_id - , subq_0.visits - , subq_0.visitors - FROM ( - -- Read Elements From Semantic Model 'visits_source' - SELECT - 1 AS visits - , visits_source_src_10011.user_id AS visitors - , DATE_TRUNC('day', visits_source_src_10011.ds) AS ds__day - , 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 - , EXTRACT(year FROM visits_source_src_10011.ds) AS ds__extract_year - , EXTRACT(quarter FROM visits_source_src_10011.ds) AS ds__extract_quarter - , EXTRACT(month FROM visits_source_src_10011.ds) AS ds__extract_month - , EXTRACT(day FROM visits_source_src_10011.ds) AS ds__extract_day - , EXTRACT(isodow FROM visits_source_src_10011.ds) AS ds__extract_dow - , EXTRACT(doy FROM visits_source_src_10011.ds) AS ds__extract_doy - , visits_source_src_10011.referrer_id - , DATE_TRUNC('day', visits_source_src_10011.ds) AS visit__ds__day - , DATE_TRUNC('week', visits_source_src_10011.ds) AS visit__ds__week - , DATE_TRUNC('month', visits_source_src_10011.ds) AS visit__ds__month - , DATE_TRUNC('quarter', visits_source_src_10011.ds) AS visit__ds__quarter - , DATE_TRUNC('year', visits_source_src_10011.ds) AS visit__ds__year - , EXTRACT(year FROM visits_source_src_10011.ds) AS visit__ds__extract_year - , EXTRACT(quarter FROM visits_source_src_10011.ds) AS visit__ds__extract_quarter - , EXTRACT(month FROM visits_source_src_10011.ds) AS visit__ds__extract_month - , EXTRACT(day FROM visits_source_src_10011.ds) AS visit__ds__extract_day - , EXTRACT(isodow FROM visits_source_src_10011.ds) AS visit__ds__extract_dow - , EXTRACT(doy FROM visits_source_src_10011.ds) AS visit__ds__extract_doy - , visits_source_src_10011.referrer_id AS visit__referrer_id - , visits_source_src_10011.user_id AS user - , visits_source_src_10011.user_id AS visit__user - FROM ***************************.fct_visits visits_source_src_10011 - ) subq_0 - ) subq_1 - ) subq_2 - GROUP BY - subq_2.visit__referrer_id - ) subq_3 - FULL OUTER JOIN ( - -- Aggregate Measures - SELECT - subq_13.visit__referrer_id - , SUM(subq_13.buys) AS buys - FROM ( - -- Pass Only Elements: - -- ['buys', 'visit__referrer_id'] - SELECT - subq_12.visit__referrer_id - , subq_12.buys - FROM ( - -- Find conversions for EntitySpec(element_name='user', entity_links=()) within the range of count=7 granularity=TimeGranularity.DAY - SELECT - subq_11.visit__referrer_id - , subq_11.buys - , subq_11.visits - FROM ( - -- Dedupe the fanout on (MetadataSpec(element_name='mf_internal_uuid'),) in the conversion data set - SELECT DISTINCT - first_value(subq_6.visits) OVER (PARTITION BY subq_10.user, subq_10.ds__day ORDER BY subq_6.ds__day DESC) AS visits - , first_value(subq_6.visit__referrer_id) OVER (PARTITION BY subq_10.user, subq_10.ds__day ORDER BY subq_6.ds__day DESC) AS visit__referrer_id - , subq_10.mf_internal_uuid AS mf_internal_uuid - , subq_10.buys AS buys - FROM ( - -- Pass Only Elements: - -- ['visits', 'visit__referrer_id'] - SELECT - subq_5.visit__referrer_id - , subq_5.visits - FROM ( - -- Metric Time Dimension 'ds' - SELECT - subq_4.ds__day - , subq_4.ds__week - , subq_4.ds__month - , subq_4.ds__quarter - , subq_4.ds__year - , subq_4.ds__extract_year - , subq_4.ds__extract_quarter - , subq_4.ds__extract_month - , subq_4.ds__extract_day - , subq_4.ds__extract_dow - , subq_4.ds__extract_doy - , subq_4.visit__ds__day - , subq_4.visit__ds__week - , subq_4.visit__ds__month - , subq_4.visit__ds__quarter - , subq_4.visit__ds__year - , subq_4.visit__ds__extract_year - , subq_4.visit__ds__extract_quarter - , subq_4.visit__ds__extract_month - , subq_4.visit__ds__extract_day - , subq_4.visit__ds__extract_dow - , subq_4.visit__ds__extract_doy - , subq_4.ds__day AS metric_time__day - , subq_4.ds__week AS metric_time__week - , subq_4.ds__month AS metric_time__month - , subq_4.ds__quarter AS metric_time__quarter - , subq_4.ds__year AS metric_time__year - , subq_4.ds__extract_year AS metric_time__extract_year - , subq_4.ds__extract_quarter AS metric_time__extract_quarter - , subq_4.ds__extract_month AS metric_time__extract_month - , subq_4.ds__extract_day AS metric_time__extract_day - , subq_4.ds__extract_dow AS metric_time__extract_dow - , subq_4.ds__extract_doy AS metric_time__extract_doy - , subq_4.user - , subq_4.visit__user - , subq_4.referrer_id - , subq_4.visit__referrer_id - , subq_4.visits - , subq_4.visitors - FROM ( - -- Read Elements From Semantic Model 'visits_source' - SELECT - 1 AS visits - , visits_source_src_10011.user_id AS visitors - , DATE_TRUNC('day', visits_source_src_10011.ds) AS ds__day - , 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 - , EXTRACT(year FROM visits_source_src_10011.ds) AS ds__extract_year - , EXTRACT(quarter FROM visits_source_src_10011.ds) AS ds__extract_quarter - , EXTRACT(month FROM visits_source_src_10011.ds) AS ds__extract_month - , EXTRACT(day FROM visits_source_src_10011.ds) AS ds__extract_day - , EXTRACT(isodow FROM visits_source_src_10011.ds) AS ds__extract_dow - , EXTRACT(doy FROM visits_source_src_10011.ds) AS ds__extract_doy - , visits_source_src_10011.referrer_id - , DATE_TRUNC('day', visits_source_src_10011.ds) AS visit__ds__day - , DATE_TRUNC('week', visits_source_src_10011.ds) AS visit__ds__week - , DATE_TRUNC('month', visits_source_src_10011.ds) AS visit__ds__month - , DATE_TRUNC('quarter', visits_source_src_10011.ds) AS visit__ds__quarter - , DATE_TRUNC('year', visits_source_src_10011.ds) AS visit__ds__year - , EXTRACT(year FROM visits_source_src_10011.ds) AS visit__ds__extract_year - , EXTRACT(quarter FROM visits_source_src_10011.ds) AS visit__ds__extract_quarter - , EXTRACT(month FROM visits_source_src_10011.ds) AS visit__ds__extract_month - , EXTRACT(day FROM visits_source_src_10011.ds) AS visit__ds__extract_day - , EXTRACT(isodow FROM visits_source_src_10011.ds) AS visit__ds__extract_dow - , EXTRACT(doy FROM visits_source_src_10011.ds) AS visit__ds__extract_doy - , visits_source_src_10011.referrer_id AS visit__referrer_id - , visits_source_src_10011.user_id AS user - , visits_source_src_10011.user_id AS visit__user - FROM ***************************.fct_visits visits_source_src_10011 - ) subq_4 - ) subq_5 - ) subq_6 - INNER JOIN ( - -- Pass Only Elements: - -- ['buys', 'mf_internal_uuid'] - SELECT - subq_9.buys - , subq_9.mf_internal_uuid - FROM ( - -- Add column with generated UUID - SELECT - subq_8.ds__day - , subq_8.ds__week - , subq_8.ds__month - , subq_8.ds__quarter - , subq_8.ds__year - , subq_8.ds__extract_year - , subq_8.ds__extract_quarter - , subq_8.ds__extract_month - , subq_8.ds__extract_day - , subq_8.ds__extract_dow - , subq_8.ds__extract_doy - , subq_8.buy__ds__day - , subq_8.buy__ds__week - , subq_8.buy__ds__month - , subq_8.buy__ds__quarter - , subq_8.buy__ds__year - , subq_8.buy__ds__extract_year - , subq_8.buy__ds__extract_quarter - , subq_8.buy__ds__extract_month - , subq_8.buy__ds__extract_day - , subq_8.buy__ds__extract_dow - , subq_8.buy__ds__extract_doy - , subq_8.metric_time__day - , subq_8.metric_time__week - , subq_8.metric_time__month - , subq_8.metric_time__quarter - , subq_8.metric_time__year - , subq_8.metric_time__extract_year - , subq_8.metric_time__extract_quarter - , subq_8.metric_time__extract_month - , subq_8.metric_time__extract_day - , subq_8.metric_time__extract_dow - , subq_8.metric_time__extract_doy - , subq_8.user - , subq_8.buy__user - , subq_8.buys - , subq_8.buyers - , GEN_RANDOM_UUID() AS mf_internal_uuid - FROM ( - -- Metric Time Dimension 'ds' - SELECT - subq_7.ds__day - , subq_7.ds__week - , subq_7.ds__month - , subq_7.ds__quarter - , subq_7.ds__year - , subq_7.ds__extract_year - , subq_7.ds__extract_quarter - , subq_7.ds__extract_month - , subq_7.ds__extract_day - , subq_7.ds__extract_dow - , subq_7.ds__extract_doy - , subq_7.buy__ds__day - , subq_7.buy__ds__week - , subq_7.buy__ds__month - , subq_7.buy__ds__quarter - , subq_7.buy__ds__year - , subq_7.buy__ds__extract_year - , subq_7.buy__ds__extract_quarter - , subq_7.buy__ds__extract_month - , subq_7.buy__ds__extract_day - , subq_7.buy__ds__extract_dow - , subq_7.buy__ds__extract_doy - , subq_7.ds__day AS metric_time__day - , subq_7.ds__week AS metric_time__week - , subq_7.ds__month AS metric_time__month - , subq_7.ds__quarter AS metric_time__quarter - , subq_7.ds__year AS metric_time__year - , subq_7.ds__extract_year AS metric_time__extract_year - , subq_7.ds__extract_quarter AS metric_time__extract_quarter - , subq_7.ds__extract_month AS metric_time__extract_month - , subq_7.ds__extract_day AS metric_time__extract_day - , subq_7.ds__extract_dow AS metric_time__extract_dow - , subq_7.ds__extract_doy AS metric_time__extract_doy - , subq_7.user - , subq_7.buy__user - , subq_7.buys - , subq_7.buyers - FROM ( - -- Read Elements From Semantic Model 'buys_source' - SELECT - 1 AS buys - , buys_source_src_10002.user_id AS buyers - , DATE_TRUNC('day', buys_source_src_10002.ds) AS ds__day - , 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 - , EXTRACT(year FROM buys_source_src_10002.ds) AS ds__extract_year - , EXTRACT(quarter FROM buys_source_src_10002.ds) AS ds__extract_quarter - , EXTRACT(month FROM buys_source_src_10002.ds) AS ds__extract_month - , EXTRACT(day FROM buys_source_src_10002.ds) AS ds__extract_day - , EXTRACT(isodow FROM buys_source_src_10002.ds) AS ds__extract_dow - , EXTRACT(doy FROM buys_source_src_10002.ds) AS ds__extract_doy - , DATE_TRUNC('day', buys_source_src_10002.ds) AS buy__ds__day - , DATE_TRUNC('week', buys_source_src_10002.ds) AS buy__ds__week - , DATE_TRUNC('month', buys_source_src_10002.ds) AS buy__ds__month - , DATE_TRUNC('quarter', buys_source_src_10002.ds) AS buy__ds__quarter - , DATE_TRUNC('year', buys_source_src_10002.ds) AS buy__ds__year - , EXTRACT(year FROM buys_source_src_10002.ds) AS buy__ds__extract_year - , EXTRACT(quarter FROM buys_source_src_10002.ds) AS buy__ds__extract_quarter - , EXTRACT(month FROM buys_source_src_10002.ds) AS buy__ds__extract_month - , EXTRACT(day FROM buys_source_src_10002.ds) AS buy__ds__extract_day - , EXTRACT(isodow FROM buys_source_src_10002.ds) AS buy__ds__extract_dow - , EXTRACT(doy FROM buys_source_src_10002.ds) AS buy__ds__extract_doy - , buys_source_src_10002.user_id AS user - , buys_source_src_10002.user_id AS buy__user - FROM ***************************.fct_buys buys_source_src_10002 - ) subq_7 - ) subq_8 - ) subq_9 - ) subq_10 - ON - ( - subq_6.user = subq_10.user - ) AND ( - ( - subq_6.ds__day <= subq_10.ds__day - ) AND ( - subq_6.ds__day > subq_10.ds__day - INTERVAL 7 day - ) - ) - ) subq_11 - ) subq_12 - ) subq_13 - GROUP BY - subq_13.visit__referrer_id - ) subq_14 - ON - subq_3.visit__referrer_id = subq_14.visit__referrer_id - GROUP BY - COALESCE(subq_3.visit__referrer_id, subq_14.visit__referrer_id) -) subq_15 diff --git a/tests/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_conversion_metric__plan0_optimized.sql b/tests/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_conversion_metric__plan0_optimized.sql deleted file mode 100644 index f340be4a39..0000000000 --- a/tests/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_conversion_metric__plan0_optimized.sql +++ /dev/null @@ -1,83 +0,0 @@ --- Compute Metrics via Expressions -SELECT - visit__referrer_id - , CAST(buys AS DOUBLE) / CAST(NULLIF(visits, 0) AS DOUBLE) AS visit_buy_conversion_rate -FROM ( - -- Combine Metrics - SELECT - COALESCE(subq_19.visit__referrer_id, subq_30.visit__referrer_id) AS visit__referrer_id - , MAX(subq_19.visits) AS visits - , MAX(subq_30.buys) AS buys - FROM ( - -- Aggregate Measures - SELECT - visit__referrer_id - , SUM(visits) AS visits - FROM ( - -- Read Elements From Semantic Model 'visits_source' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: - -- ['visits', 'visit__referrer_id'] - SELECT - referrer_id AS visit__referrer_id - , 1 AS visits - FROM ***************************.fct_visits visits_source_src_10011 - ) subq_18 - GROUP BY - visit__referrer_id - ) subq_19 - FULL OUTER JOIN ( - -- Find conversions for EntitySpec(element_name='user', entity_links=()) within the range of count=7 granularity=TimeGranularity.DAY - -- Pass Only Elements: - -- ['buys', 'visit__referrer_id'] - -- Aggregate Measures - SELECT - visit__referrer_id - , SUM(buys) AS buys - FROM ( - -- Dedupe the fanout on (MetadataSpec(element_name='mf_internal_uuid'),) in the conversion data set - SELECT DISTINCT - first_value(subq_22.visits) OVER (PARTITION BY subq_26.user, subq_26.ds__day ORDER BY subq_22.ds__day DESC) AS visits - , first_value(subq_22.visit__referrer_id) OVER (PARTITION BY subq_26.user, subq_26.ds__day ORDER BY subq_22.ds__day DESC) AS visit__referrer_id - , subq_26.mf_internal_uuid AS mf_internal_uuid - , subq_26.buys AS buys - FROM ( - -- Read Elements From Semantic Model 'visits_source' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: - -- ['visits', 'visit__referrer_id'] - SELECT - referrer_id AS visit__referrer_id - , 1 AS visits - FROM ***************************.fct_visits visits_source_src_10011 - ) subq_22 - INNER JOIN ( - -- Read Elements From Semantic Model 'buys_source' - -- Metric Time Dimension 'ds' - -- Add column with generated UUID - -- Pass Only Elements: - -- ['buys', 'mf_internal_uuid'] - SELECT - 1 AS buys - , GEN_RANDOM_UUID() AS mf_internal_uuid - FROM ***************************.fct_buys buys_source_src_10002 - ) subq_26 - ON - ( - subq_22.user = subq_26.user - ) AND ( - ( - subq_22.ds__day <= subq_26.ds__day - ) AND ( - subq_22.ds__day > subq_26.ds__day - INTERVAL 7 day - ) - ) - ) subq_27 - GROUP BY - visit__referrer_id - ) subq_30 - ON - subq_19.visit__referrer_id = subq_30.visit__referrer_id - GROUP BY - COALESCE(subq_19.visit__referrer_id, subq_30.visit__referrer_id) -) subq_31 diff --git a/tests/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_conversion_metric__plan0.xml b/tests/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_conversion_metric__plan0.xml deleted file mode 100644 index ebfbf27b26..0000000000 --- a/tests/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_conversion_metric__plan0.xml +++ /dev/null @@ -1,1206 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/snapshots/test_rendered_query.py/MetricFlowExplainResult/BigQuery/test_render_query__query0.sql b/tests/snapshots/test_rendered_query.py/MetricFlowExplainResult/BigQuery/test_render_query__query0.sql deleted file mode 100644 index b448f86cef..0000000000 --- a/tests/snapshots/test_rendered_query.py/MetricFlowExplainResult/BigQuery/test_render_query__query0.sql +++ /dev/null @@ -1,17 +0,0 @@ --- Aggregate Measures --- Compute Metrics via Expressions -SELECT - metric_time__day - , SUM(bookings) AS bookings -FROM ( - -- Read Elements From Semantic Model 'bookings_source' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: - -- ['bookings', 'metric_time__day'] - SELECT - DATE_TRUNC(ds, day) AS metric_time__day - , 1 AS bookings - FROM ***************************.fct_bookings bookings_source_src_1 -) subq_2 -GROUP BY - metric_time__day diff --git a/tests/snapshots/test_rendered_query.py/MetricFlowExplainResult/Databricks/test_render_query__query0.sql b/tests/snapshots/test_rendered_query.py/MetricFlowExplainResult/Databricks/test_render_query__query0.sql deleted file mode 100644 index a3bb3c8e79..0000000000 --- a/tests/snapshots/test_rendered_query.py/MetricFlowExplainResult/Databricks/test_render_query__query0.sql +++ /dev/null @@ -1,17 +0,0 @@ --- Aggregate Measures --- Compute Metrics via Expressions -SELECT - metric_time__day - , SUM(bookings) AS bookings -FROM ( - -- Read Elements From Semantic Model 'bookings_source' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: - -- ['bookings', 'metric_time__day'] - SELECT - DATE_TRUNC('day', ds) AS metric_time__day - , 1 AS bookings - FROM ***************************.fct_bookings bookings_source_src_1 -) subq_2 -GROUP BY - metric_time__day diff --git a/tests/snapshots/test_rendered_query.py/MetricFlowExplainResult/DuckDB/test_render_query__query0.sql b/tests/snapshots/test_rendered_query.py/MetricFlowExplainResult/DuckDB/test_render_query__query0.sql deleted file mode 100644 index a3bb3c8e79..0000000000 --- a/tests/snapshots/test_rendered_query.py/MetricFlowExplainResult/DuckDB/test_render_query__query0.sql +++ /dev/null @@ -1,17 +0,0 @@ --- Aggregate Measures --- Compute Metrics via Expressions -SELECT - metric_time__day - , SUM(bookings) AS bookings -FROM ( - -- Read Elements From Semantic Model 'bookings_source' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: - -- ['bookings', 'metric_time__day'] - SELECT - DATE_TRUNC('day', ds) AS metric_time__day - , 1 AS bookings - FROM ***************************.fct_bookings bookings_source_src_1 -) subq_2 -GROUP BY - metric_time__day diff --git a/tests/snapshots/test_rendered_query.py/MetricFlowExplainResult/Postgres/test_render_query__query0.sql b/tests/snapshots/test_rendered_query.py/MetricFlowExplainResult/Postgres/test_render_query__query0.sql deleted file mode 100644 index a3bb3c8e79..0000000000 --- a/tests/snapshots/test_rendered_query.py/MetricFlowExplainResult/Postgres/test_render_query__query0.sql +++ /dev/null @@ -1,17 +0,0 @@ --- Aggregate Measures --- Compute Metrics via Expressions -SELECT - metric_time__day - , SUM(bookings) AS bookings -FROM ( - -- Read Elements From Semantic Model 'bookings_source' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: - -- ['bookings', 'metric_time__day'] - SELECT - DATE_TRUNC('day', ds) AS metric_time__day - , 1 AS bookings - FROM ***************************.fct_bookings bookings_source_src_1 -) subq_2 -GROUP BY - metric_time__day diff --git a/tests/snapshots/test_rendered_query.py/MetricFlowExplainResult/Redshift/test_render_query__query0.sql b/tests/snapshots/test_rendered_query.py/MetricFlowExplainResult/Redshift/test_render_query__query0.sql deleted file mode 100644 index a3bb3c8e79..0000000000 --- a/tests/snapshots/test_rendered_query.py/MetricFlowExplainResult/Redshift/test_render_query__query0.sql +++ /dev/null @@ -1,17 +0,0 @@ --- Aggregate Measures --- Compute Metrics via Expressions -SELECT - metric_time__day - , SUM(bookings) AS bookings -FROM ( - -- Read Elements From Semantic Model 'bookings_source' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: - -- ['bookings', 'metric_time__day'] - SELECT - DATE_TRUNC('day', ds) AS metric_time__day - , 1 AS bookings - FROM ***************************.fct_bookings bookings_source_src_1 -) subq_2 -GROUP BY - metric_time__day diff --git a/tests/snapshots/test_rendered_query.py/MetricFlowExplainResult/Snowflake/test_render_query__query0.sql b/tests/snapshots/test_rendered_query.py/MetricFlowExplainResult/Snowflake/test_render_query__query0.sql deleted file mode 100644 index a3bb3c8e79..0000000000 --- a/tests/snapshots/test_rendered_query.py/MetricFlowExplainResult/Snowflake/test_render_query__query0.sql +++ /dev/null @@ -1,17 +0,0 @@ --- Aggregate Measures --- Compute Metrics via Expressions -SELECT - metric_time__day - , SUM(bookings) AS bookings -FROM ( - -- Read Elements From Semantic Model 'bookings_source' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: - -- ['bookings', 'metric_time__day'] - SELECT - DATE_TRUNC('day', ds) AS metric_time__day - , 1 AS bookings - FROM ***************************.fct_bookings bookings_source_src_1 -) subq_2 -GROUP BY - metric_time__day diff --git a/tests/snapshots/test_rendered_query.py/MetricFlowExplainResult/Trino/test_render_query__query0.sql b/tests/snapshots/test_rendered_query.py/MetricFlowExplainResult/Trino/test_render_query__query0.sql deleted file mode 100644 index a3bb3c8e79..0000000000 --- a/tests/snapshots/test_rendered_query.py/MetricFlowExplainResult/Trino/test_render_query__query0.sql +++ /dev/null @@ -1,17 +0,0 @@ --- Aggregate Measures --- Compute Metrics via Expressions -SELECT - metric_time__day - , SUM(bookings) AS bookings -FROM ( - -- Read Elements From Semantic Model 'bookings_source' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: - -- ['bookings', 'metric_time__day'] - SELECT - DATE_TRUNC('day', ds) AS metric_time__day - , 1 AS bookings - FROM ***************************.fct_bookings bookings_source_src_1 -) subq_2 -GROUP BY - metric_time__day diff --git a/tests/snapshots/test_rendered_query.py/str/BigQuery/test_id_enumeration_without_consistency_flag__first_query.sql b/tests/snapshots/test_rendered_query.py/str/BigQuery/test_id_enumeration_without_consistency_flag__first_query.sql deleted file mode 100644 index 302769d380..0000000000 --- a/tests/snapshots/test_rendered_query.py/str/BigQuery/test_id_enumeration_without_consistency_flag__first_query.sql +++ /dev/null @@ -1,45 +0,0 @@ --- Combine Aggregated Outputs -SELECT - COALESCE(subq_14.metric_time__day, subq_19.metric_time__day) AS metric_time__day - , MAX(subq_14.bookings) AS bookings - , MAX(subq_19.listings) AS listings -FROM ( - -- Aggregate Measures - -- Compute Metrics via Expressions - SELECT - metric_time__day - , SUM(bookings) AS bookings - FROM ( - -- Read Elements From Semantic Model 'bookings_source' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: ['bookings', 'metric_time__day'] - SELECT - DATE_TRUNC(ds, day) AS metric_time__day - , 1 AS bookings - FROM ***************************.fct_bookings bookings_source_src_0 - ) subq_12 - GROUP BY - metric_time__day -) subq_14 -FULL OUTER JOIN ( - -- Aggregate Measures - -- Compute Metrics via Expressions - SELECT - metric_time__day - , SUM(listings) AS listings - FROM ( - -- Read Elements From Semantic Model 'listings_latest' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: ['listings', 'metric_time__day'] - SELECT - DATE_TRUNC(created_at, day) AS metric_time__day - , 1 AS listings - FROM ***************************.dim_listings_latest listings_latest_src_0 - ) subq_17 - GROUP BY - metric_time__day -) subq_19 -ON - subq_14.metric_time__day = subq_19.metric_time__day -GROUP BY - metric_time__day diff --git a/tests/snapshots/test_rendered_query.py/str/BigQuery/test_id_enumeration_without_consistency_flag__second_query.sql b/tests/snapshots/test_rendered_query.py/str/BigQuery/test_id_enumeration_without_consistency_flag__second_query.sql deleted file mode 100644 index 57be99300c..0000000000 --- a/tests/snapshots/test_rendered_query.py/str/BigQuery/test_id_enumeration_without_consistency_flag__second_query.sql +++ /dev/null @@ -1,45 +0,0 @@ --- Combine Aggregated Outputs -SELECT - COALESCE(subq_24.metric_time__day, subq_29.metric_time__day) AS metric_time__day - , MAX(subq_24.bookings) AS bookings - , MAX(subq_29.listings) AS listings -FROM ( - -- Aggregate Measures - -- Compute Metrics via Expressions - SELECT - metric_time__day - , SUM(bookings) AS bookings - FROM ( - -- Read Elements From Semantic Model 'bookings_source' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: ['bookings', 'metric_time__day'] - SELECT - DATE_TRUNC(ds, day) AS metric_time__day - , 1 AS bookings - FROM ***************************.fct_bookings bookings_source_src_0 - ) subq_22 - GROUP BY - metric_time__day -) subq_24 -FULL OUTER JOIN ( - -- Aggregate Measures - -- Compute Metrics via Expressions - SELECT - metric_time__day - , SUM(listings) AS listings - FROM ( - -- Read Elements From Semantic Model 'listings_latest' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: ['listings', 'metric_time__day'] - SELECT - DATE_TRUNC(created_at, day) AS metric_time__day - , 1 AS listings - FROM ***************************.dim_listings_latest listings_latest_src_0 - ) subq_27 - GROUP BY - metric_time__day -) subq_29 -ON - subq_24.metric_time__day = subq_29.metric_time__day -GROUP BY - metric_time__day diff --git a/tests/snapshots/test_rendered_query.py/str/Databricks/test_id_enumeration_without_consistency_flag__first_query.sql b/tests/snapshots/test_rendered_query.py/str/Databricks/test_id_enumeration_without_consistency_flag__first_query.sql deleted file mode 100644 index dd0944e363..0000000000 --- a/tests/snapshots/test_rendered_query.py/str/Databricks/test_id_enumeration_without_consistency_flag__first_query.sql +++ /dev/null @@ -1,45 +0,0 @@ --- Combine Aggregated Outputs -SELECT - COALESCE(subq_14.metric_time__day, subq_19.metric_time__day) AS metric_time__day - , MAX(subq_14.bookings) AS bookings - , MAX(subq_19.listings) AS listings -FROM ( - -- Aggregate Measures - -- Compute Metrics via Expressions - SELECT - metric_time__day - , SUM(bookings) AS bookings - FROM ( - -- Read Elements From Semantic Model 'bookings_source' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: ['bookings', 'metric_time__day'] - SELECT - DATE_TRUNC('day', ds) AS metric_time__day - , 1 AS bookings - FROM ***************************.fct_bookings bookings_source_src_0 - ) subq_12 - GROUP BY - metric_time__day -) subq_14 -FULL OUTER JOIN ( - -- Aggregate Measures - -- Compute Metrics via Expressions - SELECT - metric_time__day - , SUM(listings) AS listings - FROM ( - -- Read Elements From Semantic Model 'listings_latest' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: ['listings', 'metric_time__day'] - SELECT - DATE_TRUNC('day', created_at) AS metric_time__day - , 1 AS listings - FROM ***************************.dim_listings_latest listings_latest_src_0 - ) subq_17 - GROUP BY - metric_time__day -) subq_19 -ON - subq_14.metric_time__day = subq_19.metric_time__day -GROUP BY - COALESCE(subq_14.metric_time__day, subq_19.metric_time__day) diff --git a/tests/snapshots/test_rendered_query.py/str/Databricks/test_id_enumeration_without_consistency_flag__second_query.sql b/tests/snapshots/test_rendered_query.py/str/Databricks/test_id_enumeration_without_consistency_flag__second_query.sql deleted file mode 100644 index 2e0cf2f82c..0000000000 --- a/tests/snapshots/test_rendered_query.py/str/Databricks/test_id_enumeration_without_consistency_flag__second_query.sql +++ /dev/null @@ -1,45 +0,0 @@ --- Combine Aggregated Outputs -SELECT - COALESCE(subq_24.metric_time__day, subq_29.metric_time__day) AS metric_time__day - , MAX(subq_24.bookings) AS bookings - , MAX(subq_29.listings) AS listings -FROM ( - -- Aggregate Measures - -- Compute Metrics via Expressions - SELECT - metric_time__day - , SUM(bookings) AS bookings - FROM ( - -- Read Elements From Semantic Model 'bookings_source' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: ['bookings', 'metric_time__day'] - SELECT - DATE_TRUNC('day', ds) AS metric_time__day - , 1 AS bookings - FROM ***************************.fct_bookings bookings_source_src_0 - ) subq_22 - GROUP BY - metric_time__day -) subq_24 -FULL OUTER JOIN ( - -- Aggregate Measures - -- Compute Metrics via Expressions - SELECT - metric_time__day - , SUM(listings) AS listings - FROM ( - -- Read Elements From Semantic Model 'listings_latest' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: ['listings', 'metric_time__day'] - SELECT - DATE_TRUNC('day', created_at) AS metric_time__day - , 1 AS listings - FROM ***************************.dim_listings_latest listings_latest_src_0 - ) subq_27 - GROUP BY - metric_time__day -) subq_29 -ON - subq_24.metric_time__day = subq_29.metric_time__day -GROUP BY - COALESCE(subq_24.metric_time__day, subq_29.metric_time__day) diff --git a/tests/snapshots/test_rendered_query.py/str/DuckDB/test_id_enumeration_without_consistency_flag__first_query.sql b/tests/snapshots/test_rendered_query.py/str/DuckDB/test_id_enumeration_without_consistency_flag__first_query.sql deleted file mode 100644 index dd0944e363..0000000000 --- a/tests/snapshots/test_rendered_query.py/str/DuckDB/test_id_enumeration_without_consistency_flag__first_query.sql +++ /dev/null @@ -1,45 +0,0 @@ --- Combine Aggregated Outputs -SELECT - COALESCE(subq_14.metric_time__day, subq_19.metric_time__day) AS metric_time__day - , MAX(subq_14.bookings) AS bookings - , MAX(subq_19.listings) AS listings -FROM ( - -- Aggregate Measures - -- Compute Metrics via Expressions - SELECT - metric_time__day - , SUM(bookings) AS bookings - FROM ( - -- Read Elements From Semantic Model 'bookings_source' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: ['bookings', 'metric_time__day'] - SELECT - DATE_TRUNC('day', ds) AS metric_time__day - , 1 AS bookings - FROM ***************************.fct_bookings bookings_source_src_0 - ) subq_12 - GROUP BY - metric_time__day -) subq_14 -FULL OUTER JOIN ( - -- Aggregate Measures - -- Compute Metrics via Expressions - SELECT - metric_time__day - , SUM(listings) AS listings - FROM ( - -- Read Elements From Semantic Model 'listings_latest' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: ['listings', 'metric_time__day'] - SELECT - DATE_TRUNC('day', created_at) AS metric_time__day - , 1 AS listings - FROM ***************************.dim_listings_latest listings_latest_src_0 - ) subq_17 - GROUP BY - metric_time__day -) subq_19 -ON - subq_14.metric_time__day = subq_19.metric_time__day -GROUP BY - COALESCE(subq_14.metric_time__day, subq_19.metric_time__day) diff --git a/tests/snapshots/test_rendered_query.py/str/DuckDB/test_id_enumeration_without_consistency_flag__second_query.sql b/tests/snapshots/test_rendered_query.py/str/DuckDB/test_id_enumeration_without_consistency_flag__second_query.sql deleted file mode 100644 index 2e0cf2f82c..0000000000 --- a/tests/snapshots/test_rendered_query.py/str/DuckDB/test_id_enumeration_without_consistency_flag__second_query.sql +++ /dev/null @@ -1,45 +0,0 @@ --- Combine Aggregated Outputs -SELECT - COALESCE(subq_24.metric_time__day, subq_29.metric_time__day) AS metric_time__day - , MAX(subq_24.bookings) AS bookings - , MAX(subq_29.listings) AS listings -FROM ( - -- Aggregate Measures - -- Compute Metrics via Expressions - SELECT - metric_time__day - , SUM(bookings) AS bookings - FROM ( - -- Read Elements From Semantic Model 'bookings_source' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: ['bookings', 'metric_time__day'] - SELECT - DATE_TRUNC('day', ds) AS metric_time__day - , 1 AS bookings - FROM ***************************.fct_bookings bookings_source_src_0 - ) subq_22 - GROUP BY - metric_time__day -) subq_24 -FULL OUTER JOIN ( - -- Aggregate Measures - -- Compute Metrics via Expressions - SELECT - metric_time__day - , SUM(listings) AS listings - FROM ( - -- Read Elements From Semantic Model 'listings_latest' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: ['listings', 'metric_time__day'] - SELECT - DATE_TRUNC('day', created_at) AS metric_time__day - , 1 AS listings - FROM ***************************.dim_listings_latest listings_latest_src_0 - ) subq_27 - GROUP BY - metric_time__day -) subq_29 -ON - subq_24.metric_time__day = subq_29.metric_time__day -GROUP BY - COALESCE(subq_24.metric_time__day, subq_29.metric_time__day) diff --git a/tests/snapshots/test_rendered_query.py/str/Postgres/test_id_enumeration_without_consistency_flag__first_query.sql b/tests/snapshots/test_rendered_query.py/str/Postgres/test_id_enumeration_without_consistency_flag__first_query.sql deleted file mode 100644 index dd0944e363..0000000000 --- a/tests/snapshots/test_rendered_query.py/str/Postgres/test_id_enumeration_without_consistency_flag__first_query.sql +++ /dev/null @@ -1,45 +0,0 @@ --- Combine Aggregated Outputs -SELECT - COALESCE(subq_14.metric_time__day, subq_19.metric_time__day) AS metric_time__day - , MAX(subq_14.bookings) AS bookings - , MAX(subq_19.listings) AS listings -FROM ( - -- Aggregate Measures - -- Compute Metrics via Expressions - SELECT - metric_time__day - , SUM(bookings) AS bookings - FROM ( - -- Read Elements From Semantic Model 'bookings_source' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: ['bookings', 'metric_time__day'] - SELECT - DATE_TRUNC('day', ds) AS metric_time__day - , 1 AS bookings - FROM ***************************.fct_bookings bookings_source_src_0 - ) subq_12 - GROUP BY - metric_time__day -) subq_14 -FULL OUTER JOIN ( - -- Aggregate Measures - -- Compute Metrics via Expressions - SELECT - metric_time__day - , SUM(listings) AS listings - FROM ( - -- Read Elements From Semantic Model 'listings_latest' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: ['listings', 'metric_time__day'] - SELECT - DATE_TRUNC('day', created_at) AS metric_time__day - , 1 AS listings - FROM ***************************.dim_listings_latest listings_latest_src_0 - ) subq_17 - GROUP BY - metric_time__day -) subq_19 -ON - subq_14.metric_time__day = subq_19.metric_time__day -GROUP BY - COALESCE(subq_14.metric_time__day, subq_19.metric_time__day) diff --git a/tests/snapshots/test_rendered_query.py/str/Postgres/test_id_enumeration_without_consistency_flag__second_query.sql b/tests/snapshots/test_rendered_query.py/str/Postgres/test_id_enumeration_without_consistency_flag__second_query.sql deleted file mode 100644 index 2e0cf2f82c..0000000000 --- a/tests/snapshots/test_rendered_query.py/str/Postgres/test_id_enumeration_without_consistency_flag__second_query.sql +++ /dev/null @@ -1,45 +0,0 @@ --- Combine Aggregated Outputs -SELECT - COALESCE(subq_24.metric_time__day, subq_29.metric_time__day) AS metric_time__day - , MAX(subq_24.bookings) AS bookings - , MAX(subq_29.listings) AS listings -FROM ( - -- Aggregate Measures - -- Compute Metrics via Expressions - SELECT - metric_time__day - , SUM(bookings) AS bookings - FROM ( - -- Read Elements From Semantic Model 'bookings_source' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: ['bookings', 'metric_time__day'] - SELECT - DATE_TRUNC('day', ds) AS metric_time__day - , 1 AS bookings - FROM ***************************.fct_bookings bookings_source_src_0 - ) subq_22 - GROUP BY - metric_time__day -) subq_24 -FULL OUTER JOIN ( - -- Aggregate Measures - -- Compute Metrics via Expressions - SELECT - metric_time__day - , SUM(listings) AS listings - FROM ( - -- Read Elements From Semantic Model 'listings_latest' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: ['listings', 'metric_time__day'] - SELECT - DATE_TRUNC('day', created_at) AS metric_time__day - , 1 AS listings - FROM ***************************.dim_listings_latest listings_latest_src_0 - ) subq_27 - GROUP BY - metric_time__day -) subq_29 -ON - subq_24.metric_time__day = subq_29.metric_time__day -GROUP BY - COALESCE(subq_24.metric_time__day, subq_29.metric_time__day) diff --git a/tests/snapshots/test_rendered_query.py/str/Redshift/test_id_enumeration_without_consistency_flag__first_query.sql b/tests/snapshots/test_rendered_query.py/str/Redshift/test_id_enumeration_without_consistency_flag__first_query.sql deleted file mode 100644 index dd0944e363..0000000000 --- a/tests/snapshots/test_rendered_query.py/str/Redshift/test_id_enumeration_without_consistency_flag__first_query.sql +++ /dev/null @@ -1,45 +0,0 @@ --- Combine Aggregated Outputs -SELECT - COALESCE(subq_14.metric_time__day, subq_19.metric_time__day) AS metric_time__day - , MAX(subq_14.bookings) AS bookings - , MAX(subq_19.listings) AS listings -FROM ( - -- Aggregate Measures - -- Compute Metrics via Expressions - SELECT - metric_time__day - , SUM(bookings) AS bookings - FROM ( - -- Read Elements From Semantic Model 'bookings_source' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: ['bookings', 'metric_time__day'] - SELECT - DATE_TRUNC('day', ds) AS metric_time__day - , 1 AS bookings - FROM ***************************.fct_bookings bookings_source_src_0 - ) subq_12 - GROUP BY - metric_time__day -) subq_14 -FULL OUTER JOIN ( - -- Aggregate Measures - -- Compute Metrics via Expressions - SELECT - metric_time__day - , SUM(listings) AS listings - FROM ( - -- Read Elements From Semantic Model 'listings_latest' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: ['listings', 'metric_time__day'] - SELECT - DATE_TRUNC('day', created_at) AS metric_time__day - , 1 AS listings - FROM ***************************.dim_listings_latest listings_latest_src_0 - ) subq_17 - GROUP BY - metric_time__day -) subq_19 -ON - subq_14.metric_time__day = subq_19.metric_time__day -GROUP BY - COALESCE(subq_14.metric_time__day, subq_19.metric_time__day) diff --git a/tests/snapshots/test_rendered_query.py/str/Redshift/test_id_enumeration_without_consistency_flag__second_query.sql b/tests/snapshots/test_rendered_query.py/str/Redshift/test_id_enumeration_without_consistency_flag__second_query.sql deleted file mode 100644 index 2e0cf2f82c..0000000000 --- a/tests/snapshots/test_rendered_query.py/str/Redshift/test_id_enumeration_without_consistency_flag__second_query.sql +++ /dev/null @@ -1,45 +0,0 @@ --- Combine Aggregated Outputs -SELECT - COALESCE(subq_24.metric_time__day, subq_29.metric_time__day) AS metric_time__day - , MAX(subq_24.bookings) AS bookings - , MAX(subq_29.listings) AS listings -FROM ( - -- Aggregate Measures - -- Compute Metrics via Expressions - SELECT - metric_time__day - , SUM(bookings) AS bookings - FROM ( - -- Read Elements From Semantic Model 'bookings_source' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: ['bookings', 'metric_time__day'] - SELECT - DATE_TRUNC('day', ds) AS metric_time__day - , 1 AS bookings - FROM ***************************.fct_bookings bookings_source_src_0 - ) subq_22 - GROUP BY - metric_time__day -) subq_24 -FULL OUTER JOIN ( - -- Aggregate Measures - -- Compute Metrics via Expressions - SELECT - metric_time__day - , SUM(listings) AS listings - FROM ( - -- Read Elements From Semantic Model 'listings_latest' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: ['listings', 'metric_time__day'] - SELECT - DATE_TRUNC('day', created_at) AS metric_time__day - , 1 AS listings - FROM ***************************.dim_listings_latest listings_latest_src_0 - ) subq_27 - GROUP BY - metric_time__day -) subq_29 -ON - subq_24.metric_time__day = subq_29.metric_time__day -GROUP BY - COALESCE(subq_24.metric_time__day, subq_29.metric_time__day) diff --git a/tests/snapshots/test_rendered_query.py/str/Snowflake/test_id_enumeration_without_consistency_flag__first_query.sql b/tests/snapshots/test_rendered_query.py/str/Snowflake/test_id_enumeration_without_consistency_flag__first_query.sql deleted file mode 100644 index dd0944e363..0000000000 --- a/tests/snapshots/test_rendered_query.py/str/Snowflake/test_id_enumeration_without_consistency_flag__first_query.sql +++ /dev/null @@ -1,45 +0,0 @@ --- Combine Aggregated Outputs -SELECT - COALESCE(subq_14.metric_time__day, subq_19.metric_time__day) AS metric_time__day - , MAX(subq_14.bookings) AS bookings - , MAX(subq_19.listings) AS listings -FROM ( - -- Aggregate Measures - -- Compute Metrics via Expressions - SELECT - metric_time__day - , SUM(bookings) AS bookings - FROM ( - -- Read Elements From Semantic Model 'bookings_source' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: ['bookings', 'metric_time__day'] - SELECT - DATE_TRUNC('day', ds) AS metric_time__day - , 1 AS bookings - FROM ***************************.fct_bookings bookings_source_src_0 - ) subq_12 - GROUP BY - metric_time__day -) subq_14 -FULL OUTER JOIN ( - -- Aggregate Measures - -- Compute Metrics via Expressions - SELECT - metric_time__day - , SUM(listings) AS listings - FROM ( - -- Read Elements From Semantic Model 'listings_latest' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: ['listings', 'metric_time__day'] - SELECT - DATE_TRUNC('day', created_at) AS metric_time__day - , 1 AS listings - FROM ***************************.dim_listings_latest listings_latest_src_0 - ) subq_17 - GROUP BY - metric_time__day -) subq_19 -ON - subq_14.metric_time__day = subq_19.metric_time__day -GROUP BY - COALESCE(subq_14.metric_time__day, subq_19.metric_time__day) diff --git a/tests/snapshots/test_rendered_query.py/str/Snowflake/test_id_enumeration_without_consistency_flag__second_query.sql b/tests/snapshots/test_rendered_query.py/str/Snowflake/test_id_enumeration_without_consistency_flag__second_query.sql deleted file mode 100644 index 2e0cf2f82c..0000000000 --- a/tests/snapshots/test_rendered_query.py/str/Snowflake/test_id_enumeration_without_consistency_flag__second_query.sql +++ /dev/null @@ -1,45 +0,0 @@ --- Combine Aggregated Outputs -SELECT - COALESCE(subq_24.metric_time__day, subq_29.metric_time__day) AS metric_time__day - , MAX(subq_24.bookings) AS bookings - , MAX(subq_29.listings) AS listings -FROM ( - -- Aggregate Measures - -- Compute Metrics via Expressions - SELECT - metric_time__day - , SUM(bookings) AS bookings - FROM ( - -- Read Elements From Semantic Model 'bookings_source' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: ['bookings', 'metric_time__day'] - SELECT - DATE_TRUNC('day', ds) AS metric_time__day - , 1 AS bookings - FROM ***************************.fct_bookings bookings_source_src_0 - ) subq_22 - GROUP BY - metric_time__day -) subq_24 -FULL OUTER JOIN ( - -- Aggregate Measures - -- Compute Metrics via Expressions - SELECT - metric_time__day - , SUM(listings) AS listings - FROM ( - -- Read Elements From Semantic Model 'listings_latest' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: ['listings', 'metric_time__day'] - SELECT - DATE_TRUNC('day', created_at) AS metric_time__day - , 1 AS listings - FROM ***************************.dim_listings_latest listings_latest_src_0 - ) subq_27 - GROUP BY - metric_time__day -) subq_29 -ON - subq_24.metric_time__day = subq_29.metric_time__day -GROUP BY - COALESCE(subq_24.metric_time__day, subq_29.metric_time__day) diff --git a/tests/snapshots/test_rendered_query.py/str/Trino/test_id_enumeration_without_consistency_flag__first_query.sql b/tests/snapshots/test_rendered_query.py/str/Trino/test_id_enumeration_without_consistency_flag__first_query.sql deleted file mode 100644 index dd0944e363..0000000000 --- a/tests/snapshots/test_rendered_query.py/str/Trino/test_id_enumeration_without_consistency_flag__first_query.sql +++ /dev/null @@ -1,45 +0,0 @@ --- Combine Aggregated Outputs -SELECT - COALESCE(subq_14.metric_time__day, subq_19.metric_time__day) AS metric_time__day - , MAX(subq_14.bookings) AS bookings - , MAX(subq_19.listings) AS listings -FROM ( - -- Aggregate Measures - -- Compute Metrics via Expressions - SELECT - metric_time__day - , SUM(bookings) AS bookings - FROM ( - -- Read Elements From Semantic Model 'bookings_source' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: ['bookings', 'metric_time__day'] - SELECT - DATE_TRUNC('day', ds) AS metric_time__day - , 1 AS bookings - FROM ***************************.fct_bookings bookings_source_src_0 - ) subq_12 - GROUP BY - metric_time__day -) subq_14 -FULL OUTER JOIN ( - -- Aggregate Measures - -- Compute Metrics via Expressions - SELECT - metric_time__day - , SUM(listings) AS listings - FROM ( - -- Read Elements From Semantic Model 'listings_latest' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: ['listings', 'metric_time__day'] - SELECT - DATE_TRUNC('day', created_at) AS metric_time__day - , 1 AS listings - FROM ***************************.dim_listings_latest listings_latest_src_0 - ) subq_17 - GROUP BY - metric_time__day -) subq_19 -ON - subq_14.metric_time__day = subq_19.metric_time__day -GROUP BY - COALESCE(subq_14.metric_time__day, subq_19.metric_time__day) diff --git a/tests/snapshots/test_rendered_query.py/str/Trino/test_id_enumeration_without_consistency_flag__second_query.sql b/tests/snapshots/test_rendered_query.py/str/Trino/test_id_enumeration_without_consistency_flag__second_query.sql deleted file mode 100644 index 2e0cf2f82c..0000000000 --- a/tests/snapshots/test_rendered_query.py/str/Trino/test_id_enumeration_without_consistency_flag__second_query.sql +++ /dev/null @@ -1,45 +0,0 @@ --- Combine Aggregated Outputs -SELECT - COALESCE(subq_24.metric_time__day, subq_29.metric_time__day) AS metric_time__day - , MAX(subq_24.bookings) AS bookings - , MAX(subq_29.listings) AS listings -FROM ( - -- Aggregate Measures - -- Compute Metrics via Expressions - SELECT - metric_time__day - , SUM(bookings) AS bookings - FROM ( - -- Read Elements From Semantic Model 'bookings_source' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: ['bookings', 'metric_time__day'] - SELECT - DATE_TRUNC('day', ds) AS metric_time__day - , 1 AS bookings - FROM ***************************.fct_bookings bookings_source_src_0 - ) subq_22 - GROUP BY - metric_time__day -) subq_24 -FULL OUTER JOIN ( - -- Aggregate Measures - -- Compute Metrics via Expressions - SELECT - metric_time__day - , SUM(listings) AS listings - FROM ( - -- Read Elements From Semantic Model 'listings_latest' - -- Metric Time Dimension 'ds' - -- Pass Only Elements: ['listings', 'metric_time__day'] - SELECT - DATE_TRUNC('day', created_at) AS metric_time__day - , 1 AS listings - FROM ***************************.dim_listings_latest listings_latest_src_0 - ) subq_27 - GROUP BY - metric_time__day -) subq_29 -ON - subq_24.metric_time__day = subq_29.metric_time__day -GROUP BY - COALESCE(subq_24.metric_time__day, subq_29.metric_time__day)