Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneyholcomb committed Feb 15, 2024
1 parent 923c352 commit 60b61d2
Show file tree
Hide file tree
Showing 10 changed files with 1,144 additions and 1,148 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,36 +66,36 @@ FROM (
-- Read Elements From Semantic Model 'visits_source'
SELECT
1 AS visits
, visits_source_src_10011.user_id AS visitors
, DATE_TRUNC('day', visits_source_src_10011.ds) AS ds__day
, DATE_TRUNC('week', visits_source_src_10011.ds) AS ds__week
, DATE_TRUNC('month', visits_source_src_10011.ds) AS ds__month
, DATE_TRUNC('quarter', visits_source_src_10011.ds) AS ds__quarter
, DATE_TRUNC('year', visits_source_src_10011.ds) AS ds__year
, EXTRACT(year FROM visits_source_src_10011.ds) AS ds__extract_year
, EXTRACT(quarter FROM visits_source_src_10011.ds) AS ds__extract_quarter
, EXTRACT(month FROM visits_source_src_10011.ds) AS ds__extract_month
, EXTRACT(day FROM visits_source_src_10011.ds) AS ds__extract_day
, EXTRACT(isodow FROM visits_source_src_10011.ds) AS ds__extract_dow
, EXTRACT(doy FROM visits_source_src_10011.ds) AS ds__extract_doy
, visits_source_src_10011.referrer_id
, DATE_TRUNC('day', visits_source_src_10011.ds) AS visit__ds__day
, DATE_TRUNC('week', visits_source_src_10011.ds) AS visit__ds__week
, DATE_TRUNC('month', visits_source_src_10011.ds) AS visit__ds__month
, DATE_TRUNC('quarter', visits_source_src_10011.ds) AS visit__ds__quarter
, DATE_TRUNC('year', visits_source_src_10011.ds) AS visit__ds__year
, EXTRACT(year FROM visits_source_src_10011.ds) AS visit__ds__extract_year
, EXTRACT(quarter FROM visits_source_src_10011.ds) AS visit__ds__extract_quarter
, EXTRACT(month FROM visits_source_src_10011.ds) AS visit__ds__extract_month
, EXTRACT(day FROM visits_source_src_10011.ds) AS visit__ds__extract_day
, EXTRACT(isodow FROM visits_source_src_10011.ds) AS visit__ds__extract_dow
, EXTRACT(doy FROM visits_source_src_10011.ds) AS visit__ds__extract_doy
, visits_source_src_10011.referrer_id AS visit__referrer_id
, visits_source_src_10011.user_id AS user
, visits_source_src_10011.session_id AS session
, visits_source_src_10011.user_id AS visit__user
, visits_source_src_10011.session_id AS visit__session
FROM ***************************.fct_visits visits_source_src_10011
, visits_source_src_28000.user_id AS visitors
, DATE_TRUNC('day', visits_source_src_28000.ds) AS ds__day
, DATE_TRUNC('week', visits_source_src_28000.ds) AS ds__week
, DATE_TRUNC('month', visits_source_src_28000.ds) AS ds__month
, DATE_TRUNC('quarter', visits_source_src_28000.ds) AS ds__quarter
, DATE_TRUNC('year', visits_source_src_28000.ds) AS ds__year
, EXTRACT(year FROM visits_source_src_28000.ds) AS ds__extract_year
, EXTRACT(quarter FROM visits_source_src_28000.ds) AS ds__extract_quarter
, EXTRACT(month FROM visits_source_src_28000.ds) AS ds__extract_month
, EXTRACT(day FROM visits_source_src_28000.ds) AS ds__extract_day
, EXTRACT(isodow FROM visits_source_src_28000.ds) AS ds__extract_dow
, EXTRACT(doy FROM visits_source_src_28000.ds) AS ds__extract_doy
, visits_source_src_28000.referrer_id
, DATE_TRUNC('day', visits_source_src_28000.ds) AS visit__ds__day
, DATE_TRUNC('week', visits_source_src_28000.ds) AS visit__ds__week
, DATE_TRUNC('month', visits_source_src_28000.ds) AS visit__ds__month
, DATE_TRUNC('quarter', visits_source_src_28000.ds) AS visit__ds__quarter
, DATE_TRUNC('year', visits_source_src_28000.ds) AS visit__ds__year
, EXTRACT(year FROM visits_source_src_28000.ds) AS visit__ds__extract_year
, EXTRACT(quarter FROM visits_source_src_28000.ds) AS visit__ds__extract_quarter
, EXTRACT(month FROM visits_source_src_28000.ds) AS visit__ds__extract_month
, EXTRACT(day FROM visits_source_src_28000.ds) AS visit__ds__extract_day
, EXTRACT(isodow FROM visits_source_src_28000.ds) AS visit__ds__extract_dow
, EXTRACT(doy FROM visits_source_src_28000.ds) AS visit__ds__extract_doy
, visits_source_src_28000.referrer_id AS visit__referrer_id
, visits_source_src_28000.user_id AS user
, visits_source_src_28000.session_id AS session
, visits_source_src_28000.user_id AS visit__user
, visits_source_src_28000.session_id AS visit__session
FROM ***************************.fct_visits visits_source_src_28000
) subq_0
) subq_1
) subq_2
Expand Down Expand Up @@ -184,36 +184,36 @@ FROM (
-- Read Elements From Semantic Model 'visits_source'
SELECT
1 AS visits
, visits_source_src_10011.user_id AS visitors
, DATE_TRUNC('day', visits_source_src_10011.ds) AS ds__day
, DATE_TRUNC('week', visits_source_src_10011.ds) AS ds__week
, DATE_TRUNC('month', visits_source_src_10011.ds) AS ds__month
, DATE_TRUNC('quarter', visits_source_src_10011.ds) AS ds__quarter
, DATE_TRUNC('year', visits_source_src_10011.ds) AS ds__year
, EXTRACT(year FROM visits_source_src_10011.ds) AS ds__extract_year
, EXTRACT(quarter FROM visits_source_src_10011.ds) AS ds__extract_quarter
, EXTRACT(month FROM visits_source_src_10011.ds) AS ds__extract_month
, EXTRACT(day FROM visits_source_src_10011.ds) AS ds__extract_day
, EXTRACT(isodow FROM visits_source_src_10011.ds) AS ds__extract_dow
, EXTRACT(doy FROM visits_source_src_10011.ds) AS ds__extract_doy
, visits_source_src_10011.referrer_id
, DATE_TRUNC('day', visits_source_src_10011.ds) AS visit__ds__day
, DATE_TRUNC('week', visits_source_src_10011.ds) AS visit__ds__week
, DATE_TRUNC('month', visits_source_src_10011.ds) AS visit__ds__month
, DATE_TRUNC('quarter', visits_source_src_10011.ds) AS visit__ds__quarter
, DATE_TRUNC('year', visits_source_src_10011.ds) AS visit__ds__year
, EXTRACT(year FROM visits_source_src_10011.ds) AS visit__ds__extract_year
, EXTRACT(quarter FROM visits_source_src_10011.ds) AS visit__ds__extract_quarter
, EXTRACT(month FROM visits_source_src_10011.ds) AS visit__ds__extract_month
, EXTRACT(day FROM visits_source_src_10011.ds) AS visit__ds__extract_day
, EXTRACT(isodow FROM visits_source_src_10011.ds) AS visit__ds__extract_dow
, EXTRACT(doy FROM visits_source_src_10011.ds) AS visit__ds__extract_doy
, visits_source_src_10011.referrer_id AS visit__referrer_id
, visits_source_src_10011.user_id AS user
, visits_source_src_10011.session_id AS session
, visits_source_src_10011.user_id AS visit__user
, visits_source_src_10011.session_id AS visit__session
FROM ***************************.fct_visits visits_source_src_10011
, visits_source_src_28000.user_id AS visitors
, DATE_TRUNC('day', visits_source_src_28000.ds) AS ds__day
, DATE_TRUNC('week', visits_source_src_28000.ds) AS ds__week
, DATE_TRUNC('month', visits_source_src_28000.ds) AS ds__month
, DATE_TRUNC('quarter', visits_source_src_28000.ds) AS ds__quarter
, DATE_TRUNC('year', visits_source_src_28000.ds) AS ds__year
, EXTRACT(year FROM visits_source_src_28000.ds) AS ds__extract_year
, EXTRACT(quarter FROM visits_source_src_28000.ds) AS ds__extract_quarter
, EXTRACT(month FROM visits_source_src_28000.ds) AS ds__extract_month
, EXTRACT(day FROM visits_source_src_28000.ds) AS ds__extract_day
, EXTRACT(isodow FROM visits_source_src_28000.ds) AS ds__extract_dow
, EXTRACT(doy FROM visits_source_src_28000.ds) AS ds__extract_doy
, visits_source_src_28000.referrer_id
, DATE_TRUNC('day', visits_source_src_28000.ds) AS visit__ds__day
, DATE_TRUNC('week', visits_source_src_28000.ds) AS visit__ds__week
, DATE_TRUNC('month', visits_source_src_28000.ds) AS visit__ds__month
, DATE_TRUNC('quarter', visits_source_src_28000.ds) AS visit__ds__quarter
, DATE_TRUNC('year', visits_source_src_28000.ds) AS visit__ds__year
, EXTRACT(year FROM visits_source_src_28000.ds) AS visit__ds__extract_year
, EXTRACT(quarter FROM visits_source_src_28000.ds) AS visit__ds__extract_quarter
, EXTRACT(month FROM visits_source_src_28000.ds) AS visit__ds__extract_month
, EXTRACT(day FROM visits_source_src_28000.ds) AS visit__ds__extract_day
, EXTRACT(isodow FROM visits_source_src_28000.ds) AS visit__ds__extract_dow
, EXTRACT(doy FROM visits_source_src_28000.ds) AS visit__ds__extract_doy
, visits_source_src_28000.referrer_id AS visit__referrer_id
, visits_source_src_28000.user_id AS user
, visits_source_src_28000.session_id AS session
, visits_source_src_28000.user_id AS visit__user
, visits_source_src_28000.session_id AS visit__session
FROM ***************************.fct_visits visits_source_src_28000
) subq_4
) subq_5
) subq_6
Expand Down Expand Up @@ -306,34 +306,34 @@ FROM (
-- Read Elements From Semantic Model 'buys_source'
SELECT
1 AS buys
, buys_source_src_10002.user_id AS buyers
, DATE_TRUNC('day', buys_source_src_10002.ds) AS ds__day
, DATE_TRUNC('week', buys_source_src_10002.ds) AS ds__week
, DATE_TRUNC('month', buys_source_src_10002.ds) AS ds__month
, DATE_TRUNC('quarter', buys_source_src_10002.ds) AS ds__quarter
, DATE_TRUNC('year', buys_source_src_10002.ds) AS ds__year
, EXTRACT(year FROM buys_source_src_10002.ds) AS ds__extract_year
, EXTRACT(quarter FROM buys_source_src_10002.ds) AS ds__extract_quarter
, EXTRACT(month FROM buys_source_src_10002.ds) AS ds__extract_month
, EXTRACT(day FROM buys_source_src_10002.ds) AS ds__extract_day
, EXTRACT(isodow FROM buys_source_src_10002.ds) AS ds__extract_dow
, EXTRACT(doy FROM buys_source_src_10002.ds) AS ds__extract_doy
, DATE_TRUNC('day', buys_source_src_10002.ds) AS buy__ds__day
, DATE_TRUNC('week', buys_source_src_10002.ds) AS buy__ds__week
, DATE_TRUNC('month', buys_source_src_10002.ds) AS buy__ds__month
, DATE_TRUNC('quarter', buys_source_src_10002.ds) AS buy__ds__quarter
, DATE_TRUNC('year', buys_source_src_10002.ds) AS buy__ds__year
, EXTRACT(year FROM buys_source_src_10002.ds) AS buy__ds__extract_year
, EXTRACT(quarter FROM buys_source_src_10002.ds) AS buy__ds__extract_quarter
, EXTRACT(month FROM buys_source_src_10002.ds) AS buy__ds__extract_month
, EXTRACT(day FROM buys_source_src_10002.ds) AS buy__ds__extract_day
, EXTRACT(isodow FROM buys_source_src_10002.ds) AS buy__ds__extract_dow
, EXTRACT(doy FROM buys_source_src_10002.ds) AS buy__ds__extract_doy
, buys_source_src_10002.user_id AS user
, buys_source_src_10002.session_id
, buys_source_src_10002.user_id AS buy__user
, buys_source_src_10002.session_id AS buy__session_id
FROM ***************************.fct_buys buys_source_src_10002
, buys_source_src_28000.user_id AS buyers
, DATE_TRUNC('day', buys_source_src_28000.ds) AS ds__day
, DATE_TRUNC('week', buys_source_src_28000.ds) AS ds__week
, DATE_TRUNC('month', buys_source_src_28000.ds) AS ds__month
, DATE_TRUNC('quarter', buys_source_src_28000.ds) AS ds__quarter
, DATE_TRUNC('year', buys_source_src_28000.ds) AS ds__year
, EXTRACT(year FROM buys_source_src_28000.ds) AS ds__extract_year
, EXTRACT(quarter FROM buys_source_src_28000.ds) AS ds__extract_quarter
, EXTRACT(month FROM buys_source_src_28000.ds) AS ds__extract_month
, EXTRACT(day FROM buys_source_src_28000.ds) AS ds__extract_day
, EXTRACT(isodow FROM buys_source_src_28000.ds) AS ds__extract_dow
, EXTRACT(doy FROM buys_source_src_28000.ds) AS ds__extract_doy
, DATE_TRUNC('day', buys_source_src_28000.ds) AS buy__ds__day
, DATE_TRUNC('week', buys_source_src_28000.ds) AS buy__ds__week
, DATE_TRUNC('month', buys_source_src_28000.ds) AS buy__ds__month
, DATE_TRUNC('quarter', buys_source_src_28000.ds) AS buy__ds__quarter
, DATE_TRUNC('year', buys_source_src_28000.ds) AS buy__ds__year
, EXTRACT(year FROM buys_source_src_28000.ds) AS buy__ds__extract_year
, EXTRACT(quarter FROM buys_source_src_28000.ds) AS buy__ds__extract_quarter
, EXTRACT(month FROM buys_source_src_28000.ds) AS buy__ds__extract_month
, EXTRACT(day FROM buys_source_src_28000.ds) AS buy__ds__extract_day
, EXTRACT(isodow FROM buys_source_src_28000.ds) AS buy__ds__extract_dow
, EXTRACT(doy FROM buys_source_src_28000.ds) AS buy__ds__extract_doy
, buys_source_src_28000.user_id AS user
, buys_source_src_28000.session_id
, buys_source_src_28000.user_id AS buy__user
, buys_source_src_28000.session_id AS buy__session_id
FROM ***************************.fct_buys buys_source_src_28000
) subq_7
) subq_8
) subq_9
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ FROM (
SELECT
DATE_TRUNC('day', ds) AS metric_time__day
, 1 AS visits
FROM ***************************.fct_visits visits_source_src_10011
FROM ***************************.fct_visits visits_source_src_28000
) subq_17
GROUP BY
metric_time__day
Expand Down Expand Up @@ -50,7 +50,7 @@ FROM (
, DATE_TRUNC('day', ds) AS metric_time__day
, user_id AS user
, 1 AS visits
FROM ***************************.fct_visits visits_source_src_10011
FROM ***************************.fct_visits visits_source_src_28000
) subq_21
INNER JOIN (
-- Read Elements From Semantic Model 'buys_source'
Expand All @@ -61,7 +61,7 @@ FROM (
, user_id AS user
, 1 AS buys
, GEN_RANDOM_UUID() AS mf_internal_uuid
FROM ***************************.fct_buys buys_source_src_10002
FROM ***************************.fct_buys buys_source_src_28000
) subq_24
ON
(
Expand Down
Loading

0 comments on commit 60b61d2

Please sign in to comment.