Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
### Unreleased
### Improvement
* 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))
* Add unique invocation id to temporary distributed tables and views in `distributed_incremental` materialization mode to avoid naming conflicts with parallel dbt runs. ([#353](https://github.com/ClickHouse/dbt-clickhouse/pull/353))

### Release [1.8.4], 2024-09-17
### Improvement
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
{%- set distributed_backup_relation = make_backup_relation(target_relation, backup_relation_type) -%}
{%- set preexisting_intermediate_relation = load_cached_relation(intermediate_relation)-%}
{%- set preexisting_backup_relation = load_cached_relation(backup_relation) -%}
{%- set view_relation = default__make_temp_relation(target_relation, '__dbt_view_tmp') -%}
{%- set view_relation = default__make_temp_relation(target_relation, '__dbt_view_tmp_' + invocation_id.replace('-', '_')) -%}

{{ drop_relation_if_exists(preexisting_intermediate_relation) }}
{{ drop_relation_if_exists(preexisting_backup_relation) }}
Expand Down Expand Up @@ -124,6 +124,8 @@
{% do to_drop.append(distributed_backup_relation) %}
{% endif %}

{{ drop_relation_if_exists(view_relation) }}

{% set should_revoke = should_revoke(existing_relation, full_refresh_mode) %}
{% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}
{% do apply_grants(target_relation_local, grant_config, should_revoke=should_revoke) %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@
{% set new_data_relation = existing_relation.incorporate(path={"identifier": existing_relation.identifier
+ '__dbt_new_data_' + invocation_id.replace('-', '_')}) %}
{{ drop_relation_if_exists(new_data_relation) }}
{%- set distributed_new_data_relation = existing_relation.incorporate(path={"identifier": existing_relation.identifier + '__dbt_distributed_new_data'}) -%}
{%- set distributed_new_data_relation = existing_relation.incorporate(path={"identifier": existing_relation.identifier
+ '__dbt_distributed_new_data_' + invocation_id.replace('-', '_')}) -%}

{%- set inserting_relation = new_data_relation -%}

Expand Down