Skip to content

Commit 240ef49

Browse files
authored
Add random suffix to incremental new data table (#152)
* Add random suffix to incremental new data table * Update test matrix * Fix typo * Fix test release years
1 parent cb9a314 commit 240ef49

File tree

5 files changed

+15
-6
lines changed

5 files changed

+15
-6
lines changed

Diff for: .github/workflows/test_matrix.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ jobs:
2828
- '3.10'
2929
- '3.11'
3030
clickhouse-version:
31-
- '22.3'
3231
- '22.8'
33-
- '22.11'
34-
- '22.12'
32+
- '23.2'
33+
- '23.3'
34+
- '23.4'
3535
- latest
3636

3737
steps:

Diff for: CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
### Release [1.4.1], 2023-05-11
2+
#### Improvements
3+
- Reduce the number of SQL calls for Modify Comment operations. Thanks to [Konstantin Ilchenko](https://github.com/simpl1g).
4+
- Add "on cluster" to several additional macros to better support distributed tables. Thanks to [Saurabh Bikram](https://github.com/saurabhbikram)
5+
- Add the unique invocation id to temporary "new data" used in `delete+insert` incremental materializations to allow parallel transformations on the same
6+
table. In general parallel transformations are risky, so this approach should only be used when transformations are explicitly limited
7+
to non-overlapping data ranges. Closes https://github.com/ClickHouse/dbt-clickhouse/issues/150
8+
19
### Release [1.4.0], 2023-02-06
210
#### Improvements
311
- Support dbt [1.4.1] https://github.com/ClickHouse/dbt-clickhouse/issues/135

Diff for: dbt/include/clickhouse/macros/materializations/incremental.sql

+2-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@
178178

179179

180180
{% macro clickhouse__incremental_delete_insert(existing_relation, unique_key, incremental_predicates) %}
181-
{% set new_data_relation = existing_relation.incorporate(path={"identifier": model['name'] + '__dbt_new_data'}) %}
181+
{% set new_data_relation = existing_relation.incorporate(path={"identifier": model['name']
182+
+ '__dbt_new_data_' + invocation_id.replace('-', '_')}) %}
182183
{{ drop_relation_if_exists(new_data_relation) }}
183184
{% call statement('main') %}
184185
{{ get_create_table_as_sql(False, new_data_relation, sql) }}

Diff for: dev_requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dbt-core~=1.4.1
2-
clickhouse-connect>=0.5.5
2+
clickhouse-connect>=0.5.24
33
clickhouse-driver>=0.2.3
44
pytest>=7.2.0
55
pytest-dotenv==0.5.2

Diff for: setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def _dbt_clickhouse_version():
5555
},
5656
install_requires=[
5757
f'dbt-core~={dbt_version}',
58-
'clickhouse-connect>=0.5.5',
58+
'clickhouse-connect>=0.5.24',
5959
'clickhouse-driver>=0.2.3',
6060
],
6161
python_requires=">=3.7",

0 commit comments

Comments
 (0)