MySQL Schema Change Sync
MySQL Schema Change Sync automatically applies upstream MySQL column changes to Doris during continuous load. This capability applies only to MySQL CDC with Auto Table Creation. It is not supported by MySQL CDC with SQL Mapping.
Supported Schema Changes
| MySQL operation | Doris behavior |
|---|---|
ADD COLUMN | Adds a column with the same name and a type defined by the MySQL Data Type Mapping, and copies the column comment. DEFAULT and NOT NULL constraints are not copied, and historical rows are not backfilled. Subsequent rows use the actual values written by MySQL to the binlog. |
DROP COLUMN | Drops the column with the same name. |
Considerations
- If an added column already exists or a dropped column does not exist, Doris skips the operation so that a retry does not fail the job.
- Column positions specified by
FIRSTandAFTERare not synchronized to Doris. New columns are appended after the existing Doris columns. CHANGE COLUMN,MODIFY COLUMN,RENAME COLUMN, DEFAULT changes, andNULL/NOT NULLconstraint changes are not synchronized automatically. Before performing these operations, pause the continuous load job, change the Doris target table manually, verify that both schemas are compatible, and then resume the job.- Primary key, index, partition, table name, and other table-level schema changes are not synchronized automatically.