Skip to content

Commit

Permalink
Update SQL engine snapshots
Browse files Browse the repository at this point in the history
Also removes some CLI snapshot output that was accidentally added due to a print statemen
  • Loading branch information
courtneyholcomb committed Jul 29, 2024
1 parent 56bd86c commit d6d5ef5
Show file tree
Hide file tree
Showing 31 changed files with 2,215 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
<FilterElementsNode>
<!-- description = "Pass Only Elements: ['metric_time__day', 'metric_time__month']" -->
<!-- node_id = NodeId(id_str='pfe_2') -->
<!-- include_spec = TimeDimensionSpec(element_name='metric_time', time_granularity=DAY) -->
<!-- include_spec = TimeDimensionSpec(element_name='metric_time', time_granularity=MONTH) -->
<!-- include_spec = TimeDimensionSpec(element_name='metric_time', time_granularity=DAY) -->
<!-- distinct = False -->
<MetricTimeDimensionTransformNode>
<!-- description = "Metric Time Dimension 'ds'" -->
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-- Read Elements From Semantic Model 'users_ds_source'
-- Pass Only Elements: ['user__bio_added_ts__second',]
SELECT
DATETIME_TRUNC(bio_added_ts, second) AS user__bio_added_ts__second
FROM ***************************.dim_users users_ds_source_src_28000
GROUP BY
user__bio_added_ts__second
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
-- Pass Only Elements: ['metric_time__millisecond',]
SELECT
subq_1.metric_time__millisecond
FROM (
-- Metric Time Dimension 'ts'
SELECT
subq_0.ts__millisecond
, subq_0.ts__second
, subq_0.ts__minute
, subq_0.ts__hour
, subq_0.ts__day
, subq_0.ts__week
, subq_0.ts__month
, subq_0.ts__quarter
, subq_0.ts__year
, subq_0.ts__extract_year
, subq_0.ts__extract_quarter
, subq_0.ts__extract_month
, subq_0.ts__extract_day
, subq_0.ts__extract_dow
, subq_0.ts__extract_doy
, subq_0.ts__millisecond AS metric_time__millisecond
, subq_0.ts__second AS metric_time__second
, subq_0.ts__minute AS metric_time__minute
, subq_0.ts__hour AS metric_time__hour
, subq_0.ts__day AS metric_time__day
, subq_0.ts__week AS metric_time__week
, subq_0.ts__month AS metric_time__month
, subq_0.ts__quarter AS metric_time__quarter
, subq_0.ts__year AS metric_time__year
, subq_0.ts__extract_year AS metric_time__extract_year
, subq_0.ts__extract_quarter AS metric_time__extract_quarter
, subq_0.ts__extract_month AS metric_time__extract_month
, subq_0.ts__extract_day AS metric_time__extract_day
, subq_0.ts__extract_dow AS metric_time__extract_dow
, subq_0.ts__extract_doy AS metric_time__extract_doy
FROM (
-- Time Spine
SELECT
DATETIME_TRUNC(time_spine_src_28002.ts, millisecond) 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
, DATETIME_TRUNC(time_spine_src_28002.ts, day) AS ts__day
, DATETIME_TRUNC(time_spine_src_28002.ts, isoweek) AS ts__week
, DATETIME_TRUNC(time_spine_src_28002.ts, month) AS ts__month
, DATETIME_TRUNC(time_spine_src_28002.ts, quarter) AS ts__quarter
, DATETIME_TRUNC(time_spine_src_28002.ts, year) AS ts__year
, EXTRACT(year FROM time_spine_src_28002.ts) AS ts__extract_year
, EXTRACT(quarter FROM time_spine_src_28002.ts) AS ts__extract_quarter
, EXTRACT(month FROM time_spine_src_28002.ts) AS ts__extract_month
, EXTRACT(day FROM time_spine_src_28002.ts) AS ts__extract_day
, IF(EXTRACT(dayofweek FROM time_spine_src_28002.ts) = 1, 7, EXTRACT(dayofweek FROM time_spine_src_28002.ts) - 1) AS ts__extract_dow
, EXTRACT(dayofyear FROM time_spine_src_28002.ts) AS ts__extract_doy
FROM ***************************.mf_time_spine_millisecond time_spine_src_28002
) subq_0
) subq_1
GROUP BY
metric_time__millisecond
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- Time Spine
-- Metric Time Dimension 'ts'
-- Pass Only Elements: ['metric_time__millisecond',]
SELECT
DATETIME_TRUNC(ts, millisecond) AS metric_time__millisecond
FROM ***************************.mf_time_spine_millisecond time_spine_src_28002
GROUP BY
metric_time__millisecond

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-- Read Elements From Semantic Model 'users_ds_source'
-- Pass Only Elements: ['user__bio_added_ts__second',]
SELECT
DATE_TRUNC('second', bio_added_ts) AS user__bio_added_ts__second
FROM ***************************.dim_users users_ds_source_src_28000
GROUP BY
DATE_TRUNC('second', bio_added_ts)
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
-- Pass Only Elements: ['metric_time__millisecond',]
SELECT
subq_1.metric_time__millisecond
FROM (
-- Metric Time Dimension 'ts'
SELECT
subq_0.ts__millisecond
, subq_0.ts__second
, subq_0.ts__minute
, subq_0.ts__hour
, subq_0.ts__day
, subq_0.ts__week
, subq_0.ts__month
, subq_0.ts__quarter
, subq_0.ts__year
, subq_0.ts__extract_year
, subq_0.ts__extract_quarter
, subq_0.ts__extract_month
, subq_0.ts__extract_day
, subq_0.ts__extract_dow
, subq_0.ts__extract_doy
, subq_0.ts__millisecond AS metric_time__millisecond
, subq_0.ts__second AS metric_time__second
, subq_0.ts__minute AS metric_time__minute
, subq_0.ts__hour AS metric_time__hour
, subq_0.ts__day AS metric_time__day
, subq_0.ts__week AS metric_time__week
, subq_0.ts__month AS metric_time__month
, subq_0.ts__quarter AS metric_time__quarter
, subq_0.ts__year AS metric_time__year
, subq_0.ts__extract_year AS metric_time__extract_year
, subq_0.ts__extract_quarter AS metric_time__extract_quarter
, subq_0.ts__extract_month AS metric_time__extract_month
, subq_0.ts__extract_day AS metric_time__extract_day
, subq_0.ts__extract_dow AS metric_time__extract_dow
, subq_0.ts__extract_doy AS metric_time__extract_doy
FROM (
-- Time Spine
SELECT
DATE_TRUNC('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
, DATE_TRUNC('day', time_spine_src_28002.ts) AS ts__day
, DATE_TRUNC('week', time_spine_src_28002.ts) AS ts__week
, DATE_TRUNC('month', time_spine_src_28002.ts) AS ts__month
, DATE_TRUNC('quarter', time_spine_src_28002.ts) AS ts__quarter
, DATE_TRUNC('year', time_spine_src_28002.ts) AS ts__year
, EXTRACT(year FROM time_spine_src_28002.ts) AS ts__extract_year
, EXTRACT(quarter FROM time_spine_src_28002.ts) AS ts__extract_quarter
, EXTRACT(month FROM time_spine_src_28002.ts) AS ts__extract_month
, EXTRACT(day FROM time_spine_src_28002.ts) AS ts__extract_day
, EXTRACT(DAYOFWEEK_ISO FROM time_spine_src_28002.ts) AS ts__extract_dow
, EXTRACT(doy FROM time_spine_src_28002.ts) AS ts__extract_doy
FROM ***************************.mf_time_spine_millisecond time_spine_src_28002
) subq_0
) subq_1
GROUP BY
subq_1.metric_time__millisecond
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- Time Spine
-- Metric Time Dimension 'ts'
-- Pass Only Elements: ['metric_time__millisecond',]
SELECT
DATE_TRUNC('millisecond', ts) AS metric_time__millisecond
FROM ***************************.mf_time_spine_millisecond time_spine_src_28002
GROUP BY
DATE_TRUNC('millisecond', ts)
Loading

0 comments on commit d6d5ef5

Please sign in to comment.