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 abec542070..e78994d824 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,30 +1,30 @@ -- 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 - , EXTRACT(year FROM users_latest_src_10008.ds) AS ds__extract_year - , EXTRACT(quarter FROM users_latest_src_10008.ds) AS ds__extract_quarter - , EXTRACT(month FROM users_latest_src_10008.ds) AS ds__extract_month - , EXTRACT(isoweek FROM users_latest_src_10008.ds) AS ds__extract_week - , EXTRACT(day FROM users_latest_src_10008.ds) AS ds__extract_day - , EXTRACT(dayofweek FROM users_latest_src_10008.ds) AS ds__extract_dow - , EXTRACT(dayofyear FROM users_latest_src_10008.ds) AS ds__extract_doy + 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 + , EXTRACT(year FROM users_latest_src_10008.ds) AS ds_latest__extract_year + , EXTRACT(quarter FROM users_latest_src_10008.ds) AS ds_latest__extract_quarter + , EXTRACT(month FROM users_latest_src_10008.ds) AS ds_latest__extract_month + , EXTRACT(isoweek FROM users_latest_src_10008.ds) AS ds_latest__extract_week + , EXTRACT(day FROM users_latest_src_10008.ds) AS ds_latest__extract_day + , EXTRACT(dayofweek FROM users_latest_src_10008.ds) AS ds_latest__extract_dow + , EXTRACT(dayofyear FROM users_latest_src_10008.ds) AS ds_latest__extract_doy , 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 - , EXTRACT(year FROM users_latest_src_10008.ds) AS user__ds__extract_year - , EXTRACT(quarter FROM users_latest_src_10008.ds) AS user__ds__extract_quarter - , EXTRACT(month FROM users_latest_src_10008.ds) AS user__ds__extract_month - , EXTRACT(isoweek FROM users_latest_src_10008.ds) AS user__ds__extract_week - , EXTRACT(day FROM users_latest_src_10008.ds) AS user__ds__extract_day - , EXTRACT(dayofweek FROM users_latest_src_10008.ds) AS user__ds__extract_dow - , EXTRACT(dayofyear FROM users_latest_src_10008.ds) AS user__ds__extract_doy + , 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 + , EXTRACT(year FROM users_latest_src_10008.ds) AS user__ds_latest__extract_year + , EXTRACT(quarter FROM users_latest_src_10008.ds) AS user__ds_latest__extract_quarter + , EXTRACT(month FROM users_latest_src_10008.ds) AS user__ds_latest__extract_month + , EXTRACT(isoweek FROM users_latest_src_10008.ds) AS user__ds_latest__extract_week + , EXTRACT(day FROM users_latest_src_10008.ds) AS user__ds_latest__extract_day + , EXTRACT(dayofweek FROM users_latest_src_10008.ds) AS user__ds_latest__extract_dow + , EXTRACT(dayofyear FROM users_latest_src_10008.ds) AS user__ds_latest__extract_doy , 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 e96f783576..184fc0044a 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,30 +1,30 @@ -- 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 - , EXTRACT(year FROM users_latest_src_10008.ds) AS ds__extract_year - , EXTRACT(quarter FROM users_latest_src_10008.ds) AS ds__extract_quarter - , EXTRACT(month FROM users_latest_src_10008.ds) AS ds__extract_month - , EXTRACT(week FROM users_latest_src_10008.ds) AS ds__extract_week - , EXTRACT(day FROM users_latest_src_10008.ds) AS ds__extract_day - , EXTRACT(dow FROM users_latest_src_10008.ds) AS ds__extract_dow - , EXTRACT(doy FROM users_latest_src_10008.ds) AS ds__extract_doy + 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 + , EXTRACT(year FROM users_latest_src_10008.ds) AS ds_latest__extract_year + , EXTRACT(quarter FROM users_latest_src_10008.ds) AS ds_latest__extract_quarter + , EXTRACT(month FROM users_latest_src_10008.ds) AS ds_latest__extract_month + , EXTRACT(week FROM users_latest_src_10008.ds) AS ds_latest__extract_week + , EXTRACT(day FROM users_latest_src_10008.ds) AS ds_latest__extract_day + , EXTRACT(dow FROM users_latest_src_10008.ds) AS ds_latest__extract_dow + , EXTRACT(doy FROM users_latest_src_10008.ds) AS ds_latest__extract_doy , 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 - , EXTRACT(year FROM users_latest_src_10008.ds) AS user__ds__extract_year - , EXTRACT(quarter FROM users_latest_src_10008.ds) AS user__ds__extract_quarter - , EXTRACT(month FROM users_latest_src_10008.ds) AS user__ds__extract_month - , EXTRACT(week FROM users_latest_src_10008.ds) AS user__ds__extract_week - , EXTRACT(day FROM users_latest_src_10008.ds) AS user__ds__extract_day - , EXTRACT(dow FROM users_latest_src_10008.ds) AS user__ds__extract_dow - , EXTRACT(doy FROM users_latest_src_10008.ds) AS user__ds__extract_doy + , 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 + , EXTRACT(year FROM users_latest_src_10008.ds) AS user__ds_latest__extract_year + , EXTRACT(quarter FROM users_latest_src_10008.ds) AS user__ds_latest__extract_quarter + , EXTRACT(month FROM users_latest_src_10008.ds) AS user__ds_latest__extract_month + , EXTRACT(week FROM users_latest_src_10008.ds) AS user__ds_latest__extract_week + , EXTRACT(day FROM users_latest_src_10008.ds) AS user__ds_latest__extract_day + , EXTRACT(dow FROM users_latest_src_10008.ds) AS user__ds_latest__extract_dow + , EXTRACT(doy FROM users_latest_src_10008.ds) AS user__ds_latest__extract_doy , 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 e96f783576..184fc0044a 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,30 +1,30 @@ -- 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 - , EXTRACT(year FROM users_latest_src_10008.ds) AS ds__extract_year - , EXTRACT(quarter FROM users_latest_src_10008.ds) AS ds__extract_quarter - , EXTRACT(month FROM users_latest_src_10008.ds) AS ds__extract_month - , EXTRACT(week FROM users_latest_src_10008.ds) AS ds__extract_week - , EXTRACT(day FROM users_latest_src_10008.ds) AS ds__extract_day - , EXTRACT(dow FROM users_latest_src_10008.ds) AS ds__extract_dow - , EXTRACT(doy FROM users_latest_src_10008.ds) AS ds__extract_doy + 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 + , EXTRACT(year FROM users_latest_src_10008.ds) AS ds_latest__extract_year + , EXTRACT(quarter FROM users_latest_src_10008.ds) AS ds_latest__extract_quarter + , EXTRACT(month FROM users_latest_src_10008.ds) AS ds_latest__extract_month + , EXTRACT(week FROM users_latest_src_10008.ds) AS ds_latest__extract_week + , EXTRACT(day FROM users_latest_src_10008.ds) AS ds_latest__extract_day + , EXTRACT(dow FROM users_latest_src_10008.ds) AS ds_latest__extract_dow + , EXTRACT(doy FROM users_latest_src_10008.ds) AS ds_latest__extract_doy , 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 - , EXTRACT(year FROM users_latest_src_10008.ds) AS user__ds__extract_year - , EXTRACT(quarter FROM users_latest_src_10008.ds) AS user__ds__extract_quarter - , EXTRACT(month FROM users_latest_src_10008.ds) AS user__ds__extract_month - , EXTRACT(week FROM users_latest_src_10008.ds) AS user__ds__extract_week - , EXTRACT(day FROM users_latest_src_10008.ds) AS user__ds__extract_day - , EXTRACT(dow FROM users_latest_src_10008.ds) AS user__ds__extract_dow - , EXTRACT(doy FROM users_latest_src_10008.ds) AS user__ds__extract_doy + , 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 + , EXTRACT(year FROM users_latest_src_10008.ds) AS user__ds_latest__extract_year + , EXTRACT(quarter FROM users_latest_src_10008.ds) AS user__ds_latest__extract_quarter + , EXTRACT(month FROM users_latest_src_10008.ds) AS user__ds_latest__extract_month + , EXTRACT(week FROM users_latest_src_10008.ds) AS user__ds_latest__extract_week + , EXTRACT(day FROM users_latest_src_10008.ds) AS user__ds_latest__extract_day + , EXTRACT(dow FROM users_latest_src_10008.ds) AS user__ds_latest__extract_dow + , EXTRACT(doy FROM users_latest_src_10008.ds) AS user__ds_latest__extract_doy , 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 e96f783576..184fc0044a 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,30 +1,30 @@ -- 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 - , EXTRACT(year FROM users_latest_src_10008.ds) AS ds__extract_year - , EXTRACT(quarter FROM users_latest_src_10008.ds) AS ds__extract_quarter - , EXTRACT(month FROM users_latest_src_10008.ds) AS ds__extract_month - , EXTRACT(week FROM users_latest_src_10008.ds) AS ds__extract_week - , EXTRACT(day FROM users_latest_src_10008.ds) AS ds__extract_day - , EXTRACT(dow FROM users_latest_src_10008.ds) AS ds__extract_dow - , EXTRACT(doy FROM users_latest_src_10008.ds) AS ds__extract_doy + 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 + , EXTRACT(year FROM users_latest_src_10008.ds) AS ds_latest__extract_year + , EXTRACT(quarter FROM users_latest_src_10008.ds) AS ds_latest__extract_quarter + , EXTRACT(month FROM users_latest_src_10008.ds) AS ds_latest__extract_month + , EXTRACT(week FROM users_latest_src_10008.ds) AS ds_latest__extract_week + , EXTRACT(day FROM users_latest_src_10008.ds) AS ds_latest__extract_day + , EXTRACT(dow FROM users_latest_src_10008.ds) AS ds_latest__extract_dow + , EXTRACT(doy FROM users_latest_src_10008.ds) AS ds_latest__extract_doy , 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 - , EXTRACT(year FROM users_latest_src_10008.ds) AS user__ds__extract_year - , EXTRACT(quarter FROM users_latest_src_10008.ds) AS user__ds__extract_quarter - , EXTRACT(month FROM users_latest_src_10008.ds) AS user__ds__extract_month - , EXTRACT(week FROM users_latest_src_10008.ds) AS user__ds__extract_week - , EXTRACT(day FROM users_latest_src_10008.ds) AS user__ds__extract_day - , EXTRACT(dow FROM users_latest_src_10008.ds) AS user__ds__extract_dow - , EXTRACT(doy FROM users_latest_src_10008.ds) AS user__ds__extract_doy + , 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 + , EXTRACT(year FROM users_latest_src_10008.ds) AS user__ds_latest__extract_year + , EXTRACT(quarter FROM users_latest_src_10008.ds) AS user__ds_latest__extract_quarter + , EXTRACT(month FROM users_latest_src_10008.ds) AS user__ds_latest__extract_month + , EXTRACT(week FROM users_latest_src_10008.ds) AS user__ds_latest__extract_week + , EXTRACT(day FROM users_latest_src_10008.ds) AS user__ds_latest__extract_day + , EXTRACT(dow FROM users_latest_src_10008.ds) AS user__ds_latest__extract_dow + , EXTRACT(doy FROM users_latest_src_10008.ds) AS user__ds_latest__extract_doy , 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 e96f783576..184fc0044a 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,30 +1,30 @@ -- 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 - , EXTRACT(year FROM users_latest_src_10008.ds) AS ds__extract_year - , EXTRACT(quarter FROM users_latest_src_10008.ds) AS ds__extract_quarter - , EXTRACT(month FROM users_latest_src_10008.ds) AS ds__extract_month - , EXTRACT(week FROM users_latest_src_10008.ds) AS ds__extract_week - , EXTRACT(day FROM users_latest_src_10008.ds) AS ds__extract_day - , EXTRACT(dow FROM users_latest_src_10008.ds) AS ds__extract_dow - , EXTRACT(doy FROM users_latest_src_10008.ds) AS ds__extract_doy + 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 + , EXTRACT(year FROM users_latest_src_10008.ds) AS ds_latest__extract_year + , EXTRACT(quarter FROM users_latest_src_10008.ds) AS ds_latest__extract_quarter + , EXTRACT(month FROM users_latest_src_10008.ds) AS ds_latest__extract_month + , EXTRACT(week FROM users_latest_src_10008.ds) AS ds_latest__extract_week + , EXTRACT(day FROM users_latest_src_10008.ds) AS ds_latest__extract_day + , EXTRACT(dow FROM users_latest_src_10008.ds) AS ds_latest__extract_dow + , EXTRACT(doy FROM users_latest_src_10008.ds) AS ds_latest__extract_doy , 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 - , EXTRACT(year FROM users_latest_src_10008.ds) AS user__ds__extract_year - , EXTRACT(quarter FROM users_latest_src_10008.ds) AS user__ds__extract_quarter - , EXTRACT(month FROM users_latest_src_10008.ds) AS user__ds__extract_month - , EXTRACT(week FROM users_latest_src_10008.ds) AS user__ds__extract_week - , EXTRACT(day FROM users_latest_src_10008.ds) AS user__ds__extract_day - , EXTRACT(dow FROM users_latest_src_10008.ds) AS user__ds__extract_dow - , EXTRACT(doy FROM users_latest_src_10008.ds) AS user__ds__extract_doy + , 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 + , EXTRACT(year FROM users_latest_src_10008.ds) AS user__ds_latest__extract_year + , EXTRACT(quarter FROM users_latest_src_10008.ds) AS user__ds_latest__extract_quarter + , EXTRACT(month FROM users_latest_src_10008.ds) AS user__ds_latest__extract_month + , EXTRACT(week FROM users_latest_src_10008.ds) AS user__ds_latest__extract_week + , EXTRACT(day FROM users_latest_src_10008.ds) AS user__ds_latest__extract_day + , EXTRACT(dow FROM users_latest_src_10008.ds) AS user__ds_latest__extract_dow + , EXTRACT(doy FROM users_latest_src_10008.ds) AS user__ds_latest__extract_doy , 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 e96f783576..184fc0044a 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,30 +1,30 @@ -- 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 - , EXTRACT(year FROM users_latest_src_10008.ds) AS ds__extract_year - , EXTRACT(quarter FROM users_latest_src_10008.ds) AS ds__extract_quarter - , EXTRACT(month FROM users_latest_src_10008.ds) AS ds__extract_month - , EXTRACT(week FROM users_latest_src_10008.ds) AS ds__extract_week - , EXTRACT(day FROM users_latest_src_10008.ds) AS ds__extract_day - , EXTRACT(dow FROM users_latest_src_10008.ds) AS ds__extract_dow - , EXTRACT(doy FROM users_latest_src_10008.ds) AS ds__extract_doy + 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 + , EXTRACT(year FROM users_latest_src_10008.ds) AS ds_latest__extract_year + , EXTRACT(quarter FROM users_latest_src_10008.ds) AS ds_latest__extract_quarter + , EXTRACT(month FROM users_latest_src_10008.ds) AS ds_latest__extract_month + , EXTRACT(week FROM users_latest_src_10008.ds) AS ds_latest__extract_week + , EXTRACT(day FROM users_latest_src_10008.ds) AS ds_latest__extract_day + , EXTRACT(dow FROM users_latest_src_10008.ds) AS ds_latest__extract_dow + , EXTRACT(doy FROM users_latest_src_10008.ds) AS ds_latest__extract_doy , 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 - , EXTRACT(year FROM users_latest_src_10008.ds) AS user__ds__extract_year - , EXTRACT(quarter FROM users_latest_src_10008.ds) AS user__ds__extract_quarter - , EXTRACT(month FROM users_latest_src_10008.ds) AS user__ds__extract_month - , EXTRACT(week FROM users_latest_src_10008.ds) AS user__ds__extract_week - , EXTRACT(day FROM users_latest_src_10008.ds) AS user__ds__extract_day - , EXTRACT(dow FROM users_latest_src_10008.ds) AS user__ds__extract_dow - , EXTRACT(doy FROM users_latest_src_10008.ds) AS user__ds__extract_doy + , 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 + , EXTRACT(year FROM users_latest_src_10008.ds) AS user__ds_latest__extract_year + , EXTRACT(quarter FROM users_latest_src_10008.ds) AS user__ds_latest__extract_quarter + , EXTRACT(month FROM users_latest_src_10008.ds) AS user__ds_latest__extract_month + , EXTRACT(week FROM users_latest_src_10008.ds) AS user__ds_latest__extract_week + , EXTRACT(day FROM users_latest_src_10008.ds) AS user__ds_latest__extract_day + , EXTRACT(dow FROM users_latest_src_10008.ds) AS user__ds_latest__extract_dow + , EXTRACT(doy FROM users_latest_src_10008.ds) AS user__ds_latest__extract_doy , 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..8a7e479c82 --- /dev/null +++ b/metricflow/test/snapshots/test_convert_semantic_model.py/list/test_convert_table_semantic_model_with_measures__result0.txt @@ -0,0 +1,54 @@ +['ds__day', + 'ds__extract_day', + 'ds__extract_dow', + 'ds__extract_doy', + 'ds__extract_month', + 'ds__extract_quarter', + 'ds__extract_week', + 'ds__extract_year', + 'ds__month', + 'ds__quarter', + 'ds__week', + 'ds__year', + 'ds_partitioned__day', + 'ds_partitioned__extract_day', + 'ds_partitioned__extract_dow', + 'ds_partitioned__extract_doy', + 'ds_partitioned__extract_month', + 'ds_partitioned__extract_quarter', + 'ds_partitioned__extract_week', + 'ds_partitioned__extract_year', + 'ds_partitioned__month', + 'ds_partitioned__quarter', + 'ds_partitioned__week', + 'ds_partitioned__year', + 'identity_verifications', + 'user', + 'verification', + 'verification__ds__day', + 'verification__ds__extract_day', + 'verification__ds__extract_dow', + 'verification__ds__extract_doy', + 'verification__ds__extract_month', + 'verification__ds__extract_quarter', + 'verification__ds__extract_week', + 'verification__ds__extract_year', + 'verification__ds__month', + 'verification__ds__quarter', + 'verification__ds__week', + 'verification__ds__year', + 'verification__ds_partitioned__day', + 'verification__ds_partitioned__extract_day', + 'verification__ds_partitioned__extract_dow', + 'verification__ds_partitioned__extract_doy', + 'verification__ds_partitioned__extract_month', + 'verification__ds_partitioned__extract_quarter', + 'verification__ds_partitioned__extract_week', + 'verification__ds_partitioned__extract_year', + '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..10a8d5d514 --- /dev/null +++ b/metricflow/test/snapshots/test_convert_semantic_model.py/list/test_convert_table_semantic_model_without_measures__result0.txt @@ -0,0 +1,27 @@ +['ds_latest__day', + 'ds_latest__extract_day', + 'ds_latest__extract_dow', + 'ds_latest__extract_doy', + 'ds_latest__extract_month', + 'ds_latest__extract_quarter', + 'ds_latest__extract_week', + 'ds_latest__extract_year', + 'ds_latest__month', + 'ds_latest__quarter', + 'ds_latest__week', + 'ds_latest__year', + 'home_state_latest', + 'user', + 'user__ds_latest__day', + 'user__ds_latest__extract_day', + 'user__ds_latest__extract_dow', + 'user__ds_latest__extract_doy', + 'user__ds_latest__extract_month', + 'user__ds_latest__extract_quarter', + 'user__ds_latest__extract_week', + 'user__ds_latest__extract_year', + '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 59e26e6b2d..d393bdc021 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 @@ -188,6 +188,18 @@ FROM ( , subq_3.account_id__ds_partitioned__extract_day AS account_id__ds_partitioned__extract_day , subq_3.account_id__ds_partitioned__extract_dow AS account_id__ds_partitioned__extract_dow , subq_3.account_id__ds_partitioned__extract_doy AS account_id__ds_partitioned__extract_doy + , 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_3.bridge_account__ds_partitioned__extract_year AS bridge_account__ds_partitioned__extract_year + , subq_3.bridge_account__ds_partitioned__extract_quarter AS bridge_account__ds_partitioned__extract_quarter + , subq_3.bridge_account__ds_partitioned__extract_month AS bridge_account__ds_partitioned__extract_month + , subq_3.bridge_account__ds_partitioned__extract_week AS bridge_account__ds_partitioned__extract_week + , subq_3.bridge_account__ds_partitioned__extract_day AS bridge_account__ds_partitioned__extract_day + , subq_3.bridge_account__ds_partitioned__extract_dow AS bridge_account__ds_partitioned__extract_dow + , subq_3.bridge_account__ds_partitioned__extract_doy AS bridge_account__ds_partitioned__extract_doy , 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 @@ -203,8 +215,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 ( @@ -236,9 +251,24 @@ FROM ( , EXTRACT(day FROM bridge_table_src_10011.ds_partitioned) AS account_id__ds_partitioned__extract_day , EXTRACT(dayofweek FROM bridge_table_src_10011.ds_partitioned) AS account_id__ds_partitioned__extract_dow , EXTRACT(dayofyear FROM bridge_table_src_10011.ds_partitioned) AS account_id__ds_partitioned__extract_doy + , 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 + , EXTRACT(year FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_year + , EXTRACT(quarter FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_quarter + , EXTRACT(month FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_month + , EXTRACT(isoweek FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_week + , EXTRACT(day FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_day + , EXTRACT(dayofweek FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_dow + , EXTRACT(dayofyear FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_doy , 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 0d1825bde4..c742d95f11 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 @@ -188,6 +188,18 @@ FROM ( , subq_3.account_id__ds_partitioned__extract_day AS account_id__ds_partitioned__extract_day , subq_3.account_id__ds_partitioned__extract_dow AS account_id__ds_partitioned__extract_dow , subq_3.account_id__ds_partitioned__extract_doy AS account_id__ds_partitioned__extract_doy + , 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_3.bridge_account__ds_partitioned__extract_year AS bridge_account__ds_partitioned__extract_year + , subq_3.bridge_account__ds_partitioned__extract_quarter AS bridge_account__ds_partitioned__extract_quarter + , subq_3.bridge_account__ds_partitioned__extract_month AS bridge_account__ds_partitioned__extract_month + , subq_3.bridge_account__ds_partitioned__extract_week AS bridge_account__ds_partitioned__extract_week + , subq_3.bridge_account__ds_partitioned__extract_day AS bridge_account__ds_partitioned__extract_day + , subq_3.bridge_account__ds_partitioned__extract_dow AS bridge_account__ds_partitioned__extract_dow + , subq_3.bridge_account__ds_partitioned__extract_doy AS bridge_account__ds_partitioned__extract_doy , 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 @@ -203,8 +215,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 ( @@ -236,9 +251,24 @@ FROM ( , EXTRACT(day FROM bridge_table_src_10011.ds_partitioned) AS account_id__ds_partitioned__extract_day , EXTRACT(dow FROM bridge_table_src_10011.ds_partitioned) AS account_id__ds_partitioned__extract_dow , EXTRACT(doy FROM bridge_table_src_10011.ds_partitioned) AS account_id__ds_partitioned__extract_doy + , 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 + , EXTRACT(year FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_year + , EXTRACT(quarter FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_quarter + , EXTRACT(month FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_month + , EXTRACT(week FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_week + , EXTRACT(day FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_day + , EXTRACT(dow FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_dow + , EXTRACT(doy FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_doy , 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 0d1825bde4..c742d95f11 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 @@ -188,6 +188,18 @@ FROM ( , subq_3.account_id__ds_partitioned__extract_day AS account_id__ds_partitioned__extract_day , subq_3.account_id__ds_partitioned__extract_dow AS account_id__ds_partitioned__extract_dow , subq_3.account_id__ds_partitioned__extract_doy AS account_id__ds_partitioned__extract_doy + , 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_3.bridge_account__ds_partitioned__extract_year AS bridge_account__ds_partitioned__extract_year + , subq_3.bridge_account__ds_partitioned__extract_quarter AS bridge_account__ds_partitioned__extract_quarter + , subq_3.bridge_account__ds_partitioned__extract_month AS bridge_account__ds_partitioned__extract_month + , subq_3.bridge_account__ds_partitioned__extract_week AS bridge_account__ds_partitioned__extract_week + , subq_3.bridge_account__ds_partitioned__extract_day AS bridge_account__ds_partitioned__extract_day + , subq_3.bridge_account__ds_partitioned__extract_dow AS bridge_account__ds_partitioned__extract_dow + , subq_3.bridge_account__ds_partitioned__extract_doy AS bridge_account__ds_partitioned__extract_doy , 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 @@ -203,8 +215,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 ( @@ -236,9 +251,24 @@ FROM ( , EXTRACT(day FROM bridge_table_src_10011.ds_partitioned) AS account_id__ds_partitioned__extract_day , EXTRACT(dow FROM bridge_table_src_10011.ds_partitioned) AS account_id__ds_partitioned__extract_dow , EXTRACT(doy FROM bridge_table_src_10011.ds_partitioned) AS account_id__ds_partitioned__extract_doy + , 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 + , EXTRACT(year FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_year + , EXTRACT(quarter FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_quarter + , EXTRACT(month FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_month + , EXTRACT(week FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_week + , EXTRACT(day FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_day + , EXTRACT(dow FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_dow + , EXTRACT(doy FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_doy , 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 0d1825bde4..c742d95f11 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 @@ -188,6 +188,18 @@ FROM ( , subq_3.account_id__ds_partitioned__extract_day AS account_id__ds_partitioned__extract_day , subq_3.account_id__ds_partitioned__extract_dow AS account_id__ds_partitioned__extract_dow , subq_3.account_id__ds_partitioned__extract_doy AS account_id__ds_partitioned__extract_doy + , 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_3.bridge_account__ds_partitioned__extract_year AS bridge_account__ds_partitioned__extract_year + , subq_3.bridge_account__ds_partitioned__extract_quarter AS bridge_account__ds_partitioned__extract_quarter + , subq_3.bridge_account__ds_partitioned__extract_month AS bridge_account__ds_partitioned__extract_month + , subq_3.bridge_account__ds_partitioned__extract_week AS bridge_account__ds_partitioned__extract_week + , subq_3.bridge_account__ds_partitioned__extract_day AS bridge_account__ds_partitioned__extract_day + , subq_3.bridge_account__ds_partitioned__extract_dow AS bridge_account__ds_partitioned__extract_dow + , subq_3.bridge_account__ds_partitioned__extract_doy AS bridge_account__ds_partitioned__extract_doy , 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 @@ -203,8 +215,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 ( @@ -236,9 +251,24 @@ FROM ( , EXTRACT(day FROM bridge_table_src_10011.ds_partitioned) AS account_id__ds_partitioned__extract_day , EXTRACT(dow FROM bridge_table_src_10011.ds_partitioned) AS account_id__ds_partitioned__extract_dow , EXTRACT(doy FROM bridge_table_src_10011.ds_partitioned) AS account_id__ds_partitioned__extract_doy + , 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 + , EXTRACT(year FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_year + , EXTRACT(quarter FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_quarter + , EXTRACT(month FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_month + , EXTRACT(week FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_week + , EXTRACT(day FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_day + , EXTRACT(dow FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_dow + , EXTRACT(doy FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_doy , 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 0d1825bde4..c742d95f11 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 @@ -188,6 +188,18 @@ FROM ( , subq_3.account_id__ds_partitioned__extract_day AS account_id__ds_partitioned__extract_day , subq_3.account_id__ds_partitioned__extract_dow AS account_id__ds_partitioned__extract_dow , subq_3.account_id__ds_partitioned__extract_doy AS account_id__ds_partitioned__extract_doy + , 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_3.bridge_account__ds_partitioned__extract_year AS bridge_account__ds_partitioned__extract_year + , subq_3.bridge_account__ds_partitioned__extract_quarter AS bridge_account__ds_partitioned__extract_quarter + , subq_3.bridge_account__ds_partitioned__extract_month AS bridge_account__ds_partitioned__extract_month + , subq_3.bridge_account__ds_partitioned__extract_week AS bridge_account__ds_partitioned__extract_week + , subq_3.bridge_account__ds_partitioned__extract_day AS bridge_account__ds_partitioned__extract_day + , subq_3.bridge_account__ds_partitioned__extract_dow AS bridge_account__ds_partitioned__extract_dow + , subq_3.bridge_account__ds_partitioned__extract_doy AS bridge_account__ds_partitioned__extract_doy , 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 @@ -203,8 +215,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 ( @@ -236,9 +251,24 @@ FROM ( , EXTRACT(day FROM bridge_table_src_10011.ds_partitioned) AS account_id__ds_partitioned__extract_day , EXTRACT(dow FROM bridge_table_src_10011.ds_partitioned) AS account_id__ds_partitioned__extract_dow , EXTRACT(doy FROM bridge_table_src_10011.ds_partitioned) AS account_id__ds_partitioned__extract_doy + , 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 + , EXTRACT(year FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_year + , EXTRACT(quarter FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_quarter + , EXTRACT(month FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_month + , EXTRACT(week FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_week + , EXTRACT(day FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_day + , EXTRACT(dow FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_dow + , EXTRACT(doy FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_doy , 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 0d1825bde4..c742d95f11 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 @@ -188,6 +188,18 @@ FROM ( , subq_3.account_id__ds_partitioned__extract_day AS account_id__ds_partitioned__extract_day , subq_3.account_id__ds_partitioned__extract_dow AS account_id__ds_partitioned__extract_dow , subq_3.account_id__ds_partitioned__extract_doy AS account_id__ds_partitioned__extract_doy + , 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_3.bridge_account__ds_partitioned__extract_year AS bridge_account__ds_partitioned__extract_year + , subq_3.bridge_account__ds_partitioned__extract_quarter AS bridge_account__ds_partitioned__extract_quarter + , subq_3.bridge_account__ds_partitioned__extract_month AS bridge_account__ds_partitioned__extract_month + , subq_3.bridge_account__ds_partitioned__extract_week AS bridge_account__ds_partitioned__extract_week + , subq_3.bridge_account__ds_partitioned__extract_day AS bridge_account__ds_partitioned__extract_day + , subq_3.bridge_account__ds_partitioned__extract_dow AS bridge_account__ds_partitioned__extract_dow + , subq_3.bridge_account__ds_partitioned__extract_doy AS bridge_account__ds_partitioned__extract_doy , 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 @@ -203,8 +215,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 ( @@ -236,9 +251,24 @@ FROM ( , EXTRACT(day FROM bridge_table_src_10011.ds_partitioned) AS account_id__ds_partitioned__extract_day , EXTRACT(dow FROM bridge_table_src_10011.ds_partitioned) AS account_id__ds_partitioned__extract_dow , EXTRACT(doy FROM bridge_table_src_10011.ds_partitioned) AS account_id__ds_partitioned__extract_doy + , 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 + , EXTRACT(year FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_year + , EXTRACT(quarter FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_quarter + , EXTRACT(month FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_month + , EXTRACT(week FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_week + , EXTRACT(day FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_day + , EXTRACT(dow FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_dow + , EXTRACT(doy FROM bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__extract_doy , 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 79159f5015..6072f1480d 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 @@ -549,347 +549,347 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -929,231 +929,231 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 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 ff39aa7c9b..8bdf2ed4b4 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 @@ -528,347 +528,347 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -1199,231 +1199,231 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -1579,111 +1579,111 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 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 ce6f655f22..54f4173efc 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 @@ -528,347 +528,347 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -1034,15 +1034,15 @@ - + - + - + @@ -1319,207 +1319,207 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 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 188f6f7b0d..371989c2c7 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,15 +82,15 @@ - + - + - + @@ -99,259 +99,259 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -583,15 +583,15 @@ - + - + - + @@ -600,175 +600,235 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + - + - + - + - + - + + + + + - + - + @@ -888,15 +948,75 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -940,119 +1060,119 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -1061,119 +1181,119 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 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 3abcc19d22..cf0414792a 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 @@ -25,16 +25,16 @@ 'ds__year', 'txn_revenue', 'user', - 'user__ds__day', - 'user__ds__extract_day', - 'user__ds__extract_dow', - 'user__ds__extract_doy', - 'user__ds__extract_month', - 'user__ds__extract_quarter', - 'user__ds__extract_week', - 'user__ds__extract_year', - 'user__ds__month', - 'user__ds__quarter', - 'user__ds__week', - 'user__ds__year', + 'user__ds_latest__day', + 'user__ds_latest__extract_day', + 'user__ds_latest__extract_dow', + 'user__ds_latest__extract_doy', + 'user__ds_latest__extract_month', + 'user__ds_latest__extract_quarter', + 'user__ds_latest__extract_week', + 'user__ds_latest__extract_year', + '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',