-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update SQL engine snapshots for new tests
- Loading branch information
1 parent
0f0c956
commit 857a942
Showing
60 changed files
with
17,682 additions
and
0 deletions.
There are no files selected for viewing
602 changes: 602 additions & 0 deletions
602
...ndering.py/SqlQueryPlan/BigQuery/test_subdaily_cumulative_grain_to_date_metric__plan0.sql
Large diffs are not rendered by default.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
.../SqlQueryPlan/BigQuery/test_subdaily_cumulative_grain_to_date_metric__plan0_optimized.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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
-- Join Self Over Time Range | ||
-- Pass Only Elements: ['archived_users', 'metric_time__hour'] | ||
-- Aggregate Measures | ||
-- Compute Metrics via Expressions | ||
SELECT | ||
subq_10.ts AS metric_time__hour | ||
, SUM(subq_8.archived_users) AS subdaily_cumulative_grain_to_date_metric | ||
FROM ***************************.mf_time_spine_hour subq_10 | ||
INNER JOIN ( | ||
-- Read Elements From Semantic Model 'users_ds_source' | ||
-- Metric Time Dimension 'archived_at' | ||
SELECT | ||
DATETIME_TRUNC(archived_at, hour) AS metric_time__hour | ||
, 1 AS archived_users | ||
FROM ***************************.dim_users users_ds_source_src_28000 | ||
) subq_8 | ||
ON | ||
( | ||
subq_8.metric_time__hour <= subq_10.ts | ||
) AND ( | ||
subq_8.metric_time__hour >= DATETIME_TRUNC(subq_10.ts, hour) | ||
) | ||
GROUP BY | ||
metric_time__hour |
602 changes: 602 additions & 0 deletions
602
...part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_cumulative_window_metric__plan0.sql
Large diffs are not rendered by default.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
...ring.py/SqlQueryPlan/BigQuery/test_subdaily_cumulative_window_metric__plan0_optimized.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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
-- Join Self Over Time Range | ||
-- Pass Only Elements: ['archived_users', 'metric_time__hour'] | ||
-- Aggregate Measures | ||
-- Compute Metrics via Expressions | ||
SELECT | ||
subq_10.ts AS metric_time__hour | ||
, SUM(subq_8.archived_users) AS subdaily_cumulative_window_metric | ||
FROM ***************************.mf_time_spine_hour subq_10 | ||
INNER JOIN ( | ||
-- Read Elements From Semantic Model 'users_ds_source' | ||
-- Metric Time Dimension 'archived_at' | ||
SELECT | ||
DATETIME_TRUNC(archived_at, hour) AS metric_time__hour | ||
, 1 AS archived_users | ||
FROM ***************************.dim_users users_ds_source_src_28000 | ||
) subq_8 | ||
ON | ||
( | ||
subq_8.metric_time__hour <= subq_10.ts | ||
) AND ( | ||
subq_8.metric_time__hour > DATE_SUB(CAST(subq_10.ts AS DATETIME), INTERVAL 3 hour) | ||
) | ||
GROUP BY | ||
metric_time__hour |
410 changes: 410 additions & 0 deletions
410
...art_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_join_to_time_spine_metric__plan0.sql
Large diffs are not rendered by default.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
...ing.py/SqlQueryPlan/BigQuery/test_subdaily_join_to_time_spine_metric__plan0_optimized.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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
-- Join to Time Spine Dataset | ||
-- Compute Metrics via Expressions | ||
SELECT | ||
subq_12.ts AS metric_time__hour | ||
, subq_10.archived_users AS subdaily_join_to_time_spine_metric | ||
FROM ***************************.mf_time_spine_hour subq_12 | ||
LEFT OUTER JOIN ( | ||
-- Aggregate Measures | ||
SELECT | ||
metric_time__hour | ||
, SUM(archived_users) AS archived_users | ||
FROM ( | ||
-- Read Elements From Semantic Model 'users_ds_source' | ||
-- Metric Time Dimension 'archived_at' | ||
-- Pass Only Elements: ['archived_users', 'metric_time__hour'] | ||
SELECT | ||
DATETIME_TRUNC(archived_at, hour) AS metric_time__hour | ||
, 1 AS archived_users | ||
FROM ***************************.dim_users users_ds_source_src_28000 | ||
) subq_9 | ||
GROUP BY | ||
metric_time__hour | ||
) subq_10 | ||
ON | ||
subq_12.ts = subq_10.metric_time__hour |
604 changes: 604 additions & 0 deletions
604
...e_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_offset_to_grain_metric__plan0.sql
Large diffs are not rendered by default.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
...dering.py/SqlQueryPlan/BigQuery/test_subdaily_offset_to_grain_metric__plan0_optimized.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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
-- Compute Metrics via Expressions | ||
SELECT | ||
metric_time__hour | ||
, archived_users AS subdaily_offset_grain_to_date_metric | ||
FROM ( | ||
-- Join to Time Spine Dataset | ||
-- Pass Only Elements: ['archived_users', 'metric_time__hour'] | ||
-- Aggregate Measures | ||
-- Compute Metrics via Expressions | ||
SELECT | ||
subq_11.ts AS metric_time__hour | ||
, SUM(subq_9.archived_users) AS archived_users | ||
FROM ***************************.mf_time_spine_hour subq_11 | ||
INNER JOIN ( | ||
-- Read Elements From Semantic Model 'users_ds_source' | ||
-- Metric Time Dimension 'archived_at' | ||
SELECT | ||
DATETIME_TRUNC(archived_at, hour) AS metric_time__hour | ||
, 1 AS archived_users | ||
FROM ***************************.dim_users users_ds_source_src_28000 | ||
) subq_9 | ||
ON | ||
DATETIME_TRUNC(subq_11.ts, hour) = subq_9.metric_time__hour | ||
GROUP BY | ||
metric_time__hour | ||
) subq_15 |
604 changes: 604 additions & 0 deletions
604
...ate_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_offset_window_metric__plan0.sql
Large diffs are not rendered by default.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
...endering.py/SqlQueryPlan/BigQuery/test_subdaily_offset_window_metric__plan0_optimized.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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
-- Compute Metrics via Expressions | ||
SELECT | ||
metric_time__hour | ||
, archived_users AS subdaily_offset_window_metric | ||
FROM ( | ||
-- Join to Time Spine Dataset | ||
-- Pass Only Elements: ['archived_users', 'metric_time__hour'] | ||
-- Aggregate Measures | ||
-- Compute Metrics via Expressions | ||
SELECT | ||
subq_11.ts AS metric_time__hour | ||
, SUM(subq_9.archived_users) AS archived_users | ||
FROM ***************************.mf_time_spine_hour subq_11 | ||
INNER JOIN ( | ||
-- Read Elements From Semantic Model 'users_ds_source' | ||
-- Metric Time Dimension 'archived_at' | ||
SELECT | ||
DATETIME_TRUNC(archived_at, hour) AS metric_time__hour | ||
, 1 AS archived_users | ||
FROM ***************************.dim_users users_ds_source_src_28000 | ||
) subq_9 | ||
ON | ||
DATE_SUB(CAST(subq_11.ts AS DATETIME), INTERVAL 1 hour) = subq_9.metric_time__hour | ||
GROUP BY | ||
metric_time__hour | ||
) subq_15 |
602 changes: 602 additions & 0 deletions
602
...ering.py/SqlQueryPlan/Databricks/test_subdaily_cumulative_grain_to_date_metric__plan0.sql
Large diffs are not rendered by default.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
...qlQueryPlan/Databricks/test_subdaily_cumulative_grain_to_date_metric__plan0_optimized.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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
-- Join Self Over Time Range | ||
-- Pass Only Elements: ['archived_users', 'metric_time__hour'] | ||
-- Aggregate Measures | ||
-- Compute Metrics via Expressions | ||
SELECT | ||
subq_10.ts AS metric_time__hour | ||
, SUM(subq_8.archived_users) AS subdaily_cumulative_grain_to_date_metric | ||
FROM ***************************.mf_time_spine_hour subq_10 | ||
INNER JOIN ( | ||
-- Read Elements From Semantic Model 'users_ds_source' | ||
-- Metric Time Dimension 'archived_at' | ||
SELECT | ||
DATE_TRUNC('hour', archived_at) AS metric_time__hour | ||
, 1 AS archived_users | ||
FROM ***************************.dim_users users_ds_source_src_28000 | ||
) subq_8 | ||
ON | ||
( | ||
subq_8.metric_time__hour <= subq_10.ts | ||
) AND ( | ||
subq_8.metric_time__hour >= DATE_TRUNC('hour', subq_10.ts) | ||
) | ||
GROUP BY | ||
subq_10.ts |
Oops, something went wrong.