-
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
Showing
22 changed files
with
1,050 additions
and
1 deletion.
There are no files selected for viewing
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
45 changes: 45 additions & 0 deletions
45
metricflow/test/snapshots/test_rendered_query.py/str/BigQuery/test_id_enumeration__query.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,45 @@ | ||
-- Combine Aggregated Outputs | ||
SELECT | ||
COALESCE(subq_4.metric_time__day, subq_9.metric_time__day) AS metric_time__day | ||
, MAX(subq_4.bookings) AS bookings | ||
, MAX(subq_9.listings) AS listings | ||
FROM ( | ||
-- Aggregate Measures | ||
-- Compute Metrics via Expressions | ||
SELECT | ||
metric_time__day | ||
, SUM(bookings) AS bookings | ||
FROM ( | ||
-- Read Elements From Semantic Model 'bookings_source' | ||
-- Metric Time Dimension 'ds' | ||
-- Pass Only Elements: ['bookings', 'metric_time__day'] | ||
SELECT | ||
DATE_TRUNC(ds, day) AS metric_time__day | ||
, 1 AS bookings | ||
FROM ***************************.fct_bookings bookings_source_src_10000 | ||
) subq_2 | ||
GROUP BY | ||
metric_time__day | ||
) subq_4 | ||
FULL OUTER JOIN ( | ||
-- Aggregate Measures | ||
-- Compute Metrics via Expressions | ||
SELECT | ||
metric_time__day | ||
, SUM(listings) AS listings | ||
FROM ( | ||
-- Read Elements From Semantic Model 'listings_latest' | ||
-- Metric Time Dimension 'ds' | ||
-- Pass Only Elements: ['listings', 'metric_time__day'] | ||
SELECT | ||
DATE_TRUNC(created_at, day) AS metric_time__day | ||
, 1 AS listings | ||
FROM ***************************.dim_listings_latest listings_latest_src_10000 | ||
) subq_7 | ||
GROUP BY | ||
metric_time__day | ||
) subq_9 | ||
ON | ||
subq_4.metric_time__day = subq_9.metric_time__day | ||
GROUP BY | ||
metric_time__day |
45 changes: 45 additions & 0 deletions
45
...dered_query.py/str/BigQuery/test_id_enumeration_without_consistency_flag__first_query.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,45 @@ | ||
-- Combine Aggregated Outputs | ||
SELECT | ||
COALESCE(subq_10013.metric_time__day, subq_10018.metric_time__day) AS metric_time__day | ||
, MAX(subq_10013.bookings) AS bookings | ||
, MAX(subq_10018.listings) AS listings | ||
FROM ( | ||
-- Aggregate Measures | ||
-- Compute Metrics via Expressions | ||
SELECT | ||
metric_time__day | ||
, SUM(bookings) AS bookings | ||
FROM ( | ||
-- Read Elements From Semantic Model 'bookings_source' | ||
-- Metric Time Dimension 'ds' | ||
-- Pass Only Elements: ['bookings', 'metric_time__day'] | ||
SELECT | ||
DATE_TRUNC(ds, day) AS metric_time__day | ||
, 1 AS bookings | ||
FROM ***************************.fct_bookings bookings_source_src_10000 | ||
) subq_10011 | ||
GROUP BY | ||
metric_time__day | ||
) subq_10013 | ||
FULL OUTER JOIN ( | ||
-- Aggregate Measures | ||
-- Compute Metrics via Expressions | ||
SELECT | ||
metric_time__day | ||
, SUM(listings) AS listings | ||
FROM ( | ||
-- Read Elements From Semantic Model 'listings_latest' | ||
-- Metric Time Dimension 'ds' | ||
-- Pass Only Elements: ['listings', 'metric_time__day'] | ||
SELECT | ||
DATE_TRUNC(created_at, day) AS metric_time__day | ||
, 1 AS listings | ||
FROM ***************************.dim_listings_latest listings_latest_src_10000 | ||
) subq_10016 | ||
GROUP BY | ||
metric_time__day | ||
) subq_10018 | ||
ON | ||
subq_10013.metric_time__day = subq_10018.metric_time__day | ||
GROUP BY | ||
metric_time__day |
45 changes: 45 additions & 0 deletions
45
...ered_query.py/str/BigQuery/test_id_enumeration_without_consistency_flag__second_query.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,45 @@ | ||
-- Combine Aggregated Outputs | ||
SELECT | ||
COALESCE(subq_10023.metric_time__day, subq_10028.metric_time__day) AS metric_time__day | ||
, MAX(subq_10023.bookings) AS bookings | ||
, MAX(subq_10028.listings) AS listings | ||
FROM ( | ||
-- Aggregate Measures | ||
-- Compute Metrics via Expressions | ||
SELECT | ||
metric_time__day | ||
, SUM(bookings) AS bookings | ||
FROM ( | ||
-- Read Elements From Semantic Model 'bookings_source' | ||
-- Metric Time Dimension 'ds' | ||
-- Pass Only Elements: ['bookings', 'metric_time__day'] | ||
SELECT | ||
DATE_TRUNC(ds, day) AS metric_time__day | ||
, 1 AS bookings | ||
FROM ***************************.fct_bookings bookings_source_src_10000 | ||
) subq_10021 | ||
GROUP BY | ||
metric_time__day | ||
) subq_10023 | ||
FULL OUTER JOIN ( | ||
-- Aggregate Measures | ||
-- Compute Metrics via Expressions | ||
SELECT | ||
metric_time__day | ||
, SUM(listings) AS listings | ||
FROM ( | ||
-- Read Elements From Semantic Model 'listings_latest' | ||
-- Metric Time Dimension 'ds' | ||
-- Pass Only Elements: ['listings', 'metric_time__day'] | ||
SELECT | ||
DATE_TRUNC(created_at, day) AS metric_time__day | ||
, 1 AS listings | ||
FROM ***************************.dim_listings_latest listings_latest_src_10000 | ||
) subq_10026 | ||
GROUP BY | ||
metric_time__day | ||
) subq_10028 | ||
ON | ||
subq_10023.metric_time__day = subq_10028.metric_time__day | ||
GROUP BY | ||
metric_time__day |
45 changes: 45 additions & 0 deletions
45
...cflow/test/snapshots/test_rendered_query.py/str/Databricks/test_id_enumeration__query.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,45 @@ | ||
-- Combine Aggregated Outputs | ||
SELECT | ||
COALESCE(subq_4.metric_time__day, subq_9.metric_time__day) AS metric_time__day | ||
, MAX(subq_4.bookings) AS bookings | ||
, MAX(subq_9.listings) AS listings | ||
FROM ( | ||
-- Aggregate Measures | ||
-- Compute Metrics via Expressions | ||
SELECT | ||
metric_time__day | ||
, SUM(bookings) AS bookings | ||
FROM ( | ||
-- Read Elements From Semantic Model 'bookings_source' | ||
-- Metric Time Dimension 'ds' | ||
-- Pass Only Elements: ['bookings', 'metric_time__day'] | ||
SELECT | ||
DATE_TRUNC('day', ds) AS metric_time__day | ||
, 1 AS bookings | ||
FROM ***************************.fct_bookings bookings_source_src_10000 | ||
) subq_2 | ||
GROUP BY | ||
metric_time__day | ||
) subq_4 | ||
FULL OUTER JOIN ( | ||
-- Aggregate Measures | ||
-- Compute Metrics via Expressions | ||
SELECT | ||
metric_time__day | ||
, SUM(listings) AS listings | ||
FROM ( | ||
-- Read Elements From Semantic Model 'listings_latest' | ||
-- Metric Time Dimension 'ds' | ||
-- Pass Only Elements: ['listings', 'metric_time__day'] | ||
SELECT | ||
DATE_TRUNC('day', created_at) AS metric_time__day | ||
, 1 AS listings | ||
FROM ***************************.dim_listings_latest listings_latest_src_10000 | ||
) subq_7 | ||
GROUP BY | ||
metric_time__day | ||
) subq_9 | ||
ON | ||
subq_4.metric_time__day = subq_9.metric_time__day | ||
GROUP BY | ||
COALESCE(subq_4.metric_time__day, subq_9.metric_time__day) |
45 changes: 45 additions & 0 deletions
45
...red_query.py/str/Databricks/test_id_enumeration_without_consistency_flag__first_query.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,45 @@ | ||
-- Combine Aggregated Outputs | ||
SELECT | ||
COALESCE(subq_10013.metric_time__day, subq_10018.metric_time__day) AS metric_time__day | ||
, MAX(subq_10013.bookings) AS bookings | ||
, MAX(subq_10018.listings) AS listings | ||
FROM ( | ||
-- Aggregate Measures | ||
-- Compute Metrics via Expressions | ||
SELECT | ||
metric_time__day | ||
, SUM(bookings) AS bookings | ||
FROM ( | ||
-- Read Elements From Semantic Model 'bookings_source' | ||
-- Metric Time Dimension 'ds' | ||
-- Pass Only Elements: ['bookings', 'metric_time__day'] | ||
SELECT | ||
DATE_TRUNC('day', ds) AS metric_time__day | ||
, 1 AS bookings | ||
FROM ***************************.fct_bookings bookings_source_src_10000 | ||
) subq_10011 | ||
GROUP BY | ||
metric_time__day | ||
) subq_10013 | ||
FULL OUTER JOIN ( | ||
-- Aggregate Measures | ||
-- Compute Metrics via Expressions | ||
SELECT | ||
metric_time__day | ||
, SUM(listings) AS listings | ||
FROM ( | ||
-- Read Elements From Semantic Model 'listings_latest' | ||
-- Metric Time Dimension 'ds' | ||
-- Pass Only Elements: ['listings', 'metric_time__day'] | ||
SELECT | ||
DATE_TRUNC('day', created_at) AS metric_time__day | ||
, 1 AS listings | ||
FROM ***************************.dim_listings_latest listings_latest_src_10000 | ||
) subq_10016 | ||
GROUP BY | ||
metric_time__day | ||
) subq_10018 | ||
ON | ||
subq_10013.metric_time__day = subq_10018.metric_time__day | ||
GROUP BY | ||
COALESCE(subq_10013.metric_time__day, subq_10018.metric_time__day) |
45 changes: 45 additions & 0 deletions
45
...ed_query.py/str/Databricks/test_id_enumeration_without_consistency_flag__second_query.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,45 @@ | ||
-- Combine Aggregated Outputs | ||
SELECT | ||
COALESCE(subq_10023.metric_time__day, subq_10028.metric_time__day) AS metric_time__day | ||
, MAX(subq_10023.bookings) AS bookings | ||
, MAX(subq_10028.listings) AS listings | ||
FROM ( | ||
-- Aggregate Measures | ||
-- Compute Metrics via Expressions | ||
SELECT | ||
metric_time__day | ||
, SUM(bookings) AS bookings | ||
FROM ( | ||
-- Read Elements From Semantic Model 'bookings_source' | ||
-- Metric Time Dimension 'ds' | ||
-- Pass Only Elements: ['bookings', 'metric_time__day'] | ||
SELECT | ||
DATE_TRUNC('day', ds) AS metric_time__day | ||
, 1 AS bookings | ||
FROM ***************************.fct_bookings bookings_source_src_10000 | ||
) subq_10021 | ||
GROUP BY | ||
metric_time__day | ||
) subq_10023 | ||
FULL OUTER JOIN ( | ||
-- Aggregate Measures | ||
-- Compute Metrics via Expressions | ||
SELECT | ||
metric_time__day | ||
, SUM(listings) AS listings | ||
FROM ( | ||
-- Read Elements From Semantic Model 'listings_latest' | ||
-- Metric Time Dimension 'ds' | ||
-- Pass Only Elements: ['listings', 'metric_time__day'] | ||
SELECT | ||
DATE_TRUNC('day', created_at) AS metric_time__day | ||
, 1 AS listings | ||
FROM ***************************.dim_listings_latest listings_latest_src_10000 | ||
) subq_10026 | ||
GROUP BY | ||
metric_time__day | ||
) subq_10028 | ||
ON | ||
subq_10023.metric_time__day = subq_10028.metric_time__day | ||
GROUP BY | ||
COALESCE(subq_10023.metric_time__day, subq_10028.metric_time__day) |
Oops, something went wrong.