|
8 | 8 | _MODELS__INCREMENTAL_FAIL,
|
9 | 9 | _MODELS__INCREMENTAL_IGNORE_TARGET,
|
10 | 10 | _MODELS__INCREMENTAL_SYNC_ALL_COLUMNS,
|
11 |
| - _MODELS__INCREMENTAL_SYNC_ALL_COLUMNS_TARGET, |
12 | 11 | _MODELS__INCREMENTAL_SYNC_REMOVE_ONLY,
|
13 |
| - _MODELS__INCREMENTAL_SYNC_REMOVE_ONLY_TARGET, |
14 | 12 | )
|
15 | 13 | from dbt.tests.adapter.incremental.test_incremental_on_schema_change import (
|
16 | 14 | BaseIncrementalOnSchemaChange,
|
|
47 | 45 | {% endif %}
|
48 | 46 | """
|
49 | 47 |
|
| 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 | + |
50 | 89 |
|
51 | 90 | class TestBaseIncrementalUniqueKeySQLServer(BaseIncrementalUniqueKey):
|
52 | 91 | pass
|
|
0 commit comments