-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update SQL engine snapshots with ordering for FilterElements include …
…specs
- Loading branch information
1 parent
e213ded
commit 88dbe8b
Showing
1,036 changed files
with
3,053 additions
and
2,902 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query__cli_output.txt
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
36 changes: 36 additions & 0 deletions
36
...pshots/test_cli.py/str/Databricks/test_saved_query_with_cumulative_metric__cli_output.txt
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,3 +1,39 @@ | ||
sql?? -- Join Self Over Time Range | ||
-- Pass Only Elements: ['metric_time__day', 'txn_revenue'] | ||
-- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-01T00:00:00] | ||
-- Aggregate Measures | ||
-- Compute Metrics via Expressions | ||
-- Order By ['metric_time__day'] | ||
SELECT | ||
subq_3.metric_time__day AS metric_time__day | ||
, SUM(subq_2.txn_revenue) AS trailing_2_months_revenue | ||
FROM ( | ||
-- Time Spine | ||
SELECT | ||
ds AS metric_time__day | ||
FROM mf_test_src_7e6d94949943215.mf_time_spine subq_4 | ||
WHERE ds BETWEEN '2020-01-01' AND '2020-01-01' | ||
) subq_3 | ||
INNER JOIN ( | ||
-- Read Elements From Semantic Model 'revenue' | ||
-- Metric Time Dimension 'ds' | ||
-- Constrain Time Range to [2019-11-01T00:00:00, 2020-01-01T00:00:00] | ||
SELECT | ||
DATE_TRUNC('day', created_at) AS metric_time__day | ||
, revenue AS txn_revenue | ||
FROM mf_test_src_7e6d94949943215.fct_revenue revenue_src_10000 | ||
WHERE DATE_TRUNC('day', created_at) BETWEEN '2019-11-01' AND '2020-01-01' | ||
) subq_2 | ||
ON | ||
( | ||
subq_2.metric_time__day <= subq_3.metric_time__day | ||
) AND ( | ||
subq_2.metric_time__day > DATEADD(month, -2, subq_3.metric_time__day) | ||
) | ||
WHERE subq_3.metric_time__day BETWEEN '2020-01-01' AND '2020-01-01' | ||
GROUP BY | ||
subq_3.metric_time__day | ||
ORDER BY metric_time__day | ||
metric_time__day trailing_2_months_revenue | ||
------------------- --------------------------- | ||
2020-01-01T00:00:00 1000 |
39 changes: 39 additions & 0 deletions
39
...tricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_limit__cli_output.txt
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
38 changes: 38 additions & 0 deletions
38
...tricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_where__cli_output.txt
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.