Skip to content

Missing ON CLUSTER clause when using insert_overwrite with Replicated table engine #426

Open
@emushell

Description

@emushell

Describe the bug

When using materialized='incremental' together with incremental_strategy="insert_overwrite" and using engine="ReplicatedReplacingMergeTree" the intermediate (temp) table is created without ON CLUSTER clause and causes exception: Code: 36. DB::Exception: Macro 'uuid' and empty arguments of ReplicatedMergeTree are supported only for ON CLUSTER queries with Atomic database engine. (BAD_ARGUMENTS)

Steps to reproduce

  1. Create model with materialized='incremental', engine="ReplicatedMergeTree", incremental_strategy="insert_overwrite"
  2. exectue: dbt run first time to create the initial object, execute second time in order incrementally add data

Expected behaviour

CREATE TABLE for intermediate table should have ON CLUSTER vlause

Configuration

Environment

  • dbt version: 1.8.9
  • dbt-clickhouse version: 1.8.9

ClickHouse server

  • ClickHouse Server version: 24.12

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions