-
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 new snapshots added after rebase
- Loading branch information
1 parent
a2a01c0
commit 683bc53
Showing
14 changed files
with
1,579 additions
and
1,628 deletions.
There are no files selected for viewing
424 changes: 209 additions & 215 deletions
424
...y/SqlQueryPlan/BigQuery/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql
Large diffs are not rendered by default.
Oops, something went wrong.
29 changes: 14 additions & 15 deletions
29
...Plan/BigQuery/test_join_to_time_spine_metric_grouped_by_custom_grain__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 |
---|---|---|
@@ -1,38 +1,37 @@ | ||
-- Join to Time Spine Dataset | ||
-- Compute Metrics via Expressions | ||
SELECT | ||
subq_15.metric_time__martian_day AS metric_time__martian_day | ||
, subq_14.bookings AS bookings_join_to_time_spine | ||
subq_13.metric_time__martian_day AS metric_time__martian_day | ||
, subq_12.bookings AS bookings_join_to_time_spine | ||
FROM ( | ||
-- Time Spine | ||
SELECT | ||
martian_day AS metric_time__martian_day | ||
FROM ***************************.mf_time_spine subq_16 | ||
FROM ***************************.mf_time_spine subq_14 | ||
GROUP BY | ||
metric_time__martian_day | ||
) subq_15 | ||
) subq_13 | ||
LEFT OUTER JOIN ( | ||
-- Pass Only Elements: ['bookings', 'metric_time__day'] | ||
-- Metric Time Dimension 'ds' | ||
-- Join to Custom Granularity Dataset | ||
-- Pass Only Elements: ['bookings', 'metric_time__martian_day'] | ||
-- Aggregate Measures | ||
SELECT | ||
subq_11.martian_day AS metric_time__martian_day | ||
, SUM(subq_10.bookings) AS bookings | ||
subq_9.martian_day AS metric_time__martian_day | ||
, SUM(subq_8.bookings) AS bookings | ||
FROM ( | ||
-- Read Elements From Semantic Model 'bookings_source' | ||
-- Metric Time Dimension 'ds' | ||
SELECT | ||
DATETIME_TRUNC(ds, day) AS metric_time__day | ||
, 1 AS bookings | ||
1 AS bookings | ||
, DATETIME_TRUNC(ds, day) AS ds__day | ||
FROM ***************************.fct_bookings bookings_source_src_28000 | ||
) subq_10 | ||
) subq_8 | ||
LEFT OUTER JOIN | ||
***************************.mf_time_spine subq_11 | ||
***************************.mf_time_spine subq_9 | ||
ON | ||
subq_10.metric_time__day = subq_11.ds | ||
subq_8.ds__day = subq_9.ds | ||
GROUP BY | ||
metric_time__martian_day | ||
) subq_14 | ||
) subq_12 | ||
ON | ||
subq_15.metric_time__martian_day = subq_14.metric_time__martian_day | ||
subq_13.metric_time__martian_day = subq_12.metric_time__martian_day |
428 changes: 211 additions & 217 deletions
428
...SqlQueryPlan/Databricks/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql
Large diffs are not rendered by default.
Oops, something went wrong.
31 changes: 15 additions & 16 deletions
31
...an/Databricks/test_join_to_time_spine_metric_grouped_by_custom_grain__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 |
---|---|---|
@@ -1,38 +1,37 @@ | ||
-- Join to Time Spine Dataset | ||
-- Compute Metrics via Expressions | ||
SELECT | ||
subq_15.metric_time__martian_day AS metric_time__martian_day | ||
, subq_14.bookings AS bookings_join_to_time_spine | ||
subq_13.metric_time__martian_day AS metric_time__martian_day | ||
, subq_12.bookings AS bookings_join_to_time_spine | ||
FROM ( | ||
-- Time Spine | ||
SELECT | ||
martian_day AS metric_time__martian_day | ||
FROM ***************************.mf_time_spine subq_16 | ||
FROM ***************************.mf_time_spine subq_14 | ||
GROUP BY | ||
martian_day | ||
) subq_15 | ||
) subq_13 | ||
LEFT OUTER JOIN ( | ||
-- Pass Only Elements: ['bookings', 'metric_time__day'] | ||
-- Metric Time Dimension 'ds' | ||
-- Join to Custom Granularity Dataset | ||
-- Pass Only Elements: ['bookings', 'metric_time__martian_day'] | ||
-- Aggregate Measures | ||
SELECT | ||
subq_11.martian_day AS metric_time__martian_day | ||
, SUM(subq_10.bookings) AS bookings | ||
subq_9.martian_day AS metric_time__martian_day | ||
, SUM(subq_8.bookings) AS bookings | ||
FROM ( | ||
-- Read Elements From Semantic Model 'bookings_source' | ||
-- Metric Time Dimension 'ds' | ||
SELECT | ||
DATE_TRUNC('day', ds) AS metric_time__day | ||
, 1 AS bookings | ||
1 AS bookings | ||
, DATE_TRUNC('day', ds) AS ds__day | ||
FROM ***************************.fct_bookings bookings_source_src_28000 | ||
) subq_10 | ||
) subq_8 | ||
LEFT OUTER JOIN | ||
***************************.mf_time_spine subq_11 | ||
***************************.mf_time_spine subq_9 | ||
ON | ||
subq_10.metric_time__day = subq_11.ds | ||
subq_8.ds__day = subq_9.ds | ||
GROUP BY | ||
subq_11.martian_day | ||
) subq_14 | ||
subq_9.martian_day | ||
) subq_12 | ||
ON | ||
subq_15.metric_time__martian_day = subq_14.metric_time__martian_day | ||
subq_13.metric_time__martian_day = subq_12.metric_time__martian_day |
428 changes: 211 additions & 217 deletions
428
....py/SqlQueryPlan/DuckDB/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql
Large diffs are not rendered by default.
Oops, something went wrong.
31 changes: 15 additions & 16 deletions
31
...ryPlan/DuckDB/test_join_to_time_spine_metric_grouped_by_custom_grain__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 |
---|---|---|
@@ -1,38 +1,37 @@ | ||
-- Join to Time Spine Dataset | ||
-- Compute Metrics via Expressions | ||
SELECT | ||
subq_15.metric_time__martian_day AS metric_time__martian_day | ||
, subq_14.bookings AS bookings_join_to_time_spine | ||
subq_13.metric_time__martian_day AS metric_time__martian_day | ||
, subq_12.bookings AS bookings_join_to_time_spine | ||
FROM ( | ||
-- Time Spine | ||
SELECT | ||
martian_day AS metric_time__martian_day | ||
FROM ***************************.mf_time_spine subq_16 | ||
FROM ***************************.mf_time_spine subq_14 | ||
GROUP BY | ||
martian_day | ||
) subq_15 | ||
) subq_13 | ||
LEFT OUTER JOIN ( | ||
-- Pass Only Elements: ['bookings', 'metric_time__day'] | ||
-- Metric Time Dimension 'ds' | ||
-- Join to Custom Granularity Dataset | ||
-- Pass Only Elements: ['bookings', 'metric_time__martian_day'] | ||
-- Aggregate Measures | ||
SELECT | ||
subq_11.martian_day AS metric_time__martian_day | ||
, SUM(subq_10.bookings) AS bookings | ||
subq_9.martian_day AS metric_time__martian_day | ||
, SUM(subq_8.bookings) AS bookings | ||
FROM ( | ||
-- Read Elements From Semantic Model 'bookings_source' | ||
-- Metric Time Dimension 'ds' | ||
SELECT | ||
DATE_TRUNC('day', ds) AS metric_time__day | ||
, 1 AS bookings | ||
1 AS bookings | ||
, DATE_TRUNC('day', ds) AS ds__day | ||
FROM ***************************.fct_bookings bookings_source_src_28000 | ||
) subq_10 | ||
) subq_8 | ||
LEFT OUTER JOIN | ||
***************************.mf_time_spine subq_11 | ||
***************************.mf_time_spine subq_9 | ||
ON | ||
subq_10.metric_time__day = subq_11.ds | ||
subq_8.ds__day = subq_9.ds | ||
GROUP BY | ||
subq_11.martian_day | ||
) subq_14 | ||
subq_9.martian_day | ||
) subq_12 | ||
ON | ||
subq_15.metric_time__martian_day = subq_14.metric_time__martian_day | ||
subq_13.metric_time__martian_day = subq_12.metric_time__martian_day |
Oops, something went wrong.