Column additions during snapshot are currently not supported. The suggested workaround is to perform snapshots before or after planned schema changes, or, if the ClickPipe is already failing, to manually add a column of the appropriate type to the destination table.
Default values for added columns
For an added column, ClickPipes propagates a default only when it can translate the value safely to ClickHouse. When a default is propagated, ClickHouse uses it when reading data parts that predate the new column. As a result, rows already present in ClickHouse receive the source default without a full table refresh. ClickPipes propagates literal integer, decimal, and floating-point values; booleans; simple string and date values; and enum or set values when the MySQL server provides full binlog row metadata. It rewrites string literals using ClickHouse-compatible quoting. ClickPipes intentionally omits defaults that are not portable literals, includingNULL, bit literals, function calls such as CURRENT_TIMESTAMP, NOW(), or UUID(), and string values containing backslashes or control characters. The column is still added, but ClickHouse uses its normal type default for parts that predate the column. A full table refresh is required if those existing rows must contain the source default.
ClickPipes propagates defaults only as part of ALTER TABLE ADD COLUMN. Later operations that change or remove a column default are not propagated to ClickHouse.
MySQL 5.x limitations
MySQL versions older than 8.0.1 do not include full column metadata in the binlog (binlog_row_metadata=FULL), so ClickPipes tracks columns by ordinal position. This means:
- Adding a column at the end (
ALTER TABLE ADD COLUMN ...) is supported. - Any DDL that shifts column positions will cause the pipe to raise an error, because ordinal positions can no longer be reliably mapped. This includes:
ALTER TABLE DROP COLUMN ...ALTER TABLE ADD COLUMN ... AFTER .../FIRSTALTER TABLE MODIFY COLUMN ... AFTER .../FIRSTALTER TABLE CHANGE COLUMN ... AFTER .../FIRST