Skip to content

Commit

Permalink
Update snapshots for other engines
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneyholcomb committed Jan 26, 2025
1 parent 1573ae4 commit f99dad0
Show file tree
Hide file tree
Showing 876 changed files with 134,985 additions and 134,913 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ SELECT
FROM (
-- Combine Aggregated Outputs
SELECT
COALESCE(subq_21.metric_time__day, subq_31.metric_time__day) AS metric_time__day
, MAX(subq_21.visits) AS visits
, MAX(subq_31.buys) AS buys
COALESCE(subq_20.metric_time__day, subq_30.metric_time__day) AS metric_time__day
, MAX(subq_20.visits) AS visits
, MAX(subq_30.buys) AS buys
FROM (
-- Constrain Output with WHERE
-- Pass Only Elements: ['visits', 'metric_time__day']
Expand All @@ -35,13 +35,14 @@ FROM (
-- Read From CTE For node_id=sma_28019
SELECT
metric_time__day
, sma_28019_cte.user
, visits
FROM sma_28019_cte sma_28019_cte
) subq_18
) subq_17
WHERE metric_time__day = '2020-01-01'
GROUP BY
metric_time__day
) subq_21
) subq_20
FULL OUTER JOIN (
-- Find conversions for user within the range of INF
-- Pass Only Elements: ['buys', 'metric_time__day']
Expand All @@ -52,38 +53,38 @@ FROM (
FROM (
-- Dedupe the fanout with mf_internal_uuid in the conversion data set
SELECT DISTINCT
FIRST_VALUE(subq_24.visits) OVER (
FIRST_VALUE(subq_23.visits) OVER (
PARTITION BY
subq_27.user
, subq_27.metric_time__day
, subq_27.mf_internal_uuid
ORDER BY subq_24.metric_time__day DESC
subq_26.user
, subq_26.metric_time__day
, subq_26.mf_internal_uuid
ORDER BY subq_23.metric_time__day DESC
ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
) AS visits
, FIRST_VALUE(subq_24.metric_time__day) OVER (
, FIRST_VALUE(subq_23.metric_time__day) OVER (
PARTITION BY
subq_27.user
, subq_27.metric_time__day
, subq_27.mf_internal_uuid
ORDER BY subq_24.metric_time__day DESC
subq_26.user
, subq_26.metric_time__day
, subq_26.mf_internal_uuid
ORDER BY subq_23.metric_time__day DESC
ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
) AS metric_time__day
, FIRST_VALUE(subq_24.user) OVER (
, FIRST_VALUE(subq_23.user) OVER (
PARTITION BY
subq_27.user
, subq_27.metric_time__day
, subq_27.mf_internal_uuid
ORDER BY subq_24.metric_time__day DESC
subq_26.user
, subq_26.metric_time__day
, subq_26.mf_internal_uuid
ORDER BY subq_23.metric_time__day DESC
ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
) AS user
, subq_27.mf_internal_uuid AS mf_internal_uuid
, subq_27.buys AS buys
, subq_26.mf_internal_uuid AS mf_internal_uuid
, subq_26.buys AS buys
FROM (
-- Constrain Output with WHERE
-- Pass Only Elements: ['visits', 'metric_time__day', 'user']
SELECT
metric_time__day
, subq_22.user
, subq_21.user
, visits
FROM (
-- Read From CTE For node_id=sma_28019
Expand All @@ -92,9 +93,9 @@ FROM (
, sma_28019_cte.user
, visits
FROM sma_28019_cte sma_28019_cte
) subq_22
) subq_21
WHERE metric_time__day = '2020-01-01'
) subq_24
) subq_23
INNER JOIN (
-- Read Elements From Semantic Model 'buys_source'
-- Metric Time Dimension 'ds'
Expand All @@ -105,19 +106,19 @@ FROM (
, 1 AS buys
, GENERATE_UUID() AS mf_internal_uuid
FROM ***************************.fct_buys buys_source_src_28000
) subq_27
) subq_26
ON
(
subq_24.user = subq_27.user
subq_23.user = subq_26.user
) AND (
(subq_24.metric_time__day <= subq_27.metric_time__day)
(subq_23.metric_time__day <= subq_26.metric_time__day)
)
) subq_28
) subq_27
GROUP BY
metric_time__day
) subq_31
) subq_30
ON
subq_21.metric_time__day = subq_31.metric_time__day
subq_20.metric_time__day = subq_30.metric_time__day
GROUP BY
metric_time__day
) subq_32
) subq_31
Loading

0 comments on commit f99dad0

Please sign in to comment.