Skip to content

Commit

Permalink
Update snapshots for other SQL engines
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneyholcomb committed Dec 20, 2024
1 parent 94e03dd commit 76b1c03
Show file tree
Hide file tree
Showing 42 changed files with 9,006 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
test_name: test_add_time_expr
test_filename: test_engine_specific_rendering.py
docstring:
Tests rendering of the SqlAddTimeExpr in a query.
sql_engine: BigQuery
---
-- Test Add Time Expression
SELECT
DATE_ADD(CAST('2020-01-01' AS DATETIME), INTERVAL SqlExpressionRenderResult(sql='1', bind_parameter_set=SqlBindParameterSet(param_items=())) quarter) AS add_time
FROM foo.bar a
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
test_name: test_add_time_expr
test_filename: test_engine_specific_rendering.py
docstring:
Tests rendering of the SqlAddTimeExpr in a query.
sql_engine: Databricks
---
-- Test Add Time Expression
SELECT
DATEADD(month, (1 * 3), '2020-01-01') AS add_time
FROM foo.bar a
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
test_name: test_add_time_expr
test_filename: test_engine_specific_rendering.py
docstring:
Tests rendering of the SqlAddTimeExpr in a query.
sql_engine: Postgres
---
-- Test Add Time Expression
SELECT
'2020-01-01' + MAKE_INTERVAL(months => (1 * 3)) AS add_time
FROM foo.bar a
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
test_name: test_add_time_expr
test_filename: test_engine_specific_rendering.py
docstring:
Tests rendering of the SqlAddTimeExpr in a query.
sql_engine: Redshift
---
-- Test Add Time Expression
SELECT
DATEADD(month, (1 * 3), '2020-01-01') AS add_time
FROM foo.bar a
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
test_name: test_add_time_expr
test_filename: test_engine_specific_rendering.py
docstring:
Tests rendering of the SqlAddTimeExpr in a query.
sql_engine: Snowflake
---
-- Test Add Time Expression
SELECT
DATEADD(month, (1 * 3), '2020-01-01') AS add_time
FROM foo.bar a
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
test_name: test_add_time_expr
test_filename: test_engine_specific_rendering.py
docstring:
Tests rendering of the SqlAddTimeExpr in a query.
sql_engine: Trino
---
-- Test Add Time Expression
SELECT
DATE_ADD('month', (1 * 3), '2020-01-01') AS add_time
FROM foo.bar a
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
test_name: test_derived_metric_alias
test_filename: test_query_output.py
---
bookings_alias metric_time__day
---------------- -------------------
132.78 2020-01-02T00:00:00
284.93 2019-12-18T00:00:00
360.5 2019-12-19T00:00:00
136.16 2020-01-01T00:00:00
47.56 2019-12-01T00:00:00
0 2020-01-03T00:00:00
0 2019-12-20T00:00:00
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
test_name: test_metric_alias
test_filename: test_query_output.py
---
bookings_alias metric_time__day
---------------- -------------------
9 2020-01-02T00:00:00
10 2019-12-18T00:00:00
18 2019-12-19T00:00:00
5 2020-01-01T00:00:00
1 2019-12-01T00:00:00
1 2020-01-03T00:00:00
2 2019-12-20T00:00:00
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
test_name: test_derived_metric_alias
test_filename: test_query_output.py
---
bookings_alias metric_time__day
---------------- -------------------
132.78 2020-01-02T00:00:00
360.5 2019-12-19T00:00:00
136.16 2020-01-01T00:00:00
0 2020-01-03T00:00:00
284.93 2019-12-18T00:00:00
0 2019-12-20T00:00:00
47.56 2019-12-01T00:00:00
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
test_name: test_metric_alias
test_filename: test_query_output.py
---
bookings_alias metric_time__day
---------------- -------------------
9 2020-01-02T00:00:00
18 2019-12-19T00:00:00
5 2020-01-01T00:00:00
1 2020-01-03T00:00:00
10 2019-12-18T00:00:00
2 2019-12-20T00:00:00
1 2019-12-01T00:00:00
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
test_name: test_derived_metric_alias
test_filename: test_query_output.py
---
bookings_alias metric_time__day
---------------- -------------------
132.78 2020-01-02T00:00:00
0 2020-01-03T00:00:00
360.5 2019-12-19T00:00:00
0 2019-12-20T00:00:00
284.93 2019-12-18T00:00:00
47.56 2019-12-01T00:00:00
136.16 2020-01-01T00:00:00
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
test_name: test_metric_alias
test_filename: test_query_output.py
---
bookings_alias metric_time__day
---------------- -------------------
9 2020-01-02T00:00:00
1 2020-01-03T00:00:00
18 2019-12-19T00:00:00
2 2019-12-20T00:00:00
10 2019-12-18T00:00:00
1 2019-12-01T00:00:00
5 2020-01-01T00:00:00
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
test_name: test_derived_metric_alias
test_filename: test_query_output.py
---
bookings_alias metric_time__day
---------------- -------------------
0 2019-12-20T00:00:00
136.16 2020-01-01T00:00:00
132.78 2020-01-02T00:00:00
47.56 2019-12-01T00:00:00
284.93 2019-12-18T00:00:00
360.5 2019-12-19T00:00:00
0 2020-01-03T00:00:00
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
test_name: test_metric_alias
test_filename: test_query_output.py
---
bookings_alias metric_time__day
---------------- -------------------
1 2019-12-01T00:00:00
10 2019-12-18T00:00:00
18 2019-12-19T00:00:00
1 2020-01-03T00:00:00
2 2019-12-20T00:00:00
5 2020-01-01T00:00:00
9 2020-01-02T00:00:00
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
test_name: test_derived_metric_alias
test_filename: test_query_output.py
---
BOOKINGS_ALIAS METRIC_TIME__DAY
---------------- -------------------
47.56 2019-12-01T00:00:00
284.93 2019-12-18T00:00:00
360.5 2019-12-19T00:00:00
0 2019-12-20T00:00:00
136.16 2020-01-01T00:00:00
132.78 2020-01-02T00:00:00
0 2020-01-03T00:00:00
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
test_name: test_metric_alias
test_filename: test_query_output.py
---
BOOKINGS_ALIAS METRIC_TIME__DAY
---------------- -------------------
1 2019-12-01T00:00:00
10 2019-12-18T00:00:00
18 2019-12-19T00:00:00
2 2019-12-20T00:00:00
5 2020-01-01T00:00:00
1 2020-01-03T00:00:00
9 2020-01-02T00:00:00
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
test_name: test_derived_metric_alias
test_filename: test_query_output.py
---
bookings_alias metric_time__day
---------------- -------------------
360.5 2019-12-19T00:00:00
0 2019-12-20T00:00:00
136.16 2020-01-01T00:00:00
284.93 2019-12-18T00:00:00
0 2020-01-03T00:00:00
132.78 2020-01-02T00:00:00
47.56 2019-12-01T00:00:00
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
test_name: test_metric_alias
test_filename: test_query_output.py
---
bookings_alias metric_time__day
---------------- -------------------
18 2019-12-19T00:00:00
2 2019-12-20T00:00:00
5 2020-01-01T00:00:00
1 2019-12-01T00:00:00
9 2020-01-02T00:00:00
10 2019-12-18T00:00:00
1 2020-01-03T00:00:00
Loading

0 comments on commit 76b1c03

Please sign in to comment.