-
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.
- Loading branch information
1 parent
f26245c
commit 81cbd20
Showing
12 changed files
with
2,418 additions
and
0 deletions.
There are no files selected for viewing
371 changes: 371 additions & 0 deletions
371
...y.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity_and_join__plan0.sql
Large diffs are not rendered by default.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
...eryPlan/BigQuery/test_simple_metric_with_custom_granularity_and_join__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,32 @@ | ||
-- Join to Custom Granularity Dataset | ||
-- Pass Only Elements: ['bookings', 'listing__ds__day'] | ||
-- Aggregate Measures | ||
-- Compute Metrics via Expressions | ||
SELECT | ||
subq_17.martian_day AS listing__ds__martian_day | ||
, SUM(subq_16.bookings) AS bookings | ||
FROM ( | ||
-- Join Standard Outputs | ||
SELECT | ||
DATETIME_TRUNC(listings_latest_src_28000.created_at, day) AS listing__ds__day | ||
, subq_12.bookings AS bookings | ||
FROM ( | ||
-- Read Elements From Semantic Model 'bookings_source' | ||
-- Metric Time Dimension 'ds' | ||
-- Pass Only Elements: ['bookings', 'listing'] | ||
SELECT | ||
listing_id AS listing | ||
, 1 AS bookings | ||
FROM ***************************.fct_bookings bookings_source_src_28000 | ||
) subq_12 | ||
LEFT OUTER JOIN | ||
***************************.dim_listings_latest listings_latest_src_28000 | ||
ON | ||
subq_12.listing = listings_latest_src_28000.listing_id | ||
) subq_16 | ||
LEFT OUTER JOIN | ||
***************************.mf_time_spine subq_17 | ||
ON | ||
subq_16.listing__ds__day = subq_17.ds | ||
GROUP BY | ||
listing__ds__martian_day |
371 changes: 371 additions & 0 deletions
371
...py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity_and_join__plan0.sql
Large diffs are not rendered by default.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
...yPlan/Databricks/test_simple_metric_with_custom_granularity_and_join__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,32 @@ | ||
-- Join to Custom Granularity Dataset | ||
-- Pass Only Elements: ['bookings', 'listing__ds__day'] | ||
-- Aggregate Measures | ||
-- Compute Metrics via Expressions | ||
SELECT | ||
subq_17.martian_day AS listing__ds__martian_day | ||
, SUM(subq_16.bookings) AS bookings | ||
FROM ( | ||
-- Join Standard Outputs | ||
SELECT | ||
DATE_TRUNC('day', listings_latest_src_28000.created_at) AS listing__ds__day | ||
, subq_12.bookings AS bookings | ||
FROM ( | ||
-- Read Elements From Semantic Model 'bookings_source' | ||
-- Metric Time Dimension 'ds' | ||
-- Pass Only Elements: ['bookings', 'listing'] | ||
SELECT | ||
listing_id AS listing | ||
, 1 AS bookings | ||
FROM ***************************.fct_bookings bookings_source_src_28000 | ||
) subq_12 | ||
LEFT OUTER JOIN | ||
***************************.dim_listings_latest listings_latest_src_28000 | ||
ON | ||
subq_12.listing = listings_latest_src_28000.listing_id | ||
) subq_16 | ||
LEFT OUTER JOIN | ||
***************************.mf_time_spine subq_17 | ||
ON | ||
subq_16.listing__ds__day = subq_17.ds | ||
GROUP BY | ||
subq_17.martian_day |
371 changes: 371 additions & 0 deletions
371
...y.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity_and_join__plan0.sql
Large diffs are not rendered by default.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
...eryPlan/Postgres/test_simple_metric_with_custom_granularity_and_join__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,32 @@ | ||
-- Join to Custom Granularity Dataset | ||
-- Pass Only Elements: ['bookings', 'listing__ds__day'] | ||
-- Aggregate Measures | ||
-- Compute Metrics via Expressions | ||
SELECT | ||
subq_17.martian_day AS listing__ds__martian_day | ||
, SUM(subq_16.bookings) AS bookings | ||
FROM ( | ||
-- Join Standard Outputs | ||
SELECT | ||
DATE_TRUNC('day', listings_latest_src_28000.created_at) AS listing__ds__day | ||
, subq_12.bookings AS bookings | ||
FROM ( | ||
-- Read Elements From Semantic Model 'bookings_source' | ||
-- Metric Time Dimension 'ds' | ||
-- Pass Only Elements: ['bookings', 'listing'] | ||
SELECT | ||
listing_id AS listing | ||
, 1 AS bookings | ||
FROM ***************************.fct_bookings bookings_source_src_28000 | ||
) subq_12 | ||
LEFT OUTER JOIN | ||
***************************.dim_listings_latest listings_latest_src_28000 | ||
ON | ||
subq_12.listing = listings_latest_src_28000.listing_id | ||
) subq_16 | ||
LEFT OUTER JOIN | ||
***************************.mf_time_spine subq_17 | ||
ON | ||
subq_16.listing__ds__day = subq_17.ds | ||
GROUP BY | ||
subq_17.martian_day |
371 changes: 371 additions & 0 deletions
371
...y.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity_and_join__plan0.sql
Large diffs are not rendered by default.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
...eryPlan/Redshift/test_simple_metric_with_custom_granularity_and_join__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,32 @@ | ||
-- Join to Custom Granularity Dataset | ||
-- Pass Only Elements: ['bookings', 'listing__ds__day'] | ||
-- Aggregate Measures | ||
-- Compute Metrics via Expressions | ||
SELECT | ||
subq_17.martian_day AS listing__ds__martian_day | ||
, SUM(subq_16.bookings) AS bookings | ||
FROM ( | ||
-- Join Standard Outputs | ||
SELECT | ||
DATE_TRUNC('day', listings_latest_src_28000.created_at) AS listing__ds__day | ||
, subq_12.bookings AS bookings | ||
FROM ( | ||
-- Read Elements From Semantic Model 'bookings_source' | ||
-- Metric Time Dimension 'ds' | ||
-- Pass Only Elements: ['bookings', 'listing'] | ||
SELECT | ||
listing_id AS listing | ||
, 1 AS bookings | ||
FROM ***************************.fct_bookings bookings_source_src_28000 | ||
) subq_12 | ||
LEFT OUTER JOIN | ||
***************************.dim_listings_latest listings_latest_src_28000 | ||
ON | ||
subq_12.listing = listings_latest_src_28000.listing_id | ||
) subq_16 | ||
LEFT OUTER JOIN | ||
***************************.mf_time_spine subq_17 | ||
ON | ||
subq_16.listing__ds__day = subq_17.ds | ||
GROUP BY | ||
subq_17.martian_day |
Oops, something went wrong.