Skip to content

Commit cee33c0

Browse files
authored
fix: SYSTEM SYNC REPLICA for on_cluster_clause (#156)
* fix SYSTEM SYNC REPLICA * add schema
1 parent 61c3aab commit cee33c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: dbt/include/clickhouse/macros/adapters.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
{% macro exchange_tables_atomic(old_relation, target_relation, obj_types='TABLES') %}
108108

109109
{%- if adapter.get_clickhouse_cluster_name() is not none and obj_types == 'TABLES' %}
110-
{% do run_query("SYSTEM SYNC REPLICA "+ target_relation.identifier + on_cluster_clause()) %}
110+
{% do run_query("SYSTEM SYNC REPLICA " + on_cluster_clause() + target_relation.schema + '.' + target_relation.identifier) %}
111111
{%- endif %}
112112

113113
{%- call statement('exchange_tables_atomic') -%}

0 commit comments

Comments
 (0)