Skip to content

Commit

Permalink
Fix bigquery tests
Browse files Browse the repository at this point in the history
  • Loading branch information
psousa50 committed Apr 19, 2024
1 parent 8bad96a commit 1c0acee
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
select 10 as lower,
20 as UPPER,
30 as MiXeD,
40 as `lower quoted`,
50 as `UPPER QUOTED`,
60 as `MiXeD Quoted`
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
select
lower,
UPPER,
MiXeD,
`lower quoted`,
`UPPER QUOTED`,
`MiXeD Quoted`
from {{ dbt_unit_testing.ref('model_with_quoted_columns_1_bq') }}
where
(lower = 10 or lower is null)
and (UPPER = 20 or UPPER is null)
and (MiXeD = 30 or MiXeD is null)
and (`lower quoted` = 40 or `lower quoted` is null)
and (`UPPER QUOTED` = 50 or `UPPER QUOTED` is null)
and (`MiXeD Quoted` = 60 or `MiXeD Quoted` is null)


Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{
config(
tags=['unit-test', 'bigquery']
)
}}

{% call dbt_unit_testing.test('model_with_quoted_columns_2_bq') %}
{% call dbt_unit_testing.mock_ref ('model_with_quoted_columns_1_bq', options={"include_missing_columns": true}) %}
select 10 as lower
{% endcall %}
{% call dbt_unit_testing.expect() %}
select 10 as lower
{% endcall %}
{% endcall %}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{
config(
tags=['unit-test', 'bigquery', 'snowflake', 'postgres']
tags=['unit-test', 'snowflake', 'postgres']
)
}}

Expand Down
4 changes: 4 additions & 0 deletions package-lock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
packages:
- package: dbt-labs/dbt_utils
version: 1.1.1
sha1_hash: 6c40b29313579fa0ad53f0b3f6b4f4779ea77de2

0 comments on commit 1c0acee

Please sign in to comment.