Skip to content

Commit

Permalink
Update SQL engine snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneyholcomb committed Sep 20, 2024
1 parent f26245c commit 81cbd20
Show file tree
Hide file tree
Showing 12 changed files with 2,418 additions and 0 deletions.

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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
Loading

0 comments on commit 81cbd20

Please sign in to comment.