<@U04S8PLJWMT> I'm currently syncing from a mysql ...
# replication-ask-ai
a
@kapa.ai I'm currently syncing from a mysql db to Clickhouse but Airbyte is changing my table definitions and engines (forcing it to replacingmergetree). Why? and how do I stp this?
k
Airbyte’s ClickHouse destination v2 is designed to pick the ClickHouse table engine automatically based on the sync mode, and for Incremental – Append + Deduped it intentionally uses
ReplacingMergeTree
to implement deduplication. [ClickHouse dest] This is why you see Airbyte changing your table definition/engine and attempting
ALTER
operations on columns (including primary-key-related ones). [Issue 65915] From the available information: • The engine type is *not currently user-configurable*; it’s “calculated based on the import type” (sync mode), and there is only a feature request / discussion to allow users to choose engines like
MergeTree
,
ReplacingMergeTree
, or
Null
. [CH v2 discussion] • A user explicitly notes they “wish we would be able to stop airbyte from changing the clickhouse destination columns but I couldn’t find any configuration to be able to do that,” and no solution or setting is documented to disable this behavior. [Issue 65915] Given the docs and issues provided, there is no documented way to stop Airbyte from: 1. Choosing
ReplacingMergeTree
for deduped incremental syncs, or 2. Managing/altering the ClickHouse table schema it owns. The only levers clearly documented in the knowledge you shared are the schema change management settings, which control how Airbyte reacts to source schema changes (propagate automatically, require manual approval, or stop syncs), but they do not expose any option to freeze or override the ClickHouse engine choice. [Schema change mgmt; Detect & propagate] So, based on the current documentation and GitHub threads: • Why is this happening? Because the v2 ClickHouse destination automatically uses
ReplacingMergeTree
for Incremental + Deduped and manages the table schema itself. [ClickHouse dest] • How to stop it? The knowledge sources do not describe any supported configuration to prevent Airbyte from changing the engine or altering its managed tables. The closest related items are open feature/enhancement requests to make engine selection and schema behavior configurable, but they are not yet documented as available features. [CH v2 discussion; Issue 70245] If you need stricter control over engines and schema, the docs and issues here don’t provide an official workaround; you’d likely need to follow or contribute to those enhancement requests in the ClickHouse destination repository. 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
a
@kapa.ai but this scheman and engine change doesnt happen for all my connections. Just few
k
The knowledge sources don’t explain per‑connection differences in this behavior, so I can’t say with certainty why only some of your connections see engine/schema changes. What is clear from the docs and issues: • The ClickHouse v2 destination derives the table engine from the sync mode/import type, and uses
ReplacingMergeTree
for Incremental + Deduped. [ClickHouse dest; CH v2 discussion] • Users report that when deduplication is enabled, Airbyte both: ◦ Forces
ReplacingMergeTree
with primary keys, and ◦ Tries to alter columns (e.g., to
Nullable
) on subsequent syncs. [Issue 65915] Given that, the most likely explanation consistent with the sources is: • The connections where you see engine/schema changes are those using Incremental – Append + Deduped (or another mode that triggers the “dedup” path). • The connections where you don’t see changes are using modes that don’t require deduplication (e.g., Full Refresh or Incremental – Append), so the connector doesn’t switch to
ReplacingMergeTree
or perform the same ALTER logic. However, the docs do not explicitly confirm this per‑connection difference; they only state that engine choice is tied to “import type” and that there is currently no user‑configurable way to override it. [ClickHouse dest; CH v2 discussion] There is also no documented setting to “freeze” the schema/engine for some connections and not others; schema change management settings only control how source schema changes are propagated, not the ClickHouse engine choice. [Schema change mgmt; Detect & propagate] So, based on the available information: • Different behavior per connection is most plausibly due to different sync modes/import types being used. • There is no documented way to stop Airbyte from changing the engine/schema on the connections where the dedup/engine logic is triggered. 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.