Skip to content

Commit d291c23

Browse files
committed
fix another test
1 parent c103963 commit d291c23

File tree

1 file changed

+41
-2
lines changed

1 file changed

+41
-2
lines changed

tests/functional/adapter/test_incremental.py

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
_MODELS__INCREMENTAL_FAIL,
99
_MODELS__INCREMENTAL_IGNORE_TARGET,
1010
_MODELS__INCREMENTAL_SYNC_ALL_COLUMNS,
11-
_MODELS__INCREMENTAL_SYNC_ALL_COLUMNS_TARGET,
1211
_MODELS__INCREMENTAL_SYNC_REMOVE_ONLY,
13-
_MODELS__INCREMENTAL_SYNC_REMOVE_ONLY_TARGET,
1412
)
1513
from dbt.tests.adapter.incremental.test_incremental_on_schema_change import (
1614
BaseIncrementalOnSchemaChange,
@@ -47,6 +45,47 @@
4745
{% endif %}
4846
"""
4947

48+
_MODELS__INCREMENTAL_SYNC_REMOVE_ONLY_TARGET = """
49+
{{
50+
config(materialized='table')
51+
}}
52+
53+
with source_data as (
54+
55+
select * from {{ ref('model_a') }}
56+
57+
)
58+
59+
{% set string_type = dbt.type_string() %}
60+
61+
select id
62+
,cast(field1 as {{string_type}}) as field1
63+
64+
from source_data
65+
"""
66+
67+
_MODELS__INCREMENTAL_SYNC_ALL_COLUMNS_TARGET = """
68+
{{
69+
config(materialized='table')
70+
}}
71+
72+
with source_data as (
73+
74+
select * from {{ ref('model_a') }}
75+
76+
)
77+
78+
{% set string_type = dbt.type_string() %}
79+
80+
select id
81+
,cast(field1 as {{string_type}}) as field1
82+
--,field2
83+
,cast(case when id <= 3 then null else field3 end as {{string_type}}) as field3
84+
,cast(case when id <= 3 then null else field4 end as {{string_type}}) as field4
85+
86+
from source_data
87+
"""
88+
5089

5190
class TestBaseIncrementalUniqueKeySQLServer(BaseIncrementalUniqueKey):
5291
pass

0 commit comments

Comments
 (0)