Skip to content

Commit

Permalink
Update other SQL engine snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneyholcomb committed Dec 9, 2024
1 parent 418755a commit 2bb872b
Show file tree
Hide file tree
Showing 108 changed files with 161 additions and 161 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ FROM (
FROM (
-- Read From Time Spine 'mf_time_spine'
SELECT
DATETIME_TRUNC(time_spine_src_28006.ds, day) AS ds__day
time_spine_src_28006.ds AS ds__day
, DATETIME_TRUNC(time_spine_src_28006.ds, isoweek) AS ds__week
, DATETIME_TRUNC(time_spine_src_28006.ds, month) AS ds__month
, DATETIME_TRUNC(time_spine_src_28006.ds, quarter) AS ds__quarter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ SELECT
subq_12.martian_day AS user__bio_added_ts__martian_day
, subq_11.martian_day AS metric_time__martian_day
, DATETIME_TRUNC(users_ds_source_src_28000.bio_added_ts, month) AS user__bio_added_ts__month
, DATETIME_TRUNC(time_spine_src_28006.ds, day) AS metric_time__day
, time_spine_src_28006.ds AS metric_time__day
FROM ***************************.dim_users users_ds_source_src_28000
CROSS JOIN
***************************.mf_time_spine time_spine_src_28006
LEFT OUTER JOIN
***************************.mf_time_spine subq_11
ON
DATETIME_TRUNC(time_spine_src_28006.ds, day) = subq_11.ds
time_spine_src_28006.ds = subq_11.ds
LEFT OUTER JOIN
***************************.mf_time_spine subq_12
ON
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ FROM (
FROM (
-- Read From Time Spine 'mf_time_spine'
SELECT
DATETIME_TRUNC(time_spine_src_28006.ds, day) AS ds__day
time_spine_src_28006.ds AS ds__day
, DATETIME_TRUNC(time_spine_src_28006.ds, isoweek) AS ds__week
, DATETIME_TRUNC(time_spine_src_28006.ds, month) AS ds__month
, DATETIME_TRUNC(time_spine_src_28006.ds, quarter) AS ds__quarter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ FROM ***************************.mf_time_spine time_spine_src_28006
LEFT OUTER JOIN
***************************.mf_time_spine subq_4
ON
DATETIME_TRUNC(time_spine_src_28006.ds, day) = subq_4.ds
time_spine_src_28006.ds = subq_4.ds
GROUP BY
metric_time__martian_day
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ FROM (
FROM (
-- Read From Time Spine 'mf_time_spine'
SELECT
DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day
time_spine_src_28006.ds AS ds__day
, DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week
, DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month
, DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ SELECT
subq_12.martian_day AS user__bio_added_ts__martian_day
, subq_11.martian_day AS metric_time__martian_day
, DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__month
, DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day
, time_spine_src_28006.ds AS metric_time__day
FROM ***************************.dim_users users_ds_source_src_28000
CROSS JOIN
***************************.mf_time_spine time_spine_src_28006
LEFT OUTER JOIN
***************************.mf_time_spine subq_11
ON
DATE_TRUNC('day', time_spine_src_28006.ds) = subq_11.ds
time_spine_src_28006.ds = subq_11.ds
LEFT OUTER JOIN
***************************.mf_time_spine subq_12
ON
Expand All @@ -26,4 +26,4 @@ GROUP BY
subq_12.martian_day
, subq_11.martian_day
, DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts)
, DATE_TRUNC('day', time_spine_src_28006.ds)
, time_spine_src_28006.ds
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ FROM (
FROM (
-- Read From Time Spine 'mf_time_spine'
SELECT
DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day
time_spine_src_28006.ds AS ds__day
, DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week
, DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month
, DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ FROM ***************************.mf_time_spine time_spine_src_28006
LEFT OUTER JOIN
***************************.mf_time_spine subq_4
ON
DATE_TRUNC('day', time_spine_src_28006.ds) = subq_4.ds
time_spine_src_28006.ds = subq_4.ds
GROUP BY
subq_4.martian_day
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ FROM (
FROM (
-- Read From Time Spine 'mf_time_spine'
SELECT
DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day
time_spine_src_28006.ds AS ds__day
, DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week
, DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month
, DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ SELECT
subq_12.martian_day AS user__bio_added_ts__martian_day
, subq_11.martian_day AS metric_time__martian_day
, DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__month
, DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day
, time_spine_src_28006.ds AS metric_time__day
FROM ***************************.dim_users users_ds_source_src_28000
CROSS JOIN
***************************.mf_time_spine time_spine_src_28006
LEFT OUTER JOIN
***************************.mf_time_spine subq_11
ON
DATE_TRUNC('day', time_spine_src_28006.ds) = subq_11.ds
time_spine_src_28006.ds = subq_11.ds
LEFT OUTER JOIN
***************************.mf_time_spine subq_12
ON
Expand All @@ -26,4 +26,4 @@ GROUP BY
subq_12.martian_day
, subq_11.martian_day
, DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts)
, DATE_TRUNC('day', time_spine_src_28006.ds)
, time_spine_src_28006.ds
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ FROM (
FROM (
-- Read From Time Spine 'mf_time_spine'
SELECT
DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day
time_spine_src_28006.ds AS ds__day
, DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week
, DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month
, DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ FROM ***************************.mf_time_spine time_spine_src_28006
LEFT OUTER JOIN
***************************.mf_time_spine subq_4
ON
DATE_TRUNC('day', time_spine_src_28006.ds) = subq_4.ds
time_spine_src_28006.ds = subq_4.ds
GROUP BY
subq_4.martian_day
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ FROM (
FROM (
-- Read From Time Spine 'mf_time_spine'
SELECT
DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day
time_spine_src_28006.ds AS ds__day
, DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week
, DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month
, DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ SELECT
subq_12.martian_day AS user__bio_added_ts__martian_day
, subq_11.martian_day AS metric_time__martian_day
, DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__month
, DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day
, time_spine_src_28006.ds AS metric_time__day
FROM ***************************.dim_users users_ds_source_src_28000
CROSS JOIN
***************************.mf_time_spine time_spine_src_28006
LEFT OUTER JOIN
***************************.mf_time_spine subq_11
ON
DATE_TRUNC('day', time_spine_src_28006.ds) = subq_11.ds
time_spine_src_28006.ds = subq_11.ds
LEFT OUTER JOIN
***************************.mf_time_spine subq_12
ON
Expand All @@ -26,4 +26,4 @@ GROUP BY
subq_12.martian_day
, subq_11.martian_day
, DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts)
, DATE_TRUNC('day', time_spine_src_28006.ds)
, time_spine_src_28006.ds
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ FROM (
FROM (
-- Read From Time Spine 'mf_time_spine'
SELECT
DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day
time_spine_src_28006.ds AS ds__day
, DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week
, DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month
, DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ FROM ***************************.mf_time_spine time_spine_src_28006
LEFT OUTER JOIN
***************************.mf_time_spine subq_4
ON
DATE_TRUNC('day', time_spine_src_28006.ds) = subq_4.ds
time_spine_src_28006.ds = subq_4.ds
GROUP BY
subq_4.martian_day
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ FROM (
FROM (
-- Read From Time Spine 'mf_time_spine'
SELECT
DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day
time_spine_src_28006.ds AS ds__day
, DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week
, DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month
, DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ SELECT
subq_12.martian_day AS user__bio_added_ts__martian_day
, subq_11.martian_day AS metric_time__martian_day
, DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__month
, DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day
, time_spine_src_28006.ds AS metric_time__day
FROM ***************************.dim_users users_ds_source_src_28000
CROSS JOIN
***************************.mf_time_spine time_spine_src_28006
LEFT OUTER JOIN
***************************.mf_time_spine subq_11
ON
DATE_TRUNC('day', time_spine_src_28006.ds) = subq_11.ds
time_spine_src_28006.ds = subq_11.ds
LEFT OUTER JOIN
***************************.mf_time_spine subq_12
ON
Expand All @@ -26,4 +26,4 @@ GROUP BY
subq_12.martian_day
, subq_11.martian_day
, DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts)
, DATE_TRUNC('day', time_spine_src_28006.ds)
, time_spine_src_28006.ds
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ FROM (
FROM (
-- Read From Time Spine 'mf_time_spine'
SELECT
DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day
time_spine_src_28006.ds AS ds__day
, DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week
, DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month
, DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ FROM ***************************.mf_time_spine time_spine_src_28006
LEFT OUTER JOIN
***************************.mf_time_spine subq_4
ON
DATE_TRUNC('day', time_spine_src_28006.ds) = subq_4.ds
time_spine_src_28006.ds = subq_4.ds
GROUP BY
subq_4.martian_day
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ FROM (
FROM (
-- Read From Time Spine 'mf_time_spine'
SELECT
DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day
time_spine_src_28006.ds AS ds__day
, DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week
, DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month
, DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ SELECT
subq_12.martian_day AS user__bio_added_ts__martian_day
, subq_11.martian_day AS metric_time__martian_day
, DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts) AS user__bio_added_ts__month
, DATE_TRUNC('day', time_spine_src_28006.ds) AS metric_time__day
, time_spine_src_28006.ds AS metric_time__day
FROM ***************************.dim_users users_ds_source_src_28000
CROSS JOIN
***************************.mf_time_spine time_spine_src_28006
LEFT OUTER JOIN
***************************.mf_time_spine subq_11
ON
DATE_TRUNC('day', time_spine_src_28006.ds) = subq_11.ds
time_spine_src_28006.ds = subq_11.ds
LEFT OUTER JOIN
***************************.mf_time_spine subq_12
ON
Expand All @@ -26,4 +26,4 @@ GROUP BY
subq_12.martian_day
, subq_11.martian_day
, DATE_TRUNC('month', users_ds_source_src_28000.bio_added_ts)
, DATE_TRUNC('day', time_spine_src_28006.ds)
, time_spine_src_28006.ds
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ FROM (
FROM (
-- Read From Time Spine 'mf_time_spine'
SELECT
DATE_TRUNC('day', time_spine_src_28006.ds) AS ds__day
time_spine_src_28006.ds AS ds__day
, DATE_TRUNC('week', time_spine_src_28006.ds) AS ds__week
, DATE_TRUNC('month', time_spine_src_28006.ds) AS ds__month
, DATE_TRUNC('quarter', time_spine_src_28006.ds) AS ds__quarter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ FROM ***************************.mf_time_spine time_spine_src_28006
LEFT OUTER JOIN
***************************.mf_time_spine subq_4
ON
DATE_TRUNC('day', time_spine_src_28006.ds) = subq_4.ds
time_spine_src_28006.ds = subq_4.ds
GROUP BY
subq_4.martian_day
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ FROM (
FROM (
-- Read From Time Spine 'mf_time_spine_millisecond'
SELECT
DATETIME_TRUNC(time_spine_src_28002.ts, millisecond) AS ts__millisecond
time_spine_src_28002.ts AS ts__millisecond
, DATETIME_TRUNC(time_spine_src_28002.ts, second) AS ts__second
, DATETIME_TRUNC(time_spine_src_28002.ts, minute) AS ts__minute
, DATETIME_TRUNC(time_spine_src_28002.ts, hour) AS ts__hour
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sql_engine: BigQuery
-- Metric Time Dimension 'ts'
-- Pass Only Elements: ['metric_time__millisecond',]
SELECT
DATETIME_TRUNC(ts, millisecond) AS metric_time__millisecond
ts AS metric_time__millisecond
FROM ***************************.mf_time_spine_millisecond time_spine_src_28002
GROUP BY
metric_time__millisecond
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ FROM (
FROM (
-- Read From Time Spine 'mf_time_spine_second'
SELECT
DATETIME_TRUNC(time_spine_src_28003.ts, second) AS ts__second
time_spine_src_28003.ts AS ts__second
, DATETIME_TRUNC(time_spine_src_28003.ts, minute) AS ts__minute
, DATETIME_TRUNC(time_spine_src_28003.ts, hour) AS ts__hour
, DATETIME_TRUNC(time_spine_src_28003.ts, day) AS ts__day
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ sql_engine: BigQuery
-- Constrain Time Range to [2020-01-01T00:00:02, 2020-01-01T00:00:08]
-- Pass Only Elements: ['metric_time__second',]
SELECT
DATETIME_TRUNC(ts, second) AS metric_time__second
ts AS metric_time__second
FROM ***************************.mf_time_spine_second time_spine_src_28003
WHERE DATETIME_TRUNC(ts, second) BETWEEN '2020-01-01 00:00:02' AND '2020-01-01 00:00:08'
WHERE ts BETWEEN '2020-01-01 00:00:02' AND '2020-01-01 00:00:08'
GROUP BY
metric_time__second
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ FROM (
FROM (
-- Read From Time Spine 'mf_time_spine_millisecond'
SELECT
DATE_TRUNC('millisecond', time_spine_src_28002.ts) AS ts__millisecond
time_spine_src_28002.ts AS ts__millisecond
, DATE_TRUNC('second', time_spine_src_28002.ts) AS ts__second
, DATE_TRUNC('minute', time_spine_src_28002.ts) AS ts__minute
, DATE_TRUNC('hour', time_spine_src_28002.ts) AS ts__hour
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sql_engine: Databricks
-- Metric Time Dimension 'ts'
-- Pass Only Elements: ['metric_time__millisecond',]
SELECT
DATE_TRUNC('millisecond', ts) AS metric_time__millisecond
ts AS metric_time__millisecond
FROM ***************************.mf_time_spine_millisecond time_spine_src_28002
GROUP BY
DATE_TRUNC('millisecond', ts)
ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ FROM (
FROM (
-- Read From Time Spine 'mf_time_spine_second'
SELECT
DATE_TRUNC('second', time_spine_src_28003.ts) AS ts__second
time_spine_src_28003.ts AS ts__second
, DATE_TRUNC('minute', time_spine_src_28003.ts) AS ts__minute
, DATE_TRUNC('hour', time_spine_src_28003.ts) AS ts__hour
, DATE_TRUNC('day', time_spine_src_28003.ts) AS ts__day
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ sql_engine: Databricks
-- Constrain Time Range to [2020-01-01T00:00:02, 2020-01-01T00:00:08]
-- Pass Only Elements: ['metric_time__second',]
SELECT
DATE_TRUNC('second', ts) AS metric_time__second
ts AS metric_time__second
FROM ***************************.mf_time_spine_second time_spine_src_28003
WHERE DATE_TRUNC('second', ts) BETWEEN '2020-01-01 00:00:02' AND '2020-01-01 00:00:08'
WHERE ts BETWEEN '2020-01-01 00:00:02' AND '2020-01-01 00:00:08'
GROUP BY
DATE_TRUNC('second', ts)
ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ FROM (
FROM (
-- Read From Time Spine 'mf_time_spine_millisecond'
SELECT
DATE_TRUNC('millisecond', time_spine_src_28002.ts) AS ts__millisecond
time_spine_src_28002.ts AS ts__millisecond
, DATE_TRUNC('second', time_spine_src_28002.ts) AS ts__second
, DATE_TRUNC('minute', time_spine_src_28002.ts) AS ts__minute
, DATE_TRUNC('hour', time_spine_src_28002.ts) AS ts__hour
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sql_engine: Postgres
-- Metric Time Dimension 'ts'
-- Pass Only Elements: ['metric_time__millisecond',]
SELECT
DATE_TRUNC('millisecond', ts) AS metric_time__millisecond
ts AS metric_time__millisecond
FROM ***************************.mf_time_spine_millisecond time_spine_src_28002
GROUP BY
DATE_TRUNC('millisecond', ts)
ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ FROM (
FROM (
-- Read From Time Spine 'mf_time_spine_second'
SELECT
DATE_TRUNC('second', time_spine_src_28003.ts) AS ts__second
time_spine_src_28003.ts AS ts__second
, DATE_TRUNC('minute', time_spine_src_28003.ts) AS ts__minute
, DATE_TRUNC('hour', time_spine_src_28003.ts) AS ts__hour
, DATE_TRUNC('day', time_spine_src_28003.ts) AS ts__day
Expand Down
Loading

0 comments on commit 2bb872b

Please sign in to comment.