Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/update #2

Merged
merged 29 commits into from
Jan 17, 2024
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
911aace
Distributed incremental materialization (#172)
gladkikhtutu Jul 27, 2023
a4de3a8
Update version and tweak docs
genzgd Jul 27, 2023
a3a83d3
Lw delete set fix (#174)
genzgd Jul 27, 2023
24dab5d
Fix legacy incremental materialization (#178)
genzgd Aug 9, 2023
d3d3ff6
fix: distributed_table materialization issue (#184)
zli06160 Aug 22, 2023
747e689
Bump version and changelog (#185)
genzgd Aug 22, 2023
0ff12af
cluster names containing dash characters (#198) (#200)
the4thamigo-uk Oct 21, 2023
0dde15f
Add basic error test, fix minor merge conflict (#202)
genzgd Oct 26, 2023
532b9f2
Cluster setting and Distributed Table tests (#186)
gfunc Oct 26, 2023
8f349e5
Update version and CHANGELOG, incorporate cluster name fix (#203)
genzgd Oct 26, 2023
992949e
Release 1 5 0 (#210)
genzgd Nov 23, 2023
e2bd7ec
Update test and dependency versions. (#211)
genzgd Nov 23, 2023
d44265e
Adjust the wrapper parenthesis around the table materialization sql c…
kris947 Nov 27, 2023
2494763
Update for 1.5.1 bug fix
genzgd Nov 27, 2023
7f9890f
Fix creation of replicated tables when using legacy materialization (…
StevenReitsma Nov 28, 2023
bf5898e
On cluster sync cleanup
genzgd Nov 28, 2023
7f5a27a
Bug fixes related to model settings. (#214)
genzgd Nov 29, 2023
3282123
Add materialization macro for materialized view (#207)
SoryRawyer Nov 29, 2023
21f179f
Release 1 6 0 (#215)
genzgd Nov 30, 2023
d14e694
Release 1 6 1 (#217)
genzgd Dec 5, 2023
ccb004f
Release 1 6 2 (#219)
genzgd Dec 6, 2023
520004c
Release 1 7 0 (#220)
genzgd Dec 7, 2023
297aa80
Correctly warn or error if light weight deletes not available
genzgd Dec 8, 2023
30580d2
Wrap columns_in_query query in select statement (#222)
ptemarvelde Dec 13, 2023
1592d6f
Update changelog
genzgd Dec 13, 2023
1327446
fix: incremental on cluster clause
Savid Jul 12, 2023
39f24f8
feat(icremental): add distrubted table
Savid Jul 18, 2023
0255cec
fix(incremental): replicated delete_insert
Savid Jul 24, 2023
cf5369c
feat(incremental): distrubted append
Savid Jul 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
On cluster sync cleanup
genzgd authored and Savid committed Jan 17, 2024
commit bf5898ec2916e4c2be7c9ed751e8d303ed85a34f
1 change: 1 addition & 0 deletions .github/workflows/test_matrix.yml
Original file line number Diff line number Diff line change
@@ -66,6 +66,7 @@ jobs:
- name: Run Native tests
env:
DBT_CH_TEST_PORT: 9000
DBT_CH_TEST_CLUSTER: test_shard
run: |
PYTHONPATH="${PYTHONPATH}:dbt"
pytest tests
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
### Release [1.5.2], 2023-11-28
#### Bug Fix
- The `ON CLUSTER` clause was in the incorrect place for legacy incremental materializations. This has been fixed. Thanks to
[Steven Reitsma](https://github.com/StevenReitsma) for the fix!
- The `ON CLUSTER` DDL for drop tables did not include a SYNC modifier, which might be the cause of some "table already exists"
errors

### Release [1.5.1], 2023-11-27
#### Bug Fix
- Fix table materialization for compatibility with SQLFluff. Thanks to [Kristof Szaloki](https://github.com/kris947) for the PR!
2 changes: 1 addition & 1 deletion dbt/adapters/clickhouse/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = '1.5.1'
version = '1.5.2'
2 changes: 1 addition & 1 deletion dbt/include/clickhouse/macros/adapters.sql
Original file line number Diff line number Diff line change
@@ -56,7 +56,7 @@
{% macro clickhouse__drop_relation(relation, obj_type='table') -%}
{% call statement('drop_relation', auto_begin=False) -%}
{# drop relation on cluster by default if cluster is set #}
drop {{ obj_type }} if exists {{ relation }} {{ on_cluster_clause(relation.without_identifier())}}
drop {{ obj_type }} if exists {{ relation }} {{ on_cluster_clause(relation.without_identifier(), True)}}
{%- endcall %}
{% endmacro %}

5 changes: 4 additions & 1 deletion dbt/include/clickhouse/macros/materializations/table.sql
Original file line number Diff line number Diff line change
@@ -121,11 +121,14 @@
{%- endif %}
{%- endmacro -%}

{% macro on_cluster_clause(relation) %}
{% macro on_cluster_clause(relation, force_sync) %}
{% set active_cluster = adapter.get_clickhouse_cluster_name() %}
{%- if active_cluster is not none and relation.should_on_cluster %}
{# Add trailing whitespace to avoid problems when this clause is not last #}
ON CLUSTER {{ active_cluster + ' ' }}
{%- if force_sync %}
SYNC
{%- endif %}
{%- endif %}
{%- endmacro -%}