Skip to content

Commit

Permalink
updated snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamDee committed Jan 26, 2023
1 parent 6c2737e commit 57fc8ec
Show file tree
Hide file tree
Showing 197 changed files with 7,095 additions and 6,130 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ integration_test:
SELECT *, {{ generate_random_uuid() }} AS uuid FROM {{ source_schema }}.fct_buys
) buy_source
ON
v.user_id = buy_source.user_id AND v.ds <= buy_source.ds AND v.ds > buy_source.ds - INTERVAL 7 day
v.user_id = buy_source.user_id AND v.ds <= buy_source.ds AND v.ds > {{ render_date_sub("buy_source", "ds", 7, TimeGranularity.DAY) }}
) b
GROUP BY
b.referrer_id
Expand Down Expand Up @@ -125,7 +125,7 @@ integration_test:
SELECT *, {{ generate_random_uuid() }} AS uuid FROM {{ source_schema }}.fct_buys
) buy_source
ON
v.user_id = buy_source.user_id AND v.ds <= buy_source.ds AND v.ds > buy_source.ds - INTERVAL 7 day
v.user_id = buy_source.user_id AND v.ds <= buy_source.ds AND v.ds > {{ render_date_sub("buy_source", "ds", 7, TimeGranularity.DAY) }}
) b
GROUP BY
b.referrer_id, b.ds
Expand Down Expand Up @@ -158,7 +158,7 @@ integration_test:
SELECT *, {{ generate_random_uuid() }} AS uuid FROM {{ source_schema }}.fct_buys
) buy_source
ON
v.user_id = buy_source.user_id AND v.ds <= buy_source.ds AND v.ds > buy_source.ds - INTERVAL 7 day
v.user_id = buy_source.user_id AND v.ds <= buy_source.ds AND v.ds > {{ render_date_sub("buy_source", "ds", 7, TimeGranularity.DAY) }}
) b
GROUP BY
b.ds
Expand Down Expand Up @@ -190,7 +190,7 @@ integration_test:
SELECT *, {{ generate_random_uuid() }} AS uuid FROM {{ source_schema }}.fct_buys
) buy_source
ON
v.user_id = buy_source.user_id AND v.ds <= buy_source.ds AND v.ds > buy_source.ds - INTERVAL 7 day
v.user_id = buy_source.user_id AND v.ds <= buy_source.ds AND v.ds > {{ render_date_sub("buy_source", "ds", 7, TimeGranularity.DAY) }}
) b
GROUP BY
b.referrer_id
Expand Down Expand Up @@ -223,7 +223,7 @@ integration_test:
SELECT *, {{ generate_random_uuid() }} AS uuid FROM {{ source_schema }}.fct_buys
) buy_source
ON
v.user_id = buy_source.user_id AND v.ds <= buy_source.ds AND v.ds > buy_source.ds - INTERVAL 7 day
v.user_id = buy_source.user_id AND v.ds <= buy_source.ds AND v.ds > {{ render_date_sub("buy_source", "ds", 7, TimeGranularity.DAY) }}
) b
GROUP BY
b.referrer_id, b.ds
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
-- Read Elements From Data Source 'revenue'
SELECT
revenue_src_10006.revenue AS txn_revenue
, revenue_src_10006.created_at AS ds
, DATE_TRUNC('week', revenue_src_10006.created_at) AS ds__week
, DATE_TRUNC('month', revenue_src_10006.created_at) AS ds__month
, DATE_TRUNC('quarter', revenue_src_10006.created_at) AS ds__quarter
, DATE_TRUNC('year', revenue_src_10006.created_at) AS ds__year
, revenue_src_10006.user_id AS user
revenue_src_10007.revenue AS txn_revenue
, revenue_src_10007.created_at AS ds
, DATE_TRUNC('week', revenue_src_10007.created_at) AS ds__week
, DATE_TRUNC('month', revenue_src_10007.created_at) AS ds__month
, DATE_TRUNC('quarter', revenue_src_10007.created_at) AS ds__quarter
, DATE_TRUNC('year', revenue_src_10007.created_at) AS ds__year
, revenue_src_10007.user_id AS user
FROM (
-- User Defined SQL Query
SELECT * FROM ***************************.fct_revenue
) revenue_src_10006
) revenue_src_10007
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
-- Read Elements From Data Source 'id_verifications'
SELECT
1 AS identity_verifications
, id_verifications_src_10003.ds
, DATE_TRUNC('week', id_verifications_src_10003.ds) AS ds__week
, DATE_TRUNC('month', id_verifications_src_10003.ds) AS ds__month
, DATE_TRUNC('quarter', id_verifications_src_10003.ds) AS ds__quarter
, DATE_TRUNC('year', id_verifications_src_10003.ds) AS ds__year
, id_verifications_src_10003.ds_partitioned
, DATE_TRUNC('week', id_verifications_src_10003.ds_partitioned) AS ds_partitioned__week
, DATE_TRUNC('month', id_verifications_src_10003.ds_partitioned) AS ds_partitioned__month
, DATE_TRUNC('quarter', id_verifications_src_10003.ds_partitioned) AS ds_partitioned__quarter
, DATE_TRUNC('year', id_verifications_src_10003.ds_partitioned) AS ds_partitioned__year
, id_verifications_src_10003.verification_type
, id_verifications_src_10003.ds AS verification__ds
, DATE_TRUNC('week', id_verifications_src_10003.ds) AS verification__ds__week
, DATE_TRUNC('month', id_verifications_src_10003.ds) AS verification__ds__month
, DATE_TRUNC('quarter', id_verifications_src_10003.ds) AS verification__ds__quarter
, DATE_TRUNC('year', id_verifications_src_10003.ds) AS verification__ds__year
, id_verifications_src_10003.ds_partitioned AS verification__ds_partitioned
, DATE_TRUNC('week', id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__week
, DATE_TRUNC('month', id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__month
, DATE_TRUNC('quarter', id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__quarter
, DATE_TRUNC('year', id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__year
, 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
, id_verifications_src_10004.ds
, DATE_TRUNC('week', id_verifications_src_10004.ds) AS ds__week
, DATE_TRUNC('month', id_verifications_src_10004.ds) AS ds__month
, DATE_TRUNC('quarter', id_verifications_src_10004.ds) AS ds__quarter
, DATE_TRUNC('year', id_verifications_src_10004.ds) AS ds__year
, id_verifications_src_10004.ds_partitioned
, DATE_TRUNC('week', id_verifications_src_10004.ds_partitioned) AS ds_partitioned__week
, DATE_TRUNC('month', id_verifications_src_10004.ds_partitioned) AS ds_partitioned__month
, DATE_TRUNC('quarter', id_verifications_src_10004.ds_partitioned) AS ds_partitioned__quarter
, DATE_TRUNC('year', id_verifications_src_10004.ds_partitioned) AS ds_partitioned__year
, id_verifications_src_10004.verification_type
, id_verifications_src_10004.ds AS verification__ds
, DATE_TRUNC('week', id_verifications_src_10004.ds) AS verification__ds__week
, DATE_TRUNC('month', id_verifications_src_10004.ds) AS verification__ds__month
, DATE_TRUNC('quarter', id_verifications_src_10004.ds) AS verification__ds__quarter
, DATE_TRUNC('year', id_verifications_src_10004.ds) AS verification__ds__year
, id_verifications_src_10004.ds_partitioned AS verification__ds_partitioned
, DATE_TRUNC('week', id_verifications_src_10004.ds_partitioned) AS verification__ds_partitioned__week
, DATE_TRUNC('month', id_verifications_src_10004.ds_partitioned) AS verification__ds_partitioned__month
, DATE_TRUNC('quarter', id_verifications_src_10004.ds_partitioned) AS verification__ds_partitioned__quarter
, DATE_TRUNC('year', id_verifications_src_10004.ds_partitioned) AS verification__ds_partitioned__year
, 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
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
-- Read Elements From Data Source 'users_latest'
SELECT
users_latest_src_10008.ds
, DATE_TRUNC('week', users_latest_src_10008.ds) AS ds__week
, DATE_TRUNC('month', users_latest_src_10008.ds) AS ds__month
, DATE_TRUNC('quarter', users_latest_src_10008.ds) AS ds__quarter
, DATE_TRUNC('year', users_latest_src_10008.ds) AS ds__year
, users_latest_src_10008.home_state_latest
, users_latest_src_10008.ds AS user__ds
, DATE_TRUNC('week', users_latest_src_10008.ds) AS user__ds__week
, DATE_TRUNC('month', users_latest_src_10008.ds) AS user__ds__month
, DATE_TRUNC('quarter', users_latest_src_10008.ds) AS user__ds__quarter
, DATE_TRUNC('year', users_latest_src_10008.ds) AS user__ds__year
, users_latest_src_10008.home_state_latest AS user__home_state_latest
, users_latest_src_10008.user_id AS user
FROM ***************************.dim_users_latest users_latest_src_10008
users_latest_src_10009.ds
, DATE_TRUNC('week', users_latest_src_10009.ds) AS ds__week
, DATE_TRUNC('month', users_latest_src_10009.ds) AS ds__month
, DATE_TRUNC('quarter', users_latest_src_10009.ds) AS ds__quarter
, DATE_TRUNC('year', users_latest_src_10009.ds) AS ds__year
, users_latest_src_10009.home_state_latest
, users_latest_src_10009.ds AS user__ds
, DATE_TRUNC('week', users_latest_src_10009.ds) AS user__ds__week
, DATE_TRUNC('month', users_latest_src_10009.ds) AS user__ds__month
, DATE_TRUNC('quarter', users_latest_src_10009.ds) AS user__ds__quarter
, DATE_TRUNC('year', users_latest_src_10009.ds) AS user__ds__year
, 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
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
-- Read Elements From Data Source 'revenue'
SELECT
revenue_src_10006.revenue AS txn_revenue
, revenue_src_10006.created_at AS ds
, DATE_TRUNC('week', revenue_src_10006.created_at) AS ds__week
, DATE_TRUNC('month', revenue_src_10006.created_at) AS ds__month
, DATE_TRUNC('quarter', revenue_src_10006.created_at) AS ds__quarter
, DATE_TRUNC('year', revenue_src_10006.created_at) AS ds__year
, revenue_src_10006.user_id AS user
revenue_src_10007.revenue AS txn_revenue
, revenue_src_10007.created_at AS ds
, DATE_TRUNC('week', revenue_src_10007.created_at) AS ds__week
, DATE_TRUNC('month', revenue_src_10007.created_at) AS ds__month
, DATE_TRUNC('quarter', revenue_src_10007.created_at) AS ds__quarter
, DATE_TRUNC('year', revenue_src_10007.created_at) AS ds__year
, revenue_src_10007.user_id AS user
FROM (
-- User Defined SQL Query
SELECT * FROM ***************************.fct_revenue
) revenue_src_10006
) revenue_src_10007
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
-- Read Elements From Data Source 'id_verifications'
SELECT
1 AS identity_verifications
, id_verifications_src_10003.ds
, DATE_TRUNC('week', id_verifications_src_10003.ds) AS ds__week
, DATE_TRUNC('month', id_verifications_src_10003.ds) AS ds__month
, DATE_TRUNC('quarter', id_verifications_src_10003.ds) AS ds__quarter
, DATE_TRUNC('year', id_verifications_src_10003.ds) AS ds__year
, id_verifications_src_10003.ds_partitioned
, DATE_TRUNC('week', id_verifications_src_10003.ds_partitioned) AS ds_partitioned__week
, DATE_TRUNC('month', id_verifications_src_10003.ds_partitioned) AS ds_partitioned__month
, DATE_TRUNC('quarter', id_verifications_src_10003.ds_partitioned) AS ds_partitioned__quarter
, DATE_TRUNC('year', id_verifications_src_10003.ds_partitioned) AS ds_partitioned__year
, id_verifications_src_10003.verification_type
, id_verifications_src_10003.ds AS verification__ds
, DATE_TRUNC('week', id_verifications_src_10003.ds) AS verification__ds__week
, DATE_TRUNC('month', id_verifications_src_10003.ds) AS verification__ds__month
, DATE_TRUNC('quarter', id_verifications_src_10003.ds) AS verification__ds__quarter
, DATE_TRUNC('year', id_verifications_src_10003.ds) AS verification__ds__year
, id_verifications_src_10003.ds_partitioned AS verification__ds_partitioned
, DATE_TRUNC('week', id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__week
, DATE_TRUNC('month', id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__month
, DATE_TRUNC('quarter', id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__quarter
, DATE_TRUNC('year', id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__year
, 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
, id_verifications_src_10004.ds
, DATE_TRUNC('week', id_verifications_src_10004.ds) AS ds__week
, DATE_TRUNC('month', id_verifications_src_10004.ds) AS ds__month
, DATE_TRUNC('quarter', id_verifications_src_10004.ds) AS ds__quarter
, DATE_TRUNC('year', id_verifications_src_10004.ds) AS ds__year
, id_verifications_src_10004.ds_partitioned
, DATE_TRUNC('week', id_verifications_src_10004.ds_partitioned) AS ds_partitioned__week
, DATE_TRUNC('month', id_verifications_src_10004.ds_partitioned) AS ds_partitioned__month
, DATE_TRUNC('quarter', id_verifications_src_10004.ds_partitioned) AS ds_partitioned__quarter
, DATE_TRUNC('year', id_verifications_src_10004.ds_partitioned) AS ds_partitioned__year
, id_verifications_src_10004.verification_type
, id_verifications_src_10004.ds AS verification__ds
, DATE_TRUNC('week', id_verifications_src_10004.ds) AS verification__ds__week
, DATE_TRUNC('month', id_verifications_src_10004.ds) AS verification__ds__month
, DATE_TRUNC('quarter', id_verifications_src_10004.ds) AS verification__ds__quarter
, DATE_TRUNC('year', id_verifications_src_10004.ds) AS verification__ds__year
, id_verifications_src_10004.ds_partitioned AS verification__ds_partitioned
, DATE_TRUNC('week', id_verifications_src_10004.ds_partitioned) AS verification__ds_partitioned__week
, DATE_TRUNC('month', id_verifications_src_10004.ds_partitioned) AS verification__ds_partitioned__month
, DATE_TRUNC('quarter', id_verifications_src_10004.ds_partitioned) AS verification__ds_partitioned__quarter
, DATE_TRUNC('year', id_verifications_src_10004.ds_partitioned) AS verification__ds_partitioned__year
, 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
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
-- Read Elements From Data Source 'users_latest'
SELECT
users_latest_src_10008.ds
, DATE_TRUNC('week', users_latest_src_10008.ds) AS ds__week
, DATE_TRUNC('month', users_latest_src_10008.ds) AS ds__month
, DATE_TRUNC('quarter', users_latest_src_10008.ds) AS ds__quarter
, DATE_TRUNC('year', users_latest_src_10008.ds) AS ds__year
, users_latest_src_10008.home_state_latest
, users_latest_src_10008.ds AS user__ds
, DATE_TRUNC('week', users_latest_src_10008.ds) AS user__ds__week
, DATE_TRUNC('month', users_latest_src_10008.ds) AS user__ds__month
, DATE_TRUNC('quarter', users_latest_src_10008.ds) AS user__ds__quarter
, DATE_TRUNC('year', users_latest_src_10008.ds) AS user__ds__year
, users_latest_src_10008.home_state_latest AS user__home_state_latest
, users_latest_src_10008.user_id AS user
FROM ***************************.dim_users_latest users_latest_src_10008
users_latest_src_10009.ds
, DATE_TRUNC('week', users_latest_src_10009.ds) AS ds__week
, DATE_TRUNC('month', users_latest_src_10009.ds) AS ds__month
, DATE_TRUNC('quarter', users_latest_src_10009.ds) AS ds__quarter
, DATE_TRUNC('year', users_latest_src_10009.ds) AS ds__year
, users_latest_src_10009.home_state_latest
, users_latest_src_10009.ds AS user__ds
, DATE_TRUNC('week', users_latest_src_10009.ds) AS user__ds__week
, DATE_TRUNC('month', users_latest_src_10009.ds) AS user__ds__month
, DATE_TRUNC('quarter', users_latest_src_10009.ds) AS user__ds__quarter
, DATE_TRUNC('year', users_latest_src_10009.ds) AS user__ds__year
, 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
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<ReadSqlSourceNode>
<!-- description = -->
<!-- Read From DataSourceDataSet(DataSourceReference(data_source_name='bookings_source')) -->
<!-- node_id = rss_10011 -->
<!-- node_id = rss_10013 -->
<!-- data_set = -->
<!-- DataSourceDataSet(DataSourceReference(data_source_name='bookings_source')) -->
</ReadSqlSourceNode>
Expand All @@ -97,12 +97,12 @@
<!-- 'identifier_links': ()} -->
<MetricTimeDimensionTransformNode>
<!-- description = Metric Time Dimension 'ds' -->
<!-- node_id = sma_10004 -->
<!-- node_id = sma_10005 -->
<!-- aggregation_time_dimension = ds -->
<ReadSqlSourceNode>
<!-- description = -->
<!-- Read From DataSourceDataSet(DataSourceReference(data_source_name='listings_latest')) -->
<!-- node_id = rss_10014 -->
<!-- node_id = rss_10017 -->
<!-- data_set = -->
<!-- DataSourceDataSet(DataSourceReference(data_source_name='listings_latest')) -->
</ReadSqlSourceNode>
Expand Down Expand Up @@ -181,7 +181,7 @@
<ReadSqlSourceNode>
<!-- description = -->
<!-- Read From DataSourceDataSet(DataSourceReference(data_source_name='bookings_source')) -->
<!-- node_id = rss_10011 -->
<!-- node_id = rss_10013 -->
<!-- data_set = -->
<!-- DataSourceDataSet(DataSourceReference(data_source_name='bookings_source')) -->
</ReadSqlSourceNode>
Expand All @@ -202,12 +202,12 @@
<!-- 'identifier_links': ()} -->
<MetricTimeDimensionTransformNode>
<!-- description = Metric Time Dimension 'ds' -->
<!-- node_id = sma_10004 -->
<!-- node_id = sma_10005 -->
<!-- aggregation_time_dimension = ds -->
<ReadSqlSourceNode>
<!-- description = -->
<!-- Read From DataSourceDataSet(DataSourceReference(data_source_name='listings_latest')) -->
<!-- node_id = rss_10014 -->
<!-- node_id = rss_10017 -->
<!-- data_set = -->
<!-- DataSourceDataSet(DataSourceReference(data_source_name='listings_latest')) -->
</ReadSqlSourceNode>
Expand Down
Loading

0 comments on commit 57fc8ec

Please sign in to comment.