-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4fe3c38
commit 8eec5a0
Showing
417 changed files
with
15,276 additions
and
15,269 deletions.
There are no files selected for viewing
52 changes: 26 additions & 26 deletions
52
...vert_semantic_model.py/SqlQueryPlan/BigQuery/test_convert_query_semantic_model__plan0.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
-- Read Elements From Semantic Model 'revenue' | ||
SELECT | ||
revenue_src_10006.revenue AS txn_revenue | ||
, DATE_TRUNC(revenue_src_10006.created_at, day) AS ds__day | ||
, DATE_TRUNC(revenue_src_10006.created_at, isoweek) AS ds__week | ||
, DATE_TRUNC(revenue_src_10006.created_at, month) AS ds__month | ||
, DATE_TRUNC(revenue_src_10006.created_at, quarter) AS ds__quarter | ||
, DATE_TRUNC(revenue_src_10006.created_at, year) AS ds__year | ||
, EXTRACT(year FROM revenue_src_10006.created_at) AS ds__extract_year | ||
, EXTRACT(quarter FROM revenue_src_10006.created_at) AS ds__extract_quarter | ||
, EXTRACT(month FROM revenue_src_10006.created_at) AS ds__extract_month | ||
, EXTRACT(day FROM revenue_src_10006.created_at) AS ds__extract_day | ||
, IF(EXTRACT(dayofweek FROM revenue_src_10006.created_at) = 1, 7, EXTRACT(dayofweek FROM revenue_src_10006.created_at) - 1) AS ds__extract_dow | ||
, EXTRACT(dayofyear FROM revenue_src_10006.created_at) AS ds__extract_doy | ||
, DATE_TRUNC(revenue_src_10006.created_at, day) AS company__ds__day | ||
, DATE_TRUNC(revenue_src_10006.created_at, isoweek) AS company__ds__week | ||
, DATE_TRUNC(revenue_src_10006.created_at, month) AS company__ds__month | ||
, DATE_TRUNC(revenue_src_10006.created_at, quarter) AS company__ds__quarter | ||
, DATE_TRUNC(revenue_src_10006.created_at, year) AS company__ds__year | ||
, EXTRACT(year FROM revenue_src_10006.created_at) AS company__ds__extract_year | ||
, EXTRACT(quarter FROM revenue_src_10006.created_at) AS company__ds__extract_quarter | ||
, EXTRACT(month FROM revenue_src_10006.created_at) AS company__ds__extract_month | ||
, EXTRACT(day FROM revenue_src_10006.created_at) AS company__ds__extract_day | ||
, IF(EXTRACT(dayofweek FROM revenue_src_10006.created_at) = 1, 7, EXTRACT(dayofweek FROM revenue_src_10006.created_at) - 1) AS company__ds__extract_dow | ||
, EXTRACT(dayofyear FROM revenue_src_10006.created_at) AS company__ds__extract_doy | ||
, revenue_src_10006.user_id AS user | ||
, revenue_src_10006.user_id AS company__user | ||
FROM ***************************.fct_revenue revenue_src_10006 | ||
revenue_src_10007.revenue AS txn_revenue | ||
, DATE_TRUNC(revenue_src_10007.created_at, day) AS ds__day | ||
, DATE_TRUNC(revenue_src_10007.created_at, isoweek) AS ds__week | ||
, DATE_TRUNC(revenue_src_10007.created_at, month) AS ds__month | ||
, DATE_TRUNC(revenue_src_10007.created_at, quarter) AS ds__quarter | ||
, DATE_TRUNC(revenue_src_10007.created_at, year) AS ds__year | ||
, EXTRACT(year FROM revenue_src_10007.created_at) AS ds__extract_year | ||
, EXTRACT(quarter FROM revenue_src_10007.created_at) AS ds__extract_quarter | ||
, EXTRACT(month FROM revenue_src_10007.created_at) AS ds__extract_month | ||
, EXTRACT(day FROM revenue_src_10007.created_at) AS ds__extract_day | ||
, IF(EXTRACT(dayofweek FROM revenue_src_10007.created_at) = 1, 7, EXTRACT(dayofweek FROM revenue_src_10007.created_at) - 1) AS ds__extract_dow | ||
, EXTRACT(dayofyear FROM revenue_src_10007.created_at) AS ds__extract_doy | ||
, DATE_TRUNC(revenue_src_10007.created_at, day) AS company__ds__day | ||
, DATE_TRUNC(revenue_src_10007.created_at, isoweek) AS company__ds__week | ||
, DATE_TRUNC(revenue_src_10007.created_at, month) AS company__ds__month | ||
, DATE_TRUNC(revenue_src_10007.created_at, quarter) AS company__ds__quarter | ||
, DATE_TRUNC(revenue_src_10007.created_at, year) AS company__ds__year | ||
, EXTRACT(year FROM revenue_src_10007.created_at) AS company__ds__extract_year | ||
, EXTRACT(quarter FROM revenue_src_10007.created_at) AS company__ds__extract_quarter | ||
, EXTRACT(month FROM revenue_src_10007.created_at) AS company__ds__extract_month | ||
, EXTRACT(day FROM revenue_src_10007.created_at) AS company__ds__extract_day | ||
, IF(EXTRACT(dayofweek FROM revenue_src_10007.created_at) = 1, 7, EXTRACT(dayofweek FROM revenue_src_10007.created_at) - 1) AS company__ds__extract_dow | ||
, EXTRACT(dayofyear FROM revenue_src_10007.created_at) AS company__ds__extract_doy | ||
, revenue_src_10007.user_id AS user | ||
, revenue_src_10007.user_id AS company__user | ||
FROM ***************************.fct_revenue revenue_src_10007 |
100 changes: 50 additions & 50 deletions
100
...model.py/SqlQueryPlan/BigQuery/test_convert_table_semantic_model_with_measures__plan0.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,53 @@ | ||
-- Read Elements From Semantic Model 'id_verifications' | ||
SELECT | ||
1 AS identity_verifications | ||
, DATE_TRUNC(id_verifications_src_10003.ds, day) AS ds__day | ||
, DATE_TRUNC(id_verifications_src_10003.ds, isoweek) AS ds__week | ||
, DATE_TRUNC(id_verifications_src_10003.ds, month) AS ds__month | ||
, DATE_TRUNC(id_verifications_src_10003.ds, quarter) AS ds__quarter | ||
, DATE_TRUNC(id_verifications_src_10003.ds, year) AS ds__year | ||
, EXTRACT(year FROM id_verifications_src_10003.ds) AS ds__extract_year | ||
, EXTRACT(quarter FROM id_verifications_src_10003.ds) AS ds__extract_quarter | ||
, EXTRACT(month FROM id_verifications_src_10003.ds) AS ds__extract_month | ||
, EXTRACT(day FROM id_verifications_src_10003.ds) AS ds__extract_day | ||
, IF(EXTRACT(dayofweek FROM id_verifications_src_10003.ds) = 1, 7, EXTRACT(dayofweek FROM id_verifications_src_10003.ds) - 1) AS ds__extract_dow | ||
, EXTRACT(dayofyear FROM id_verifications_src_10003.ds) AS ds__extract_doy | ||
, DATE_TRUNC(id_verifications_src_10003.ds_partitioned, day) AS ds_partitioned__day | ||
, DATE_TRUNC(id_verifications_src_10003.ds_partitioned, isoweek) AS ds_partitioned__week | ||
, DATE_TRUNC(id_verifications_src_10003.ds_partitioned, month) AS ds_partitioned__month | ||
, DATE_TRUNC(id_verifications_src_10003.ds_partitioned, quarter) AS ds_partitioned__quarter | ||
, DATE_TRUNC(id_verifications_src_10003.ds_partitioned, year) AS ds_partitioned__year | ||
, EXTRACT(year FROM id_verifications_src_10003.ds_partitioned) AS ds_partitioned__extract_year | ||
, EXTRACT(quarter FROM id_verifications_src_10003.ds_partitioned) AS ds_partitioned__extract_quarter | ||
, EXTRACT(month FROM id_verifications_src_10003.ds_partitioned) AS ds_partitioned__extract_month | ||
, EXTRACT(day FROM id_verifications_src_10003.ds_partitioned) AS ds_partitioned__extract_day | ||
, IF(EXTRACT(dayofweek FROM id_verifications_src_10003.ds_partitioned) = 1, 7, EXTRACT(dayofweek FROM id_verifications_src_10003.ds_partitioned) - 1) AS ds_partitioned__extract_dow | ||
, EXTRACT(dayofyear FROM id_verifications_src_10003.ds_partitioned) AS ds_partitioned__extract_doy | ||
, id_verifications_src_10003.verification_type | ||
, DATE_TRUNC(id_verifications_src_10003.ds, day) AS verification__ds__day | ||
, DATE_TRUNC(id_verifications_src_10003.ds, isoweek) AS verification__ds__week | ||
, DATE_TRUNC(id_verifications_src_10003.ds, month) AS verification__ds__month | ||
, DATE_TRUNC(id_verifications_src_10003.ds, quarter) AS verification__ds__quarter | ||
, DATE_TRUNC(id_verifications_src_10003.ds, year) AS verification__ds__year | ||
, EXTRACT(year FROM id_verifications_src_10003.ds) AS verification__ds__extract_year | ||
, EXTRACT(quarter FROM id_verifications_src_10003.ds) AS verification__ds__extract_quarter | ||
, EXTRACT(month FROM id_verifications_src_10003.ds) AS verification__ds__extract_month | ||
, EXTRACT(day FROM id_verifications_src_10003.ds) AS verification__ds__extract_day | ||
, IF(EXTRACT(dayofweek FROM id_verifications_src_10003.ds) = 1, 7, EXTRACT(dayofweek FROM id_verifications_src_10003.ds) - 1) AS verification__ds__extract_dow | ||
, EXTRACT(dayofyear FROM id_verifications_src_10003.ds) AS verification__ds__extract_doy | ||
, DATE_TRUNC(id_verifications_src_10003.ds_partitioned, day) AS verification__ds_partitioned__day | ||
, DATE_TRUNC(id_verifications_src_10003.ds_partitioned, isoweek) AS verification__ds_partitioned__week | ||
, DATE_TRUNC(id_verifications_src_10003.ds_partitioned, month) AS verification__ds_partitioned__month | ||
, DATE_TRUNC(id_verifications_src_10003.ds_partitioned, quarter) AS verification__ds_partitioned__quarter | ||
, DATE_TRUNC(id_verifications_src_10003.ds_partitioned, year) AS verification__ds_partitioned__year | ||
, EXTRACT(year FROM id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__extract_year | ||
, EXTRACT(quarter FROM id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__extract_quarter | ||
, EXTRACT(month FROM id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__extract_month | ||
, EXTRACT(day FROM id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__extract_day | ||
, IF(EXTRACT(dayofweek FROM id_verifications_src_10003.ds_partitioned) = 1, 7, EXTRACT(dayofweek FROM id_verifications_src_10003.ds_partitioned) - 1) AS verification__ds_partitioned__extract_dow | ||
, EXTRACT(dayofyear FROM id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__extract_doy | ||
, id_verifications_src_10003.verification_type AS verification__verification_type | ||
, id_verifications_src_10003.verification_id AS verification | ||
, id_verifications_src_10003.user_id AS user | ||
, id_verifications_src_10003.user_id AS verification__user | ||
FROM ***************************.fct_id_verifications id_verifications_src_10003 | ||
, DATE_TRUNC(id_verifications_src_10004.ds, day) AS ds__day | ||
, DATE_TRUNC(id_verifications_src_10004.ds, isoweek) AS ds__week | ||
, DATE_TRUNC(id_verifications_src_10004.ds, month) AS ds__month | ||
, DATE_TRUNC(id_verifications_src_10004.ds, quarter) AS ds__quarter | ||
, DATE_TRUNC(id_verifications_src_10004.ds, year) AS ds__year | ||
, EXTRACT(year FROM id_verifications_src_10004.ds) AS ds__extract_year | ||
, EXTRACT(quarter FROM id_verifications_src_10004.ds) AS ds__extract_quarter | ||
, EXTRACT(month FROM id_verifications_src_10004.ds) AS ds__extract_month | ||
, EXTRACT(day FROM id_verifications_src_10004.ds) AS ds__extract_day | ||
, IF(EXTRACT(dayofweek FROM id_verifications_src_10004.ds) = 1, 7, EXTRACT(dayofweek FROM id_verifications_src_10004.ds) - 1) AS ds__extract_dow | ||
, EXTRACT(dayofyear FROM id_verifications_src_10004.ds) AS ds__extract_doy | ||
, DATE_TRUNC(id_verifications_src_10004.ds_partitioned, day) AS ds_partitioned__day | ||
, DATE_TRUNC(id_verifications_src_10004.ds_partitioned, isoweek) AS ds_partitioned__week | ||
, DATE_TRUNC(id_verifications_src_10004.ds_partitioned, month) AS ds_partitioned__month | ||
, DATE_TRUNC(id_verifications_src_10004.ds_partitioned, quarter) AS ds_partitioned__quarter | ||
, DATE_TRUNC(id_verifications_src_10004.ds_partitioned, year) AS ds_partitioned__year | ||
, EXTRACT(year FROM id_verifications_src_10004.ds_partitioned) AS ds_partitioned__extract_year | ||
, EXTRACT(quarter FROM id_verifications_src_10004.ds_partitioned) AS ds_partitioned__extract_quarter | ||
, EXTRACT(month FROM id_verifications_src_10004.ds_partitioned) AS ds_partitioned__extract_month | ||
, EXTRACT(day FROM id_verifications_src_10004.ds_partitioned) AS ds_partitioned__extract_day | ||
, IF(EXTRACT(dayofweek FROM id_verifications_src_10004.ds_partitioned) = 1, 7, EXTRACT(dayofweek FROM id_verifications_src_10004.ds_partitioned) - 1) AS ds_partitioned__extract_dow | ||
, EXTRACT(dayofyear FROM id_verifications_src_10004.ds_partitioned) AS ds_partitioned__extract_doy | ||
, id_verifications_src_10004.verification_type | ||
, DATE_TRUNC(id_verifications_src_10004.ds, day) AS verification__ds__day | ||
, DATE_TRUNC(id_verifications_src_10004.ds, isoweek) AS verification__ds__week | ||
, DATE_TRUNC(id_verifications_src_10004.ds, month) AS verification__ds__month | ||
, DATE_TRUNC(id_verifications_src_10004.ds, quarter) AS verification__ds__quarter | ||
, DATE_TRUNC(id_verifications_src_10004.ds, year) AS verification__ds__year | ||
, EXTRACT(year FROM id_verifications_src_10004.ds) AS verification__ds__extract_year | ||
, EXTRACT(quarter FROM id_verifications_src_10004.ds) AS verification__ds__extract_quarter | ||
, EXTRACT(month FROM id_verifications_src_10004.ds) AS verification__ds__extract_month | ||
, EXTRACT(day FROM id_verifications_src_10004.ds) AS verification__ds__extract_day | ||
, IF(EXTRACT(dayofweek FROM id_verifications_src_10004.ds) = 1, 7, EXTRACT(dayofweek FROM id_verifications_src_10004.ds) - 1) AS verification__ds__extract_dow | ||
, EXTRACT(dayofyear FROM id_verifications_src_10004.ds) AS verification__ds__extract_doy | ||
, DATE_TRUNC(id_verifications_src_10004.ds_partitioned, day) AS verification__ds_partitioned__day | ||
, DATE_TRUNC(id_verifications_src_10004.ds_partitioned, isoweek) AS verification__ds_partitioned__week | ||
, DATE_TRUNC(id_verifications_src_10004.ds_partitioned, month) AS verification__ds_partitioned__month | ||
, DATE_TRUNC(id_verifications_src_10004.ds_partitioned, quarter) AS verification__ds_partitioned__quarter | ||
, DATE_TRUNC(id_verifications_src_10004.ds_partitioned, year) AS verification__ds_partitioned__year | ||
, EXTRACT(year FROM id_verifications_src_10004.ds_partitioned) AS verification__ds_partitioned__extract_year | ||
, EXTRACT(quarter FROM id_verifications_src_10004.ds_partitioned) AS verification__ds_partitioned__extract_quarter | ||
, EXTRACT(month FROM id_verifications_src_10004.ds_partitioned) AS verification__ds_partitioned__extract_month | ||
, EXTRACT(day FROM id_verifications_src_10004.ds_partitioned) AS verification__ds_partitioned__extract_day | ||
, IF(EXTRACT(dayofweek FROM id_verifications_src_10004.ds_partitioned) = 1, 7, EXTRACT(dayofweek FROM id_verifications_src_10004.ds_partitioned) - 1) AS verification__ds_partitioned__extract_dow | ||
, EXTRACT(dayofyear FROM id_verifications_src_10004.ds_partitioned) AS verification__ds_partitioned__extract_doy | ||
, id_verifications_src_10004.verification_type AS verification__verification_type | ||
, id_verifications_src_10004.verification_id AS verification | ||
, id_verifications_src_10004.user_id AS user | ||
, id_verifications_src_10004.user_id AS verification__user | ||
FROM ***************************.fct_id_verifications id_verifications_src_10004 |
52 changes: 26 additions & 26 deletions
52
...el.py/SqlQueryPlan/BigQuery/test_convert_table_semantic_model_without_measures__plan0.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
-- Read Elements From Semantic Model 'users_latest' | ||
SELECT | ||
DATE_TRUNC(users_latest_src_10008.ds, day) 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(day FROM users_latest_src_10008.ds) AS ds_latest__extract_day | ||
, IF(EXTRACT(dayofweek FROM users_latest_src_10008.ds) = 1, 7, EXTRACT(dayofweek FROM users_latest_src_10008.ds) - 1) 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 | ||
, DATE_TRUNC(users_latest_src_10008.ds, day) 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(day FROM users_latest_src_10008.ds) AS user__ds_latest__extract_day | ||
, IF(EXTRACT(dayofweek FROM users_latest_src_10008.ds) = 1, 7, EXTRACT(dayofweek FROM users_latest_src_10008.ds) - 1) 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 | ||
DATE_TRUNC(users_latest_src_10009.ds, day) AS ds_latest__day | ||
, DATE_TRUNC(users_latest_src_10009.ds, isoweek) AS ds_latest__week | ||
, DATE_TRUNC(users_latest_src_10009.ds, month) AS ds_latest__month | ||
, DATE_TRUNC(users_latest_src_10009.ds, quarter) AS ds_latest__quarter | ||
, DATE_TRUNC(users_latest_src_10009.ds, year) AS ds_latest__year | ||
, EXTRACT(year FROM users_latest_src_10009.ds) AS ds_latest__extract_year | ||
, EXTRACT(quarter FROM users_latest_src_10009.ds) AS ds_latest__extract_quarter | ||
, EXTRACT(month FROM users_latest_src_10009.ds) AS ds_latest__extract_month | ||
, EXTRACT(day FROM users_latest_src_10009.ds) AS ds_latest__extract_day | ||
, IF(EXTRACT(dayofweek FROM users_latest_src_10009.ds) = 1, 7, EXTRACT(dayofweek FROM users_latest_src_10009.ds) - 1) AS ds_latest__extract_dow | ||
, EXTRACT(dayofyear FROM users_latest_src_10009.ds) AS ds_latest__extract_doy | ||
, users_latest_src_10009.home_state_latest | ||
, DATE_TRUNC(users_latest_src_10009.ds, day) AS user__ds_latest__day | ||
, DATE_TRUNC(users_latest_src_10009.ds, isoweek) AS user__ds_latest__week | ||
, DATE_TRUNC(users_latest_src_10009.ds, month) AS user__ds_latest__month | ||
, DATE_TRUNC(users_latest_src_10009.ds, quarter) AS user__ds_latest__quarter | ||
, DATE_TRUNC(users_latest_src_10009.ds, year) AS user__ds_latest__year | ||
, EXTRACT(year FROM users_latest_src_10009.ds) AS user__ds_latest__extract_year | ||
, EXTRACT(quarter FROM users_latest_src_10009.ds) AS user__ds_latest__extract_quarter | ||
, EXTRACT(month FROM users_latest_src_10009.ds) AS user__ds_latest__extract_month | ||
, EXTRACT(day FROM users_latest_src_10009.ds) AS user__ds_latest__extract_day | ||
, IF(EXTRACT(dayofweek FROM users_latest_src_10009.ds) = 1, 7, EXTRACT(dayofweek FROM users_latest_src_10009.ds) - 1) AS user__ds_latest__extract_dow | ||
, EXTRACT(dayofyear FROM users_latest_src_10009.ds) AS user__ds_latest__extract_doy | ||
, users_latest_src_10009.home_state_latest AS user__home_state_latest | ||
, users_latest_src_10009.user_id AS user | ||
FROM ***************************.dim_users_latest users_latest_src_10009 |
Oops, something went wrong.