Skip to content

Commit 009c6e8

Browse files
authored
Merge pull request #20 from DeepLcom/chore/merge-main-to-dap-main
Chore/merge main to dap main
2 parents 714702a + 9224fb3 commit 009c6e8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+2071
-486
lines changed

.github/workflows/test_matrix.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: "test_matrix"
33

4-
on: # yamllint disable-line rule:truthy
4+
on: # yamllint disable-line rule:truthy
55
pull_request:
66
branches: main
77
push:
@@ -12,6 +12,7 @@ on: # yamllint disable-line rule:truthy
1212
paths-ignore:
1313
- '**.md'
1414
- 'LICENSE'
15+
workflow_dispatch:
1516

1617
jobs:
1718
tests:
@@ -23,17 +24,30 @@ jobs:
2324
strategy:
2425
matrix:
2526
python-version:
26-
- '3.10'
27-
- '3.11'
2827
- '3.12'
2928
- '3.13'
3029
clickhouse-version:
31-
- '25.1'
30+
- '25.3'
31+
- latest
3232

3333
steps:
3434
- name: Checkout
3535
uses: actions/checkout@v4
3636

37+
- name: Set environment variables
38+
if: ${{ matrix.clickhouse-version == '22.3' }}
39+
run: |
40+
echo "TEST_SETTINGS_FILE=22_3" >> $GITHUB_ENV
41+
echo "DBT_CH_TEST_CH_VERSION=22.3" >> $GITHUB_ENV
42+
43+
# a fix until docker compose v2.36.0 will be the default version in the github runner
44+
- name: Install Docker Compose v2.36.0
45+
run: |
46+
sudo mkdir -p /usr/local/lib/docker/cli-plugins
47+
sudo curl -L "https://github.com/docker/compose/releases/download/v2.36.0/docker-compose-linux-x86_64" -o /usr/local/lib/docker/cli-plugins/docker-compose
48+
sudo chmod +x /usr/local/lib/docker/cli-plugins/docker-compose
49+
docker compose version
50+
3751
- name: Run ClickHouse Cluster Containers
3852
env:
3953
PROJECT_ROOT: ${{ github.workspace }}/tests/integration

CHANGELOG.md

