dbt-adapters 1.15.3__py3-none-any.whl → 1.16.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dbt-adapters might be problematic. Click here for more details.
- dbt/adapters/__about__.py +1 -1
- dbt/adapters/base/impl.py +1 -2
- dbt/adapters/catalogs/__init__.py +2 -0
- dbt/adapters/catalogs/_constants.py +1 -0
- dbt/adapters/catalogs/_integration.py +4 -1
- dbt/include/global_project/macros/materializations/snapshots/helpers.sql +13 -0
- {dbt_adapters-1.15.3.dist-info → dbt_adapters-1.16.1.dist-info}/METADATA +1 -1
- {dbt_adapters-1.15.3.dist-info → dbt_adapters-1.16.1.dist-info}/RECORD +10 -9
- {dbt_adapters-1.15.3.dist-info → dbt_adapters-1.16.1.dist-info}/WHEEL +0 -0
- {dbt_adapters-1.15.3.dist-info → dbt_adapters-1.16.1.dist-info}/licenses/LICENSE +0 -0
dbt/adapters/__about__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
version = "1.
|
|
1
|
+
version = "1.16.1"
|
dbt/adapters/base/impl.py
CHANGED
|
@@ -107,7 +107,6 @@ from dbt.adapters.protocol import AdapterConfig, MacroContextGeneratorCallable
|
|
|
107
107
|
if TYPE_CHECKING:
|
|
108
108
|
import agate
|
|
109
109
|
|
|
110
|
-
|
|
111
110
|
GET_CATALOG_MACRO_NAME = "get_catalog"
|
|
112
111
|
GET_CATALOG_RELATIONS_MACRO_NAME = "get_catalog_relations"
|
|
113
112
|
FRESHNESS_MACRO_NAME = "collect_freshness"
|
|
@@ -872,7 +871,7 @@ class BaseAdapter(metaclass=AdapterMeta):
|
|
|
872
871
|
# aren't always present.
|
|
873
872
|
for column in ("dbt_scd_id", "dbt_valid_from", "dbt_valid_to"):
|
|
874
873
|
desired = column_names[column] if column_names else column
|
|
875
|
-
if desired not in names:
|
|
874
|
+
if desired and desired.lower() not in names:
|
|
876
875
|
missing.append(desired)
|
|
877
876
|
|
|
878
877
|
if missing:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
CATALOG_INTEGRATION_MODEL_CONFIG_NAME = "catalog_name"
|
|
@@ -40,6 +40,7 @@ class CatalogIntegrationConfig(Protocol):
|
|
|
40
40
|
catalog_name: Optional[str]
|
|
41
41
|
table_format: Optional[str]
|
|
42
42
|
external_volume: Optional[str]
|
|
43
|
+
file_format: Optional[str]
|
|
43
44
|
adapter_properties: Dict[str, Any]
|
|
44
45
|
|
|
45
46
|
|
|
@@ -47,6 +48,7 @@ class CatalogRelation(Protocol):
|
|
|
47
48
|
catalog_name: Optional[str]
|
|
48
49
|
table_format: Optional[str]
|
|
49
50
|
external_volume: Optional[str]
|
|
51
|
+
file_format: Optional[str]
|
|
50
52
|
|
|
51
53
|
|
|
52
54
|
class CatalogIntegration(abc.ABC):
|
|
@@ -78,16 +80,17 @@ class CatalogIntegration(abc.ABC):
|
|
|
78
80
|
|
|
79
81
|
catalog_type: str
|
|
80
82
|
table_format: Optional[str] = None
|
|
83
|
+
file_format: Optional[str] = None
|
|
81
84
|
allows_writes: bool = False
|
|
82
85
|
|
|
83
86
|
def __init__(self, config: CatalogIntegrationConfig) -> None:
|
|
84
87
|
# table_format is often fixed for a catalog type, allow it to be defined at the class level
|
|
85
88
|
if config.table_format is not None:
|
|
86
89
|
self.table_format = config.table_format
|
|
87
|
-
|
|
88
90
|
self.name: str = config.name
|
|
89
91
|
self.catalog_name: Optional[str] = config.catalog_name
|
|
90
92
|
self.external_volume: Optional[str] = config.external_volume
|
|
93
|
+
self.file_format: Optional[str] = config.file_format
|
|
91
94
|
|
|
92
95
|
def build_relation(self, config: RelationConfig) -> CatalogRelation:
|
|
93
96
|
"""
|
|
@@ -153,6 +153,14 @@
|
|
|
153
153
|
left join deletes_source_data as source_data
|
|
154
154
|
on {{ unique_key_join_on(strategy.unique_key, "snapshotted_data", "source_data") }}
|
|
155
155
|
where {{ unique_key_is_null(strategy.unique_key, "source_data") }}
|
|
156
|
+
|
|
157
|
+
{%- if strategy.hard_deletes == 'new_record' %}
|
|
158
|
+
and not (
|
|
159
|
+
--avoid updating the record's valid_to if the latest entry is marked as deleted
|
|
160
|
+
snapshotted_data.{{ columns.dbt_is_deleted }} = 'True'
|
|
161
|
+
and snapshotted_data.{{ columns.dbt_valid_to }} is null
|
|
162
|
+
)
|
|
163
|
+
{%- endif %}
|
|
156
164
|
)
|
|
157
165
|
{%- endif %}
|
|
158
166
|
|
|
@@ -182,6 +190,11 @@
|
|
|
182
190
|
left join deletes_source_data as source_data
|
|
183
191
|
on {{ unique_key_join_on(strategy.unique_key, "snapshotted_data", "source_data") }}
|
|
184
192
|
where {{ unique_key_is_null(strategy.unique_key, "source_data") }}
|
|
193
|
+
and not (
|
|
194
|
+
--avoid inserting a new record if the latest one is marked as deleted
|
|
195
|
+
snapshotted_data.{{ columns.dbt_is_deleted }} = 'True'
|
|
196
|
+
and snapshotted_data.{{ columns.dbt_valid_to }} is null
|
|
197
|
+
)
|
|
185
198
|
|
|
186
199
|
)
|
|
187
200
|
{%- endif %}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dbt-adapters
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.16.1
|
|
4
4
|
Summary: The set of adapter protocols and base functionality that supports integration with dbt-core
|
|
5
5
|
Project-URL: Homepage, https://github.com/dbt-labs/dbt-adapters/tree/main/dbt-adapters
|
|
6
6
|
Project-URL: Documentation, https://docs.getdbt.com
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
dbt/adapters/__about__.py,sha256=
|
|
1
|
+
dbt/adapters/__about__.py,sha256=Hh-IeRo2Db381unyQS1QCxvvOONgXpXkpu3GJTYa8b8,19
|
|
2
2
|
dbt/adapters/__init__.py,sha256=3noHsg-64qI0_Pw6OR9F7l1vU2_qrJvinq8POTtuaZM,252
|
|
3
3
|
dbt/adapters/cache.py,sha256=WGy4ewnz-J13LverTACBW2iFhGswrWLgm-wiBrQnMzo,20084
|
|
4
4
|
dbt/adapters/capability.py,sha256=M3FkC9veKnNB7a7uQyl7EHX_AGNXPChbHAkcY4cgXCY,2534
|
|
@@ -11,15 +11,16 @@ dbt/adapters/base/README.md,sha256=muHQntC07Lh6L1XfVgwKhV5RltOPBLYPdQqd8_7l34c,5
|
|
|
11
11
|
dbt/adapters/base/__init__.py,sha256=Nc8lQVkOzAqdcxk4cw4E_raxN9CAWMwhQx4STdiicxg,456
|
|
12
12
|
dbt/adapters/base/column.py,sha256=Uj20UixoxCn2rlv4QDNONyys6CDkDFyG3anCXKf0T2c,5350
|
|
13
13
|
dbt/adapters/base/connections.py,sha256=-C5dOwGgMKH8n_v6wjwOxV7chBdS0GjOGwNQCUbhhWc,16951
|
|
14
|
-
dbt/adapters/base/impl.py,sha256=
|
|
14
|
+
dbt/adapters/base/impl.py,sha256=0RqSVYNFVldfxjJVCBhULdgrtdUgX2daVo9fQCDcIT8,78486
|
|
15
15
|
dbt/adapters/base/meta.py,sha256=c5j0qeGec1cAi-IlVV_JkhMk01p5XqbtGj02uxGP1S4,5686
|
|
16
16
|
dbt/adapters/base/plugin.py,sha256=rm0GjNHnWM2mn0GJOjciZLwn-02xlzWCoMT9u-epwP0,1076
|
|
17
17
|
dbt/adapters/base/query_headers.py,sha256=rHgux9b_vPp_xRsg8QU3NE202Hho4i4zO9u9Gx_BCF4,3651
|
|
18
18
|
dbt/adapters/base/relation.py,sha256=eePneHZQ-bb0ZFaEpC_1xzsxJF38e6k7b3FUxD8PK0I,19383
|
|
19
|
-
dbt/adapters/catalogs/__init__.py,sha256=
|
|
19
|
+
dbt/adapters/catalogs/__init__.py,sha256=9Lsz26jcljxwJLBgfHHQMqOyoKNahrqxSst0YN9WAy8,456
|
|
20
20
|
dbt/adapters/catalogs/_client.py,sha256=bIXZxEL1-4kSXHFPnMw3egIOx1fKZmjxKiO1Wv-KuHg,2258
|
|
21
|
+
dbt/adapters/catalogs/_constants.py,sha256=8O5wLK4oVqirpC9ap7PIXodq8XtkQhHJ5W0OU1xtwjk,55
|
|
21
22
|
dbt/adapters/catalogs/_exceptions.py,sha256=5zkSmjUG5y_Dzv0AAUptsJpNDHnmb8D0mUb_HIQCj_I,1133
|
|
22
|
-
dbt/adapters/catalogs/_integration.py,sha256=
|
|
23
|
+
dbt/adapters/catalogs/_integration.py,sha256=0acuF_Awoe-GJrCdNwBQldtgRmBtpqYpZkTPRVJFhys,6594
|
|
23
24
|
dbt/adapters/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
24
25
|
dbt/adapters/clients/jinja.py,sha256=NsZOiBpOLunS46hRL5OcX1MpY3Ih6_87Vgz4qd_PNbc,768
|
|
25
26
|
dbt/adapters/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -98,7 +99,7 @@ dbt/include/global_project/macros/materializations/models/incremental/on_schema_
|
|
|
98
99
|
dbt/include/global_project/macros/materializations/models/incremental/strategies.sql,sha256=ORGWiYfj-b3_VIps9FDlyx-Q4A2hZzX2aYLocW8b6pU,2613
|
|
99
100
|
dbt/include/global_project/macros/materializations/seeds/helpers.sql,sha256=Y15ej-D3gm1ExIOMNT208q43gRk8d985WQBuGSooNL0,3920
|
|
100
101
|
dbt/include/global_project/macros/materializations/seeds/seed.sql,sha256=YSoGzVO3iIUiOKIUM9G7yApGLFH4O9bv_d4KjHo3p4Q,2155
|
|
101
|
-
dbt/include/global_project/macros/materializations/snapshots/helpers.sql,sha256=
|
|
102
|
+
dbt/include/global_project/macros/materializations/snapshots/helpers.sql,sha256=HhDv-rNYE8De4cJU3PdjKx5t49otXcgepSfCdVmiD3Q,11988
|
|
102
103
|
dbt/include/global_project/macros/materializations/snapshots/snapshot.sql,sha256=clIZtCE7vvOXxzz1t2KlmPZM7AuSGsK7MInspo0N5Qg,4043
|
|
103
104
|
dbt/include/global_project/macros/materializations/snapshots/snapshot_merge.sql,sha256=WaGQCuv4o_qxBw7b2KQvUnSg0UkPklwAQHK1-QngN_M,1369
|
|
104
105
|
dbt/include/global_project/macros/materializations/snapshots/strategies.sql,sha256=AfIsRiw0YnQym5wUiWR2JpiEEky4_WBTpTtE0HJvpZw,6928
|
|
@@ -162,7 +163,7 @@ dbt/include/global_project/macros/utils/right.sql,sha256=EwNG98CAFIwNDmarwopf7Rk
|
|
|
162
163
|
dbt/include/global_project/macros/utils/safe_cast.sql,sha256=1mswwkDACmIi1I99JKb_-vq3kjMe4HhMRV70mW8Bt4Y,298
|
|
163
164
|
dbt/include/global_project/macros/utils/split_part.sql,sha256=fXEIS0oIiYR7-4lYbb0QbZdG-q2TpV63AFd1ky4I5UM,714
|
|
164
165
|
dbt/include/global_project/tests/generic/builtin.sql,sha256=p94xdyPwb2TlxgLBqCfrcRfJ1QNgsjPvBm8f0Q5eqZM,1022
|
|
165
|
-
dbt_adapters-1.
|
|
166
|
-
dbt_adapters-1.
|
|
167
|
-
dbt_adapters-1.
|
|
168
|
-
dbt_adapters-1.
|
|
166
|
+
dbt_adapters-1.16.1.dist-info/METADATA,sha256=j7EW34DwGfvNnf5YoaP-69G6BmxbfWFzsTxubFWuZ0U,4534
|
|
167
|
+
dbt_adapters-1.16.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
168
|
+
dbt_adapters-1.16.1.dist-info/licenses/LICENSE,sha256=9yjigiJhWcCZvQjdagGKDwrRph58QWc5P2bVSQwXo6s,11344
|
|
169
|
+
dbt_adapters-1.16.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|