Skip to content

Commit

Permalink
Add union where test
Browse files Browse the repository at this point in the history
  • Loading branch information
LewisDavies committed May 12, 2022
1 parent 2c837ce commit 31a0c42
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
10 changes: 10 additions & 0 deletions integration_tests/models/sql/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,16 @@ models:
- dbt_utils.equality:
compare_model: ref('data_union_expected')

- name: test_union_where
columns:
- name: id
tests:
- dbt_utils.expression_is_true:
expression: "= 1"
- name: favorite_number
tests:
- dbt_utils.not_constant

- name: test_get_relations_by_pattern
tests:
- dbt_utils.equality:
Expand Down
5 changes: 5 additions & 0 deletions integration_tests/models/sql/test_union_where.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
select
id,
favorite_number
from
{{ ref('test_union_where_base') }}
4 changes: 4 additions & 0 deletions integration_tests/models/sql/test_union_where_base.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{ dbt_utils.union_relations(
[ref('data_union_table_1'), ref('data_union_table_2')],
where="id = 1"
) }}

0 comments on commit 31a0c42

Please sign in to comment.