From d4743472c2cda507fb5d3d114ce17a0b0cbf9d4d Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Tue, 8 Aug 2023 15:55:59 -0700 Subject: [PATCH] Update test snapshots. --- metricflow/test/generate_snapshots.py | 3 +- ...semantic_model_without_measures__plan0.sql | 20 +- ...semantic_model_without_measures__plan0.sql | 20 +- ...semantic_model_without_measures__plan0.sql | 20 +- ...semantic_model_without_measures__plan0.sql | 20 +- ...semantic_model_without_measures__plan0.sql | 20 +- ...semantic_model_without_measures__plan0.sql | 20 +- ..._semantic_model_with_measures__result0.txt | 26 ++ ...mantic_model_without_measures__result0.txt | 13 + .../BigQuery/test_multihop_node__plan0.sql | 16 + .../Databricks/test_multihop_node__plan0.sql | 16 + .../DuckDB/test_multihop_node__plan0.sql | 16 + .../Postgres/test_multihop_node__plan0.sql | 16 + .../Redshift/test_multihop_node__plan0.sql | 16 + .../Snowflake/test_multihop_node__plan0.sql | 16 + .../test_join_to_scd_dimension__plan0.xml | 146 ++++---- ...multi_hop_through_scd_dimension__plan0.xml | 172 ++++----- ...test_multi_hop_to_scd_dimension__plan0.xml | 140 ++++---- .../test_multihop_node__plan0.xml | 338 +++++++++++------- .../str/test_all_properties__result0.txt | 10 + .../test_joined_node_data_set__result0.txt | 10 +- .../dict/test_get_names__result0.txt | 1 + .../str/test_linkable_set__result0.txt | 4 + ...imensions_in_different_models__result0.txt | 2 + .../test_elements_for_metric__result0.txt | 4 + 25 files changed, 653 insertions(+), 432 deletions(-) create mode 100644 metricflow/test/snapshots/test_convert_semantic_model.py/list/test_convert_table_semantic_model_with_measures__result0.txt create mode 100644 metricflow/test/snapshots/test_convert_semantic_model.py/list/test_convert_table_semantic_model_without_measures__result0.txt diff --git a/metricflow/test/generate_snapshots.py b/metricflow/test/generate_snapshots.py index 64b87d91b5..ece4ff78ce 100644 --- a/metricflow/test/generate_snapshots.py +++ b/metricflow/test/generate_snapshots.py @@ -153,7 +153,8 @@ def run_tests(test_configuration: MetricFlowTestConfiguration, test_file_paths: engine_name = test_configuration.engine.value.lower() os.environ["MF_TEST_ADAPTER_TYPE"] = engine_name hatch_env = f"{engine_name}-env" - use_persistent_source_schema = test_configuration.engine != SqlEngine.POSTGRES + # use_persistent_source_schema = test_configuration.engine != SqlEngine.POSTGRES + use_persistent_source_schema = False run_command( f"hatch -v run {hatch_env}:pytest -x -vv -n 4 " f"--overwrite-snapshots" diff --git a/metricflow/test/snapshots/test_convert_semantic_model.py/SqlQueryPlan/BigQuery/test_convert_table_semantic_model_without_measures__plan0.sql b/metricflow/test/snapshots/test_convert_semantic_model.py/SqlQueryPlan/BigQuery/test_convert_table_semantic_model_without_measures__plan0.sql index 73911c3dd1..2250a63a9c 100644 --- a/metricflow/test/snapshots/test_convert_semantic_model.py/SqlQueryPlan/BigQuery/test_convert_table_semantic_model_without_measures__plan0.sql +++ b/metricflow/test/snapshots/test_convert_semantic_model.py/SqlQueryPlan/BigQuery/test_convert_table_semantic_model_without_measures__plan0.sql @@ -1,16 +1,16 @@ -- Read Elements From Semantic Model 'users_latest' SELECT - users_latest_src_10008.ds AS ds__day - , DATE_TRUNC(users_latest_src_10008.ds, isoweek) AS ds__week - , DATE_TRUNC(users_latest_src_10008.ds, month) AS ds__month - , DATE_TRUNC(users_latest_src_10008.ds, quarter) AS ds__quarter - , DATE_TRUNC(users_latest_src_10008.ds, year) AS ds__year + users_latest_src_10008.ds AS ds_latest__day + , DATE_TRUNC(users_latest_src_10008.ds, isoweek) AS ds_latest__week + , DATE_TRUNC(users_latest_src_10008.ds, month) AS ds_latest__month + , DATE_TRUNC(users_latest_src_10008.ds, quarter) AS ds_latest__quarter + , DATE_TRUNC(users_latest_src_10008.ds, year) AS ds_latest__year , users_latest_src_10008.home_state_latest - , users_latest_src_10008.ds AS user__ds__day - , DATE_TRUNC(users_latest_src_10008.ds, isoweek) AS user__ds__week - , DATE_TRUNC(users_latest_src_10008.ds, month) AS user__ds__month - , DATE_TRUNC(users_latest_src_10008.ds, quarter) AS user__ds__quarter - , DATE_TRUNC(users_latest_src_10008.ds, year) AS user__ds__year + , users_latest_src_10008.ds AS user__ds_latest__day + , DATE_TRUNC(users_latest_src_10008.ds, isoweek) AS user__ds_latest__week + , DATE_TRUNC(users_latest_src_10008.ds, month) AS user__ds_latest__month + , DATE_TRUNC(users_latest_src_10008.ds, quarter) AS user__ds_latest__quarter + , DATE_TRUNC(users_latest_src_10008.ds, year) AS user__ds_latest__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 diff --git a/metricflow/test/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Databricks/test_convert_table_semantic_model_without_measures__plan0.sql b/metricflow/test/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Databricks/test_convert_table_semantic_model_without_measures__plan0.sql index 75e1612840..c93c11b262 100644 --- a/metricflow/test/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Databricks/test_convert_table_semantic_model_without_measures__plan0.sql +++ b/metricflow/test/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Databricks/test_convert_table_semantic_model_without_measures__plan0.sql @@ -1,16 +1,16 @@ -- Read Elements From Semantic Model 'users_latest' SELECT - users_latest_src_10008.ds AS ds__day - , 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.ds AS ds_latest__day + , DATE_TRUNC('week', users_latest_src_10008.ds) AS ds_latest__week + , DATE_TRUNC('month', users_latest_src_10008.ds) AS ds_latest__month + , DATE_TRUNC('quarter', users_latest_src_10008.ds) AS ds_latest__quarter + , DATE_TRUNC('year', users_latest_src_10008.ds) AS ds_latest__year , users_latest_src_10008.home_state_latest - , users_latest_src_10008.ds AS user__ds__day - , 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.ds AS user__ds_latest__day + , DATE_TRUNC('week', users_latest_src_10008.ds) AS user__ds_latest__week + , DATE_TRUNC('month', users_latest_src_10008.ds) AS user__ds_latest__month + , DATE_TRUNC('quarter', users_latest_src_10008.ds) AS user__ds_latest__quarter + , DATE_TRUNC('year', users_latest_src_10008.ds) AS user__ds_latest__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 diff --git a/metricflow/test/snapshots/test_convert_semantic_model.py/SqlQueryPlan/DuckDB/test_convert_table_semantic_model_without_measures__plan0.sql b/metricflow/test/snapshots/test_convert_semantic_model.py/SqlQueryPlan/DuckDB/test_convert_table_semantic_model_without_measures__plan0.sql index 75e1612840..c93c11b262 100644 --- a/metricflow/test/snapshots/test_convert_semantic_model.py/SqlQueryPlan/DuckDB/test_convert_table_semantic_model_without_measures__plan0.sql +++ b/metricflow/test/snapshots/test_convert_semantic_model.py/SqlQueryPlan/DuckDB/test_convert_table_semantic_model_without_measures__plan0.sql @@ -1,16 +1,16 @@ -- Read Elements From Semantic Model 'users_latest' SELECT - users_latest_src_10008.ds AS ds__day - , 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.ds AS ds_latest__day + , DATE_TRUNC('week', users_latest_src_10008.ds) AS ds_latest__week + , DATE_TRUNC('month', users_latest_src_10008.ds) AS ds_latest__month + , DATE_TRUNC('quarter', users_latest_src_10008.ds) AS ds_latest__quarter + , DATE_TRUNC('year', users_latest_src_10008.ds) AS ds_latest__year , users_latest_src_10008.home_state_latest - , users_latest_src_10008.ds AS user__ds__day - , 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.ds AS user__ds_latest__day + , DATE_TRUNC('week', users_latest_src_10008.ds) AS user__ds_latest__week + , DATE_TRUNC('month', users_latest_src_10008.ds) AS user__ds_latest__month + , DATE_TRUNC('quarter', users_latest_src_10008.ds) AS user__ds_latest__quarter + , DATE_TRUNC('year', users_latest_src_10008.ds) AS user__ds_latest__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 diff --git a/metricflow/test/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Postgres/test_convert_table_semantic_model_without_measures__plan0.sql b/metricflow/test/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Postgres/test_convert_table_semantic_model_without_measures__plan0.sql index 75e1612840..c93c11b262 100644 --- a/metricflow/test/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Postgres/test_convert_table_semantic_model_without_measures__plan0.sql +++ b/metricflow/test/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Postgres/test_convert_table_semantic_model_without_measures__plan0.sql @@ -1,16 +1,16 @@ -- Read Elements From Semantic Model 'users_latest' SELECT - users_latest_src_10008.ds AS ds__day - , 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.ds AS ds_latest__day + , DATE_TRUNC('week', users_latest_src_10008.ds) AS ds_latest__week + , DATE_TRUNC('month', users_latest_src_10008.ds) AS ds_latest__month + , DATE_TRUNC('quarter', users_latest_src_10008.ds) AS ds_latest__quarter + , DATE_TRUNC('year', users_latest_src_10008.ds) AS ds_latest__year , users_latest_src_10008.home_state_latest - , users_latest_src_10008.ds AS user__ds__day - , 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.ds AS user__ds_latest__day + , DATE_TRUNC('week', users_latest_src_10008.ds) AS user__ds_latest__week + , DATE_TRUNC('month', users_latest_src_10008.ds) AS user__ds_latest__month + , DATE_TRUNC('quarter', users_latest_src_10008.ds) AS user__ds_latest__quarter + , DATE_TRUNC('year', users_latest_src_10008.ds) AS user__ds_latest__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 diff --git a/metricflow/test/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Redshift/test_convert_table_semantic_model_without_measures__plan0.sql b/metricflow/test/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Redshift/test_convert_table_semantic_model_without_measures__plan0.sql index 75e1612840..c93c11b262 100644 --- a/metricflow/test/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Redshift/test_convert_table_semantic_model_without_measures__plan0.sql +++ b/metricflow/test/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Redshift/test_convert_table_semantic_model_without_measures__plan0.sql @@ -1,16 +1,16 @@ -- Read Elements From Semantic Model 'users_latest' SELECT - users_latest_src_10008.ds AS ds__day - , 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.ds AS ds_latest__day + , DATE_TRUNC('week', users_latest_src_10008.ds) AS ds_latest__week + , DATE_TRUNC('month', users_latest_src_10008.ds) AS ds_latest__month + , DATE_TRUNC('quarter', users_latest_src_10008.ds) AS ds_latest__quarter + , DATE_TRUNC('year', users_latest_src_10008.ds) AS ds_latest__year , users_latest_src_10008.home_state_latest - , users_latest_src_10008.ds AS user__ds__day - , 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.ds AS user__ds_latest__day + , DATE_TRUNC('week', users_latest_src_10008.ds) AS user__ds_latest__week + , DATE_TRUNC('month', users_latest_src_10008.ds) AS user__ds_latest__month + , DATE_TRUNC('quarter', users_latest_src_10008.ds) AS user__ds_latest__quarter + , DATE_TRUNC('year', users_latest_src_10008.ds) AS user__ds_latest__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 diff --git a/metricflow/test/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Snowflake/test_convert_table_semantic_model_without_measures__plan0.sql b/metricflow/test/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Snowflake/test_convert_table_semantic_model_without_measures__plan0.sql index 75e1612840..c93c11b262 100644 --- a/metricflow/test/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Snowflake/test_convert_table_semantic_model_without_measures__plan0.sql +++ b/metricflow/test/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Snowflake/test_convert_table_semantic_model_without_measures__plan0.sql @@ -1,16 +1,16 @@ -- Read Elements From Semantic Model 'users_latest' SELECT - users_latest_src_10008.ds AS ds__day - , 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.ds AS ds_latest__day + , DATE_TRUNC('week', users_latest_src_10008.ds) AS ds_latest__week + , DATE_TRUNC('month', users_latest_src_10008.ds) AS ds_latest__month + , DATE_TRUNC('quarter', users_latest_src_10008.ds) AS ds_latest__quarter + , DATE_TRUNC('year', users_latest_src_10008.ds) AS ds_latest__year , users_latest_src_10008.home_state_latest - , users_latest_src_10008.ds AS user__ds__day - , 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.ds AS user__ds_latest__day + , DATE_TRUNC('week', users_latest_src_10008.ds) AS user__ds_latest__week + , DATE_TRUNC('month', users_latest_src_10008.ds) AS user__ds_latest__month + , DATE_TRUNC('quarter', users_latest_src_10008.ds) AS user__ds_latest__quarter + , DATE_TRUNC('year', users_latest_src_10008.ds) AS user__ds_latest__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 diff --git a/metricflow/test/snapshots/test_convert_semantic_model.py/list/test_convert_table_semantic_model_with_measures__result0.txt b/metricflow/test/snapshots/test_convert_semantic_model.py/list/test_convert_table_semantic_model_with_measures__result0.txt new file mode 100644 index 0000000000..6eb9b3b386 --- /dev/null +++ b/metricflow/test/snapshots/test_convert_semantic_model.py/list/test_convert_table_semantic_model_with_measures__result0.txt @@ -0,0 +1,26 @@ +['ds__day', + 'ds__month', + 'ds__quarter', + 'ds__week', + 'ds__year', + 'ds_partitioned__day', + 'ds_partitioned__month', + 'ds_partitioned__quarter', + 'ds_partitioned__week', + 'ds_partitioned__year', + 'identity_verifications', + 'user', + 'verification', + 'verification__ds__day', + 'verification__ds__month', + 'verification__ds__quarter', + 'verification__ds__week', + 'verification__ds__year', + 'verification__ds_partitioned__day', + 'verification__ds_partitioned__month', + 'verification__ds_partitioned__quarter', + 'verification__ds_partitioned__week', + 'verification__ds_partitioned__year', + 'verification__user', + 'verification__verification_type', + 'verification_type'] diff --git a/metricflow/test/snapshots/test_convert_semantic_model.py/list/test_convert_table_semantic_model_without_measures__result0.txt b/metricflow/test/snapshots/test_convert_semantic_model.py/list/test_convert_table_semantic_model_without_measures__result0.txt new file mode 100644 index 0000000000..d7603d9c5d --- /dev/null +++ b/metricflow/test/snapshots/test_convert_semantic_model.py/list/test_convert_table_semantic_model_without_measures__result0.txt @@ -0,0 +1,13 @@ +['ds_latest__day', + 'ds_latest__month', + 'ds_latest__quarter', + 'ds_latest__week', + 'ds_latest__year', + 'home_state_latest', + 'user', + 'user__ds_latest__day', + 'user__ds_latest__month', + 'user__ds_latest__quarter', + 'user__ds_latest__week', + 'user__ds_latest__year', + 'user__home_state_latest'] diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_multihop_node__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_multihop_node__plan0.sql index 96381bbd71..c86bb33dcf 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_multihop_node__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_multihop_node__plan0.sql @@ -111,6 +111,11 @@ FROM ( , subq_3.account_id__ds_partitioned__month AS account_id__ds_partitioned__month , subq_3.account_id__ds_partitioned__quarter AS account_id__ds_partitioned__quarter , subq_3.account_id__ds_partitioned__year AS account_id__ds_partitioned__year + , subq_3.bridge_account__ds_partitioned__day AS bridge_account__ds_partitioned__day + , subq_3.bridge_account__ds_partitioned__week AS bridge_account__ds_partitioned__week + , subq_3.bridge_account__ds_partitioned__month AS bridge_account__ds_partitioned__month + , subq_3.bridge_account__ds_partitioned__quarter AS bridge_account__ds_partitioned__quarter + , subq_3.bridge_account__ds_partitioned__year AS bridge_account__ds_partitioned__year , subq_5.ds_partitioned__day AS customer_id__ds_partitioned__day , subq_5.ds_partitioned__week AS customer_id__ds_partitioned__week , subq_5.ds_partitioned__month AS customer_id__ds_partitioned__month @@ -119,8 +124,11 @@ FROM ( , subq_3.account_id AS account_id , subq_3.customer_id AS customer_id , subq_3.account_id__customer_id AS account_id__customer_id + , subq_3.bridge_account__account_id AS bridge_account__account_id + , subq_3.bridge_account__customer_id AS bridge_account__customer_id , subq_3.extra_dim AS extra_dim , subq_3.account_id__extra_dim AS account_id__extra_dim + , subq_3.bridge_account__extra_dim AS bridge_account__extra_dim , subq_5.customer_name AS customer_id__customer_name , subq_5.customer_atomic_weight AS customer_id__customer_atomic_weight FROM ( @@ -138,9 +146,17 @@ FROM ( , DATE_TRUNC(bridge_table_src_10011.ds_partitioned, month) AS account_id__ds_partitioned__month , DATE_TRUNC(bridge_table_src_10011.ds_partitioned, quarter) AS account_id__ds_partitioned__quarter , DATE_TRUNC(bridge_table_src_10011.ds_partitioned, year) AS account_id__ds_partitioned__year + , bridge_table_src_10011.extra_dim AS bridge_account__extra_dim + , bridge_table_src_10011.ds_partitioned AS bridge_account__ds_partitioned__day + , DATE_TRUNC(bridge_table_src_10011.ds_partitioned, isoweek) AS bridge_account__ds_partitioned__week + , DATE_TRUNC(bridge_table_src_10011.ds_partitioned, month) AS bridge_account__ds_partitioned__month + , DATE_TRUNC(bridge_table_src_10011.ds_partitioned, quarter) AS bridge_account__ds_partitioned__quarter + , DATE_TRUNC(bridge_table_src_10011.ds_partitioned, year) AS bridge_account__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 + , bridge_table_src_10011.account_id AS bridge_account__account_id + , bridge_table_src_10011.customer_id AS bridge_account__customer_id FROM ***************************.bridge_table bridge_table_src_10011 ) subq_3 LEFT OUTER JOIN ( diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_multihop_node__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_multihop_node__plan0.sql index d35179ebf0..3fda2c8f42 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_multihop_node__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_multihop_node__plan0.sql @@ -111,6 +111,11 @@ FROM ( , subq_3.account_id__ds_partitioned__month AS account_id__ds_partitioned__month , subq_3.account_id__ds_partitioned__quarter AS account_id__ds_partitioned__quarter , subq_3.account_id__ds_partitioned__year AS account_id__ds_partitioned__year + , subq_3.bridge_account__ds_partitioned__day AS bridge_account__ds_partitioned__day + , subq_3.bridge_account__ds_partitioned__week AS bridge_account__ds_partitioned__week + , subq_3.bridge_account__ds_partitioned__month AS bridge_account__ds_partitioned__month + , subq_3.bridge_account__ds_partitioned__quarter AS bridge_account__ds_partitioned__quarter + , subq_3.bridge_account__ds_partitioned__year AS bridge_account__ds_partitioned__year , subq_5.ds_partitioned__day AS customer_id__ds_partitioned__day , subq_5.ds_partitioned__week AS customer_id__ds_partitioned__week , subq_5.ds_partitioned__month AS customer_id__ds_partitioned__month @@ -119,8 +124,11 @@ FROM ( , subq_3.account_id AS account_id , subq_3.customer_id AS customer_id , subq_3.account_id__customer_id AS account_id__customer_id + , subq_3.bridge_account__account_id AS bridge_account__account_id + , subq_3.bridge_account__customer_id AS bridge_account__customer_id , subq_3.extra_dim AS extra_dim , subq_3.account_id__extra_dim AS account_id__extra_dim + , subq_3.bridge_account__extra_dim AS bridge_account__extra_dim , subq_5.customer_name AS customer_id__customer_name , subq_5.customer_atomic_weight AS customer_id__customer_atomic_weight FROM ( @@ -138,9 +146,17 @@ FROM ( , 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.extra_dim AS bridge_account__extra_dim + , bridge_table_src_10011.ds_partitioned AS bridge_account__ds_partitioned__day + , DATE_TRUNC('week', bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__week + , DATE_TRUNC('month', bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__month + , DATE_TRUNC('quarter', bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__quarter + , DATE_TRUNC('year', bridge_table_src_10011.ds_partitioned) AS bridge_account__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 + , bridge_table_src_10011.account_id AS bridge_account__account_id + , bridge_table_src_10011.customer_id AS bridge_account__customer_id FROM ***************************.bridge_table bridge_table_src_10011 ) subq_3 LEFT OUTER JOIN ( diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_multihop_node__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_multihop_node__plan0.sql index d35179ebf0..3fda2c8f42 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_multihop_node__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_multihop_node__plan0.sql @@ -111,6 +111,11 @@ FROM ( , subq_3.account_id__ds_partitioned__month AS account_id__ds_partitioned__month , subq_3.account_id__ds_partitioned__quarter AS account_id__ds_partitioned__quarter , subq_3.account_id__ds_partitioned__year AS account_id__ds_partitioned__year + , subq_3.bridge_account__ds_partitioned__day AS bridge_account__ds_partitioned__day + , subq_3.bridge_account__ds_partitioned__week AS bridge_account__ds_partitioned__week + , subq_3.bridge_account__ds_partitioned__month AS bridge_account__ds_partitioned__month + , subq_3.bridge_account__ds_partitioned__quarter AS bridge_account__ds_partitioned__quarter + , subq_3.bridge_account__ds_partitioned__year AS bridge_account__ds_partitioned__year , subq_5.ds_partitioned__day AS customer_id__ds_partitioned__day , subq_5.ds_partitioned__week AS customer_id__ds_partitioned__week , subq_5.ds_partitioned__month AS customer_id__ds_partitioned__month @@ -119,8 +124,11 @@ FROM ( , subq_3.account_id AS account_id , subq_3.customer_id AS customer_id , subq_3.account_id__customer_id AS account_id__customer_id + , subq_3.bridge_account__account_id AS bridge_account__account_id + , subq_3.bridge_account__customer_id AS bridge_account__customer_id , subq_3.extra_dim AS extra_dim , subq_3.account_id__extra_dim AS account_id__extra_dim + , subq_3.bridge_account__extra_dim AS bridge_account__extra_dim , subq_5.customer_name AS customer_id__customer_name , subq_5.customer_atomic_weight AS customer_id__customer_atomic_weight FROM ( @@ -138,9 +146,17 @@ FROM ( , 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.extra_dim AS bridge_account__extra_dim + , bridge_table_src_10011.ds_partitioned AS bridge_account__ds_partitioned__day + , DATE_TRUNC('week', bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__week + , DATE_TRUNC('month', bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__month + , DATE_TRUNC('quarter', bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__quarter + , DATE_TRUNC('year', bridge_table_src_10011.ds_partitioned) AS bridge_account__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 + , bridge_table_src_10011.account_id AS bridge_account__account_id + , bridge_table_src_10011.customer_id AS bridge_account__customer_id FROM ***************************.bridge_table bridge_table_src_10011 ) subq_3 LEFT OUTER JOIN ( diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_multihop_node__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_multihop_node__plan0.sql index d35179ebf0..3fda2c8f42 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_multihop_node__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_multihop_node__plan0.sql @@ -111,6 +111,11 @@ FROM ( , subq_3.account_id__ds_partitioned__month AS account_id__ds_partitioned__month , subq_3.account_id__ds_partitioned__quarter AS account_id__ds_partitioned__quarter , subq_3.account_id__ds_partitioned__year AS account_id__ds_partitioned__year + , subq_3.bridge_account__ds_partitioned__day AS bridge_account__ds_partitioned__day + , subq_3.bridge_account__ds_partitioned__week AS bridge_account__ds_partitioned__week + , subq_3.bridge_account__ds_partitioned__month AS bridge_account__ds_partitioned__month + , subq_3.bridge_account__ds_partitioned__quarter AS bridge_account__ds_partitioned__quarter + , subq_3.bridge_account__ds_partitioned__year AS bridge_account__ds_partitioned__year , subq_5.ds_partitioned__day AS customer_id__ds_partitioned__day , subq_5.ds_partitioned__week AS customer_id__ds_partitioned__week , subq_5.ds_partitioned__month AS customer_id__ds_partitioned__month @@ -119,8 +124,11 @@ FROM ( , subq_3.account_id AS account_id , subq_3.customer_id AS customer_id , subq_3.account_id__customer_id AS account_id__customer_id + , subq_3.bridge_account__account_id AS bridge_account__account_id + , subq_3.bridge_account__customer_id AS bridge_account__customer_id , subq_3.extra_dim AS extra_dim , subq_3.account_id__extra_dim AS account_id__extra_dim + , subq_3.bridge_account__extra_dim AS bridge_account__extra_dim , subq_5.customer_name AS customer_id__customer_name , subq_5.customer_atomic_weight AS customer_id__customer_atomic_weight FROM ( @@ -138,9 +146,17 @@ FROM ( , 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.extra_dim AS bridge_account__extra_dim + , bridge_table_src_10011.ds_partitioned AS bridge_account__ds_partitioned__day + , DATE_TRUNC('week', bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__week + , DATE_TRUNC('month', bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__month + , DATE_TRUNC('quarter', bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__quarter + , DATE_TRUNC('year', bridge_table_src_10011.ds_partitioned) AS bridge_account__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 + , bridge_table_src_10011.account_id AS bridge_account__account_id + , bridge_table_src_10011.customer_id AS bridge_account__customer_id FROM ***************************.bridge_table bridge_table_src_10011 ) subq_3 LEFT OUTER JOIN ( diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_multihop_node__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_multihop_node__plan0.sql index d35179ebf0..3fda2c8f42 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_multihop_node__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_multihop_node__plan0.sql @@ -111,6 +111,11 @@ FROM ( , subq_3.account_id__ds_partitioned__month AS account_id__ds_partitioned__month , subq_3.account_id__ds_partitioned__quarter AS account_id__ds_partitioned__quarter , subq_3.account_id__ds_partitioned__year AS account_id__ds_partitioned__year + , subq_3.bridge_account__ds_partitioned__day AS bridge_account__ds_partitioned__day + , subq_3.bridge_account__ds_partitioned__week AS bridge_account__ds_partitioned__week + , subq_3.bridge_account__ds_partitioned__month AS bridge_account__ds_partitioned__month + , subq_3.bridge_account__ds_partitioned__quarter AS bridge_account__ds_partitioned__quarter + , subq_3.bridge_account__ds_partitioned__year AS bridge_account__ds_partitioned__year , subq_5.ds_partitioned__day AS customer_id__ds_partitioned__day , subq_5.ds_partitioned__week AS customer_id__ds_partitioned__week , subq_5.ds_partitioned__month AS customer_id__ds_partitioned__month @@ -119,8 +124,11 @@ FROM ( , subq_3.account_id AS account_id , subq_3.customer_id AS customer_id , subq_3.account_id__customer_id AS account_id__customer_id + , subq_3.bridge_account__account_id AS bridge_account__account_id + , subq_3.bridge_account__customer_id AS bridge_account__customer_id , subq_3.extra_dim AS extra_dim , subq_3.account_id__extra_dim AS account_id__extra_dim + , subq_3.bridge_account__extra_dim AS bridge_account__extra_dim , subq_5.customer_name AS customer_id__customer_name , subq_5.customer_atomic_weight AS customer_id__customer_atomic_weight FROM ( @@ -138,9 +146,17 @@ FROM ( , 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.extra_dim AS bridge_account__extra_dim + , bridge_table_src_10011.ds_partitioned AS bridge_account__ds_partitioned__day + , DATE_TRUNC('week', bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__week + , DATE_TRUNC('month', bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__month + , DATE_TRUNC('quarter', bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__quarter + , DATE_TRUNC('year', bridge_table_src_10011.ds_partitioned) AS bridge_account__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 + , bridge_table_src_10011.account_id AS bridge_account__account_id + , bridge_table_src_10011.customer_id AS bridge_account__customer_id FROM ***************************.bridge_table bridge_table_src_10011 ) subq_3 LEFT OUTER JOIN ( diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_multihop_node__plan0.sql b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_multihop_node__plan0.sql index d35179ebf0..3fda2c8f42 100644 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_multihop_node__plan0.sql +++ b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_multihop_node__plan0.sql @@ -111,6 +111,11 @@ FROM ( , subq_3.account_id__ds_partitioned__month AS account_id__ds_partitioned__month , subq_3.account_id__ds_partitioned__quarter AS account_id__ds_partitioned__quarter , subq_3.account_id__ds_partitioned__year AS account_id__ds_partitioned__year + , subq_3.bridge_account__ds_partitioned__day AS bridge_account__ds_partitioned__day + , subq_3.bridge_account__ds_partitioned__week AS bridge_account__ds_partitioned__week + , subq_3.bridge_account__ds_partitioned__month AS bridge_account__ds_partitioned__month + , subq_3.bridge_account__ds_partitioned__quarter AS bridge_account__ds_partitioned__quarter + , subq_3.bridge_account__ds_partitioned__year AS bridge_account__ds_partitioned__year , subq_5.ds_partitioned__day AS customer_id__ds_partitioned__day , subq_5.ds_partitioned__week AS customer_id__ds_partitioned__week , subq_5.ds_partitioned__month AS customer_id__ds_partitioned__month @@ -119,8 +124,11 @@ FROM ( , subq_3.account_id AS account_id , subq_3.customer_id AS customer_id , subq_3.account_id__customer_id AS account_id__customer_id + , subq_3.bridge_account__account_id AS bridge_account__account_id + , subq_3.bridge_account__customer_id AS bridge_account__customer_id , subq_3.extra_dim AS extra_dim , subq_3.account_id__extra_dim AS account_id__extra_dim + , subq_3.bridge_account__extra_dim AS bridge_account__extra_dim , subq_5.customer_name AS customer_id__customer_name , subq_5.customer_atomic_weight AS customer_id__customer_atomic_weight FROM ( @@ -138,9 +146,17 @@ FROM ( , 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.extra_dim AS bridge_account__extra_dim + , bridge_table_src_10011.ds_partitioned AS bridge_account__ds_partitioned__day + , DATE_TRUNC('week', bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__week + , DATE_TRUNC('month', bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__month + , DATE_TRUNC('quarter', bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__quarter + , DATE_TRUNC('year', bridge_table_src_10011.ds_partitioned) AS bridge_account__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 + , bridge_table_src_10011.account_id AS bridge_account__account_id + , bridge_table_src_10011.customer_id AS bridge_account__customer_id FROM ***************************.bridge_table bridge_table_src_10011 ) subq_3 LEFT OUTER JOIN ( 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 039becd5f3..d5faaadea0 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 @@ -353,179 +353,179 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -565,119 +565,119 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 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 61d600e32e..8e29941b48 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 @@ -332,179 +332,179 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -695,119 +695,119 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -893,55 +893,55 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + 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 af8393dcd6..cc2e46d425 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 @@ -332,179 +332,179 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -614,15 +614,15 @@ - + - + - + @@ -759,95 +759,95 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 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 c6279b9625..bae6a6dc68 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 @@ -4,11 +4,11 @@ - + - + @@ -17,7 +17,7 @@ - + @@ -26,7 +26,7 @@ - + @@ -36,11 +36,11 @@ - + - + @@ -49,23 +49,23 @@ - + - + - + - + - + @@ -82,16 +82,16 @@ - + - + - - - - + + + + @@ -99,119 +99,119 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + @@ -331,15 +331,15 @@ - + - + - + @@ -348,91 +348,123 @@ - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + - + - + - + - + - + + + + + - + - + @@ -496,15 +528,47 @@ - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -534,63 +598,63 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -599,63 +663,63 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/metricflow/test/snapshots/test_linkable_spec_resolver.py/str/test_all_properties__result0.txt b/metricflow/test/snapshots/test_linkable_spec_resolver.py/str/test_all_properties__result0.txt index c8353a502b..26b6031523 100644 --- a/metricflow/test/snapshots/test_linkable_spec_resolver.py/str/test_all_properties__result0.txt +++ b/metricflow/test/snapshots/test_linkable_spec_resolver.py/str/test_all_properties__result0.txt @@ -28,12 +28,22 @@ users_ds_source ('listing', 'user') created_at MONTH users_ds_source ('listing', 'user') created_at QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] users_ds_source ('listing', 'user') created_at WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] users_ds_source ('listing', 'user') created_at YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds DAY ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] users_ds_source ('listing', 'user') ds_partitioned DAY ['JOINED', 'MULTI_HOP'] users_ds_source ('listing', 'user') ds_partitioned MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] users_ds_source ('listing', 'user') ds_partitioned QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] users_ds_source ('listing', 'user') ds_partitioned WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] users_ds_source ('listing', 'user') ds_partitioned YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] users_ds_source ('listing', 'user') home_state ['JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest DAY ['JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest MONTH ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest QUARTER ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest WEEK ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest YEAR ['DERIVED_TIME_GRANULARITY', 'JOINED', 'MULTI_HOP'] users_latest ('listing', 'user') home_state_latest ['JOINED', 'MULTI_HOP'] views_source () listing ['ENTITY', 'LOCAL'] views_source () metric_time DAY ['METRIC_TIME'] diff --git a/metricflow/test/snapshots/test_node_data_set.py/list/test_joined_node_data_set__result0.txt b/metricflow/test/snapshots/test_node_data_set.py/list/test_joined_node_data_set__result0.txt index 08f466a809..b00abc7965 100644 --- a/metricflow/test/snapshots/test_node_data_set.py/list/test_joined_node_data_set__result0.txt +++ b/metricflow/test/snapshots/test_node_data_set.py/list/test_joined_node_data_set__result0.txt @@ -11,9 +11,9 @@ 'ds__year', 'txn_revenue', 'user', - 'user__ds__day', - 'user__ds__month', - 'user__ds__quarter', - 'user__ds__week', - 'user__ds__year', + 'user__ds_latest__day', + 'user__ds_latest__month', + 'user__ds_latest__quarter', + 'user__ds_latest__week', + 'user__ds_latest__year', 'user__home_state_latest'] diff --git a/metricflow/test/snapshots/test_semantic_model_container.py/dict/test_get_names__result0.txt b/metricflow/test/snapshots/test_semantic_model_container.py/dict/test_get_names__result0.txt index f50761e42d..306ae39392 100644 --- a/metricflow/test/snapshots/test_semantic_model_container.py/dict/test_get_names__result0.txt +++ b/metricflow/test/snapshots/test_semantic_model_container.py/dict/test_get_names__result0.txt @@ -4,6 +4,7 @@ 'country_latest', 'created_at', 'ds', + 'ds_latest', 'ds_partitioned', 'home_state', 'home_state_latest', diff --git a/metricflow/test/snapshots/test_semantic_model_container.py/str/test_linkable_set__result0.txt b/metricflow/test/snapshots/test_semantic_model_container.py/str/test_linkable_set__result0.txt index b7d9cf0827..09c1c191ca 100644 --- a/metricflow/test/snapshots/test_semantic_model_container.py/str/test_linkable_set__result0.txt +++ b/metricflow/test/snapshots/test_semantic_model_container.py/str/test_linkable_set__result0.txt @@ -12,12 +12,16 @@ listings_latest ('listing',) is_lux_latest listings_latest ('listing',) user ['ENTITY', 'JOINED'] lux_listing_mapping ('listing',) lux_listing ['ENTITY', 'JOINED'] users_ds_source ('listing', 'user') created_at DAY ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds DAY ['JOINED', 'MULTI_HOP'] users_ds_source ('listing', 'user') ds_partitioned DAY ['JOINED', 'MULTI_HOP'] users_ds_source ('listing', 'user') home_state ['JOINED', 'MULTI_HOP'] users_ds_source ('user',) created_at DAY ['JOINED'] +users_ds_source ('user',) ds DAY ['JOINED'] users_ds_source ('user',) ds_partitioned DAY ['JOINED'] users_ds_source ('user',) home_state ['JOINED'] +users_latest ('listing', 'user') ds_latest DAY ['JOINED', 'MULTI_HOP'] users_latest ('listing', 'user') home_state_latest ['JOINED', 'MULTI_HOP'] +users_latest ('user',) ds_latest DAY ['JOINED'] users_latest ('user',) home_state_latest ['JOINED'] views_source () listing ['ENTITY', 'LOCAL'] views_source () user ['ENTITY', 'LOCAL'] diff --git a/metricflow/test/snapshots/test_semantic_model_container.py/str/test_linkable_set_for_common_dimensions_in_different_models__result0.txt b/metricflow/test/snapshots/test_semantic_model_container.py/str/test_linkable_set_for_common_dimensions_in_different_models__result0.txt index b56a470a75..2ff65f8c34 100644 --- a/metricflow/test/snapshots/test_semantic_model_container.py/str/test_linkable_set_for_common_dimensions_in_different_models__result0.txt +++ b/metricflow/test/snapshots/test_semantic_model_container.py/str/test_linkable_set_for_common_dimensions_in_different_models__result0.txt @@ -12,8 +12,10 @@ listings_latest ('listing',) is_lux_latest listings_latest ('listing',) user ['ENTITY', 'JOINED'] lux_listing_mapping ('listing',) lux_listing ['ENTITY', 'JOINED'] users_ds_source ('listing', 'user') created_at DAY ['JOINED', 'MULTI_HOP'] +users_ds_source ('listing', 'user') ds DAY ['JOINED', 'MULTI_HOP'] users_ds_source ('listing', 'user') ds_partitioned DAY ['JOINED', 'MULTI_HOP'] users_ds_source ('listing', 'user') home_state ['JOINED', 'MULTI_HOP'] +users_latest ('listing', 'user') ds_latest DAY ['JOINED', 'MULTI_HOP'] users_latest ('listing', 'user') home_state_latest ['JOINED', 'MULTI_HOP'] views_source () listing ['ENTITY', 'LOCAL'] views_source () metric_time DAY ['METRIC_TIME'] diff --git a/metricflow/test/snapshots/test_semantic_model_container.py/tuple/test_elements_for_metric__result0.txt b/metricflow/test/snapshots/test_semantic_model_container.py/tuple/test_elements_for_metric__result0.txt index 5891bc57cb..1a6e510df2 100644 --- a/metricflow/test/snapshots/test_semantic_model_container.py/tuple/test_elements_for_metric__result0.txt +++ b/metricflow/test/snapshots/test_semantic_model_container.py/tuple/test_elements_for_metric__result0.txt @@ -9,6 +9,8 @@ 'listing__user__company', 'listing__user__company_name', 'listing__user__created_at__day', + 'listing__user__ds__day', + 'listing__user__ds_latest__day', 'listing__user__ds_partitioned__day', 'listing__user__home_state', 'listing__user__home_state_latest', @@ -16,6 +18,8 @@ 'user__company', 'user__company_name', 'user__created_at__day', + 'user__ds__day', + 'user__ds_latest__day', 'user__ds_partitioned__day', 'user__home_state', 'user__home_state_latest',