Lines changed: 138 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,140 @@
1+
### Release [1.9.2], 2025-06-03
2+
3+
#### Bugs
4+
* Limit dbt-core version to <1.10.X to avoid compatibility issues ([#453](https://github.com/ClickHouse/dbt-clickhouse/pull/453))
5+
* README file was broken and fixed in ([#454](https://github.com/ClickHouse/dbt-clickhouse/pull/454))
6+
* Snapshots were not worked properly on cluster, fixed in ([#455](https://github.com/ClickHouse/dbt-clickhouse/pull/455))
7+
* when the last line of a model's SQL query is a comment (-- some comment) and the table's contract is enforced, the last parenthesis of the wrapping subquery ends up commented as well. Was fixed in ([#457](https://github.com/ClickHouse/dbt-clickhouse/pull/457))
8+
* Check for Shared database engine in can_exchange ([#460](https://github.com/ClickHouse/dbt-clickhouse/pull/460))
9+
* Tests were broken because of docker compose version `2.35` and fixed in ([#468](https://github.com/ClickHouse/dbt-clickhouse/pull/468))
10+
11+
### Release [1.9.1], 2025-04-28
12+
13+
#### Bugs
14+
* Fix missing database_engine error ([#450](https://github.com/ClickHouse/dbt-clickhouse/pull/450))
15+
16+
17+
### Release [1.9.0], 2025-04-28
18+
19+
#### New Features
20+
* Added ability to set [SQL Security](https://clickhouse.com/docs/en/sql-reference/statements/create/view#sql_security) for normal views ([#379](https://github.com/ClickHouse/dbt-clickhouse/pull/379)).
21+
* Add support for "microbatch" incremental strategy ([#404](https://github.com/ClickHouse/dbt-clickhouse/pull/404))
22+
* Added support for [TTL (time-to-live)](https://clickhouse.com/docs/guides/developer/ttl) as a column configuration for `table` and `ephemeral` materializations. This feature is implemented as a [custom constraint](https://docs.getdbt.com/reference/resource-properties/constraints#custom-constraints), which requires model contracts to be enforced ([#442](https://github.com/ClickHouse/dbt-clickhouse/pull/442))
23+
For example:
24+
25+
```sql
26+
-- test_ttl.sql
27+
{{ config(order_by='(ts)', engine='MergeTree()', materialized='table') }}
28+
29+
SELECT now() AS ts,
30+
'Some value that should expire!' AS col_ttl
31+
```
32+
33+
```yaml
34+
models:
35+
- name: test_ttl
36+
description: 'Testing column-level TTL'
37+
config:
38+
contract:
39+
enforced: true
40+
columns:
41+
- name: ts
42+
data_type: timestamp
43+
- name: col_ttl
44+
data_type: String
45+
ttl: ts + INTERVAL 1 DAY
46+
```
47+
48+
### Improvements
49+
* Upgrade `dbt-core` to version `1.9` and `dbt-adapters` to `>=1.10` ([#403](https://github.com/ClickHouse/dbt-clickhouse/pull/403)).
50+
* Escape column names in comments ([#428](https://github.com/ClickHouse/dbt-clickhouse/pull/428)).
51+
* TTl is now available for distributed tables ([#430](https://github.com/ClickHouse/dbt-clickhouse/pull/430)).
52+
* Previously, delete_insert would fall back to legacy silently. Now it raises an error if LWD is not enabled ([#447](https://github.com/ClickHouse/dbt-clickhouse/pull/447)).
53+
* Refactored the logic for applying the `ON CLUSTER` clause during model creation ([#447](https://github.com/ClickHouse/dbt-clickhouse/pull/447)).
54+
- Previously, `ON CLUSTER` was inconsistently applied based on engine type and materialization, often leading to confusion and unexpected results.
55+
- Now, if a `cluster` is defined in the profile and the engine is **not** `Replicated`, the `ON CLUSTER` clause will **always** be added by default.
56+
- A new model-level config `disable_on_cluster: true` has been introduced to explicitly opt out of this behavior.
57+
- ⚠️ **Breaking Change**: This modifies the previous behavior. Users relying on the old implicit logic should review and update their models accordingly.
58+
59+
60+
### Release [1.8.9], 2025-02-16
61+
62+
#### Improvements
63+
* It is now possible to configure a TLS client certificate using `client_cert` and `client_cert_key` profile parameters. ([#413](https://github.com/ClickHouse/dbt-clickhouse/pull/413))
64+
* Added Support of insert_overwrite in cluster setup with incremental and distributed_incremental materializations ([#394](https://github.com/ClickHouse/dbt-clickhouse/pull/394))
65+
* Improve index and projections creation process ([#421](https://github.com/ClickHouse/dbt-clickhouse/pull/421))
66+
67+
#### Bugs
68+
* Reverted breaking changes in MV materialization ([#416](https://github.com/ClickHouse/dbt-clickhouse/pull/416))
69+
* A fix was introduced for distributed tables, where an incremental local table could have been dropped if the distributed table was missing. ([#363](https://github.com/ClickHouse/dbt-clickhouse/pull/363))
70+
71+
72+
### Release [1.8.8], 2025-02-05
73+
### Improvements
74+
* Materialized view now attempts to use `ALTER TABLE...MODIFY QUERY` to update existing materialized views. This is an atomic operation so data is not lost. ([#390](https://github.com/ClickHouse/dbt-clickhouse/pull/390))
75+
* Make view materialization updates atomic. ([#412](https://github.com/ClickHouse/dbt-clickhouse/pull/412))
76+
* Create a black list settings to ignore based on the configured Engine. ([#367](https://github.com/ClickHouse/dbt-clickhouse/pull/367))
77+
78+
#### New Features
79+
* [ClickHouse indexes](https://clickhouse.com/docs/en/optimize/sparse-primary-indexes) are now fully supported for `table` materialization.
80+
81+
82+
#### New Features
83+
* [ClickHouse indexes](https://clickhouse.com/docs/en/optimize/sparse-primary-indexes) are now fully supported for `table` materialization.
84+
The index config should be added to the model config. for instance:
85+
```python
86+
{{ config(
87+
materialized='%s',
88+
indexes=[{
89+
'name': 'your_index_name',
90+
'definition': 'your_column TYPE minmax GRANULARITY 2'
91+
}]
92+
) }}
93+
```
94+
95+
### Bug Fixes
96+
* Materializations are now compatible with `Replicated` database engine, as they will no longer use `ON CLUSTER` statements.
97+
98+
### Release [1.8.7], 2025-01-05
99+
100+
### New Features
101+
* Added support for [refreshable materialized view](https://clickhouse.com/docs/en/materialized-view/refreshable-materialized-view) ([#401](https://github.com/ClickHouse/dbt-clickhouse/pull/401))
102+
103+
### Improvement
104+
* Avoid potential data loss by using `CREATE OR REPLACE DICTIONARY` to atomically update a dictionary ([#393](https://github.com/ClickHouse/dbt-clickhouse/pull/393))
105+
* Removed support in python 3.8 as it is no longer supported by dbt ([#402](https://github.com/ClickHouse/dbt-clickhouse/pull/402)
106+
107+
### Bug Fixes
108+
* Fix a minor bug related to validating existence of an old hanging mv ([#396]())
109+
110+
### Release [1.8.6], 2024-12-05
111+
112+
### Improvement
113+
* Today, on mv model creation, the target table is being populated with the historical data based on the query provided in the mv creation. This catchup mechanism is now behind a config flag and enabled by default (as is today). ([#399](https://github.com/ClickHouse/dbt-clickhouse/pull/399))
114+
115+
116+
### Release [1.8.5], 2024-11-19
117+
118+
### New Features
119+
* Added support for the creation of more than one materialized view inserting records into the same target table. ([#360](https://github.com/ClickHouse/dbt-clickhouse/pull/364))
120+
121+
### Improvement
122+
* Added support for [range_hashed](https://clickhouse.com/docs/en/sql-reference/dictionaries#range_hashed) and [complex_key_range_hashed](https://clickhouse.com/docs/en/sql-reference/dictionaries#complex_key_range_hashed) layouts to the dictionary materialization. ([#361](https://github.com/ClickHouse/dbt-clickhouse/pull/361))
123+
* Truncated stack trace for database errors for cleaner output when HIDE_STACK_TRACE variable is set to any value. ([#382](https://github.com/ClickHouse/dbt-clickhouse/pull/382))
124+
* It is now possible to pass query settings not only on table creation but also on query. ([#362](https://github.com/ClickHouse/dbt-clickhouse/pull/362))
125+
126+
127+
### Bug Fixes
128+
* Before this version, `split_part` macro used to add an extra quotation. that was fixed in ([#338](https://github.com/ClickHouse/dbt-clickhouse/pull/338))
129+
130+
### Bug Fixes
131+
* Existing local tables are no longer dropped/recreated in case of missing distributed tables in `distributed_incremental` materialization mode. ([#363](https://github.com/ClickHouse/dbt-clickhouse/pull/363))
132+
133+
### Release [1.8.4], 2024-09-17
134+
### Improvement
135+
* The S3 help macro now support a `role_arn` parameter as an alternative way to provide authentication for S3 based models. Thanks to
136+
[Mitchell Bregman](https://github.com/mitchbregs) for the contribution!
137+
1138
### Release [1.8.3], 2024-09-01
2139
### Bug Fixes
3140
* An [issue](https://github.com/ClickHouse/dbt-clickhouse/issues/348) was detected when using multiple projections. We solved it and added a test to cover that use case. ([#349](https://github.com/ClickHouse/dbt-clickhouse/pull/349))
@@ -522,4 +659,4 @@ for Replicated tables that use the `{uuid}` macro in the path to avoid name conf
522659
[0.19.1]: https://github.com/ClickHouse/dbt-clickhouse/compare/v0.19.0.2...v0.19.1
523660
[0.19.0.2]: https://github.com/ClickHouse/dbt-clickhouse/compare/v0.19.0.1...v0.19.0.2
524661
[0.19.0.1]: https://github.com/ClickHouse/dbt-clickhouse/compare/v0.19.0...v0.19.0.1
525-
[0.19.0]: https://github.com/ClickHouse/dbt-clickhouse/compare/eb3020a...v0.19.0
662+
[0.19.0]: https://github.com/ClickHouse/dbt-clickhouse/compare/eb3020a...v0.19.0

0 commit comments

Comments
 (0)