dbt-adapters 1.13.0__py3-none-any.whl → 1.13.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/include/global_project/macros/materializations/snapshots/helpers.sql +6 -3
- dbt/include/global_project/macros/relations/replace.sql +1 -1
- {dbt_adapters-1.13.0.dist-info → dbt_adapters-1.13.1.dist-info}/METADATA +1 -1
- {dbt_adapters-1.13.0.dist-info → dbt_adapters-1.13.1.dist-info}/RECORD +7 -7
- {dbt_adapters-1.13.0.dist-info → dbt_adapters-1.13.1.dist-info}/WHEEL +0 -0
- {dbt_adapters-1.13.0.dist-info → dbt_adapters-1.13.1.dist-info}/licenses/LICENSE +0 -0
dbt/adapters/__about__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
version = "1.13.
|
|
1
|
+
version = "1.13.1"
|
|
@@ -40,7 +40,9 @@
|
|
|
40
40
|
|
|
41
41
|
{% macro default__snapshot_staging_table(strategy, source_sql, target_relation) -%}
|
|
42
42
|
{% set columns = config.get('snapshot_table_column_names') or get_snapshot_table_column_names() %}
|
|
43
|
-
|
|
43
|
+
{% if strategy.hard_deletes == 'new_record' %}
|
|
44
|
+
{% set new_scd_id = snapshot_hash_arguments([columns.dbt_scd_id, snapshot_get_time()]) %}
|
|
45
|
+
{% endif %}
|
|
44
46
|
with snapshot_query as (
|
|
45
47
|
|
|
46
48
|
{{ source_sql }}
|
|
@@ -169,12 +171,13 @@
|
|
|
169
171
|
{{ snapshot_get_time() }} as {{ columns.dbt_valid_from }},
|
|
170
172
|
{{ snapshot_get_time() }} as {{ columns.dbt_updated_at }},
|
|
171
173
|
snapshotted_data.{{ columns.dbt_valid_to }} as {{ columns.dbt_valid_to }},
|
|
172
|
-
|
|
174
|
+
{{ new_scd_id }} as {{ columns.dbt_scd_id }},
|
|
173
175
|
'True' as {{ columns.dbt_is_deleted }}
|
|
174
176
|
from snapshotted_data
|
|
175
177
|
left join deletes_source_data as source_data
|
|
176
178
|
on {{ unique_key_join_on(strategy.unique_key, "snapshotted_data", "source_data") }}
|
|
177
|
-
|
|
179
|
+
where {{ unique_key_is_null(strategy.unique_key, "source_data") }}
|
|
180
|
+
|
|
178
181
|
)
|
|
179
182
|
{%- endif %}
|
|
180
183
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
{# /* use a create or replace statement if possible */ #}
|
|
10
10
|
|
|
11
|
-
{% set is_replaceable = existing_relation.type ==
|
|
11
|
+
{% set is_replaceable = existing_relation.type == target_relation.type and existing_relation.can_be_replaced %}
|
|
12
12
|
|
|
13
13
|
{% if is_replaceable and existing_relation.is_view %}
|
|
14
14
|
{{ get_replace_view_sql(target_relation, sql) }}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dbt-adapters
|
|
3
|
-
Version: 1.13.
|
|
3
|
+
Version: 1.13.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
|
|
6
6
|
Project-URL: Documentation, https://docs.getdbt.com
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
dbt/__init__.py,sha256=iY4jdvOxcDhkdr5FiyOTZPHadKtMZDQ-qC6Fw6_EHPM,277
|
|
2
|
-
dbt/adapters/__about__.py,sha256=
|
|
2
|
+
dbt/adapters/__about__.py,sha256=ofhIPYFjTzjdL3uc7wpw3-87PyOAQCzpoAiweYqYRzM,19
|
|
3
3
|
dbt/adapters/__init__.py,sha256=3noHsg-64qI0_Pw6OR9F7l1vU2_qrJvinq8POTtuaZM,252
|
|
4
4
|
dbt/adapters/cache.py,sha256=WGy4ewnz-J13LverTACBW2iFhGswrWLgm-wiBrQnMzo,20084
|
|
5
5
|
dbt/adapters/capability.py,sha256=M3FkC9veKnNB7a7uQyl7EHX_AGNXPChbHAkcY4cgXCY,2534
|
|
@@ -94,7 +94,7 @@ dbt/include/global_project/macros/materializations/models/incremental/on_schema_
|
|
|
94
94
|
dbt/include/global_project/macros/materializations/models/incremental/strategies.sql,sha256=ORGWiYfj-b3_VIps9FDlyx-Q4A2hZzX2aYLocW8b6pU,2613
|
|
95
95
|
dbt/include/global_project/macros/materializations/seeds/helpers.sql,sha256=Y15ej-D3gm1ExIOMNT208q43gRk8d985WQBuGSooNL0,3920
|
|
96
96
|
dbt/include/global_project/macros/materializations/seeds/seed.sql,sha256=YSoGzVO3iIUiOKIUM9G7yApGLFH4O9bv_d4KjHo3p4Q,2155
|
|
97
|
-
dbt/include/global_project/macros/materializations/snapshots/helpers.sql,sha256
|
|
97
|
+
dbt/include/global_project/macros/materializations/snapshots/helpers.sql,sha256=-3fPrZylQCT3nYfRq1bb9C__9wnA91i3lXI__bWmpkk,10843
|
|
98
98
|
dbt/include/global_project/macros/materializations/snapshots/snapshot.sql,sha256=clIZtCE7vvOXxzz1t2KlmPZM7AuSGsK7MInspo0N5Qg,4043
|
|
99
99
|
dbt/include/global_project/macros/materializations/snapshots/snapshot_merge.sql,sha256=-uCvd2_E4AfWWEBRyQLiGCpuHgOG-MczlbLIWyGfAzM,1287
|
|
100
100
|
dbt/include/global_project/macros/materializations/snapshots/strategies.sql,sha256=AfIsRiw0YnQym5wUiWR2JpiEEky4_WBTpTtE0HJvpZw,6928
|
|
@@ -110,7 +110,7 @@ dbt/include/global_project/macros/relations/drop.sql,sha256=UL40SxBjHLPpIHywKYHZ
|
|
|
110
110
|
dbt/include/global_project/macros/relations/drop_backup.sql,sha256=PTbx_bN27aqCv9HD9I7Td5rJaRrH23TXDs9aC5ei8Q8,415
|
|
111
111
|
dbt/include/global_project/macros/relations/rename.sql,sha256=0YLUnZtov5FOtr-j7CjI4LNtXWojWGER2q1lVbJMH5c,1183
|
|
112
112
|
dbt/include/global_project/macros/relations/rename_intermediate.sql,sha256=rhcK6jeo5gfQ-1rqFd2lyTT4HtAzu8Ndzbz2FzHMBhs,479
|
|
113
|
-
dbt/include/global_project/macros/relations/replace.sql,sha256=
|
|
113
|
+
dbt/include/global_project/macros/relations/replace.sql,sha256=rzkMGfT0LO1z-0G7nXq_R8bkVF10iEd5Ct4Kuf7GI4o,2295
|
|
114
114
|
dbt/include/global_project/macros/relations/schema.sql,sha256=kOQeEZQwycGGtAoq_KM6EyvEhquFk8jnx81nT31s58M,318
|
|
115
115
|
dbt/include/global_project/macros/relations/column/columns_spec_ddl.sql,sha256=ukW4iLuAXYfsrnlfeY26cFMMFxATcNV8hlp9valOx8U,3676
|
|
116
116
|
dbt/include/global_project/macros/relations/materialized_view/alter.sql,sha256=pZcZa1xfcZZpVVSvvJ3YR0zn6noIKBfkTSbrqKohAcU,1806
|
|
@@ -157,7 +157,7 @@ dbt/include/global_project/macros/utils/right.sql,sha256=EwNG98CAFIwNDmarwopf7Rk
|
|
|
157
157
|
dbt/include/global_project/macros/utils/safe_cast.sql,sha256=1mswwkDACmIi1I99JKb_-vq3kjMe4HhMRV70mW8Bt4Y,298
|
|
158
158
|
dbt/include/global_project/macros/utils/split_part.sql,sha256=fXEIS0oIiYR7-4lYbb0QbZdG-q2TpV63AFd1ky4I5UM,714
|
|
159
159
|
dbt/include/global_project/tests/generic/builtin.sql,sha256=p94xdyPwb2TlxgLBqCfrcRfJ1QNgsjPvBm8f0Q5eqZM,1022
|
|
160
|
-
dbt_adapters-1.13.
|
|
161
|
-
dbt_adapters-1.13.
|
|
162
|
-
dbt_adapters-1.13.
|
|
163
|
-
dbt_adapters-1.13.
|
|
160
|
+
dbt_adapters-1.13.1.dist-info/METADATA,sha256=uRyktzA_PII5ygtT1nGEYLT0PyIA0cV1lFkgJa29WAI,2576
|
|
161
|
+
dbt_adapters-1.13.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
162
|
+
dbt_adapters-1.13.1.dist-info/licenses/LICENSE,sha256=9yjigiJhWcCZvQjdagGKDwrRph58QWc5P2bVSQwXo6s,11344
|
|
163
|
+
dbt_adapters-1.13.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|