Closed 15767714253 closed 4 months ago
CDC 3.0 , doris flink connector 1.5.0
cdc stream api column rename error 2023-12-11 14:10:54,998 INFO org.apache.doris.flink.sink.writer.serializer.JsonDebeziumSchemaSerializer [] - ddl can not do schema change:{"source":{"version":"1.9.7.Final","connector":"mysql","name":"mysql_binlog_source","ts_ms":1702275054876,"snapshot":"false","db":"sink_algorithm","sequence":null,"table":"mysql_cdc_test","server_id":1,"gtid":null,"file":"mysql-bin.000002","pos":5181,"row":0,"thread":null,"query":null},"historyRecord":"{\"source\":{\"file\":\"mysql-bin.000002\",\"pos\":5181,\"server_id\":1},\"position\":{\"transaction_id\":null,\"ts_sec\":1702275054,\"file\":\"mysql-bin.000002\",\"pos\":5426,\"gtids\":\"386cce00-1c7e-11ed-8d4d-00163e0eabb8:1-18073812\",\"server_id\":1},\"databaseName\":\"sink_algorithm\",\"ddl\":\"ALTER TABLE mysql_cdc_test CHANGE a_load a_load_test_change varchar(32) DEFAULT NULL COMMENT '字段变更修改'\",\"tableChanges\":[{\"type\":\"ALTER\",\"id\":\"\\"sink_algorithm\\".\\"mysql_cdc_test\\"\",\"table\":{\"defaultCharsetName\":\"utf8mb4\",\"primaryKeyColumnNames\":[\"date_time\"],\"columns\":[{\"name\":\"date_time\",\"jdbcType\":93,\"typeName\":\"DATETIME\",\"typeExpression\":\"DATETIME\",\"charsetName\":null,\"position\":1,\"optional\":false,\"autoIncremented\":false,\"generated\":false,\"comment\":null,\"hasDefaultValue\":false,\"enumValues\":[]},{\"name\":\"a_load_test_change\",\"jdbcType\":12,\"typeName\":\"VARCHAR\",\"typeExpression\":\"VARCHAR\",\"charsetName\":\"utf8mb4\",\"length\":32,\"position\":2,\"optional\":true,\"autoIncremented\":false,\"generated\":false,\"comment\":null,\"hasDefaultValue\":true,\"enumValues\":[]},{\"name\":\"b_load\",\"jdbcType\":8,\"typeName\":\"DOUBLE\",\"typeExpression\":\"DOUBLE\",\"charsetName\":null,\"position\":3,\"optional\":true,\"autoIncremented\":false,\"generated\":false,\"comment\":null,\"hasDefaultValue\":true,\"enumValues\":[]}]},\"comment\":null}]}"}
支持列名变更
No response
you can use --use-new-schema-change. flink-connector
--use-new-schema-change
The latest version already supports
Search before asking
Version
CDC 3.0 , doris flink connector 1.5.0
What's Wrong?
cdc stream api column rename error
2023-12-11 14:10:54,998 INFO org.apache.doris.flink.sink.writer.serializer.JsonDebeziumSchemaSerializer [] - ddl can not do schema change:{"source":{"version":"1.9.7.Final","connector":"mysql","name":"mysql_binlog_source","ts_ms":1702275054876,"snapshot":"false","db":"sink_algorithm","sequence":null,"table":"mysql_cdc_test","server_id":1,"gtid":null,"file":"mysql-bin.000002","pos":5181,"row":0,"thread":null,"query":null},"historyRecord":"{\"source\":{\"file\":\"mysql-bin.000002\",\"pos\":5181,\"server_id\":1},\"position\":{\"transaction_id\":null,\"ts_sec\":1702275054,\"file\":\"mysql-bin.000002\",\"pos\":5426,\"gtids\":\"386cce00-1c7e-11ed-8d4d-00163e0eabb8:1-18073812\",\"server_id\":1},\"databaseName\":\"sink_algorithm\",\"ddl\":\"ALTER TABLE mysql_cdc_test CHANGE a_load a_load_test_change varchar(32) DEFAULT NULL COMMENT '字段变更修改'\",\"tableChanges\":[{\"type\":\"ALTER\",\"id\":\"\\"sink_algorithm\\".\\"mysql_cdc_test\\"\",\"table\":{\"defaultCharsetName\":\"utf8mb4\",\"primaryKeyColumnNames\":[\"date_time\"],\"columns\":[{\"name\":\"date_time\",\"jdbcType\":93,\"typeName\":\"DATETIME\",\"typeExpression\":\"DATETIME\",\"charsetName\":null,\"position\":1,\"optional\":false,\"autoIncremented\":false,\"generated\":false,\"comment\":null,\"hasDefaultValue\":false,\"enumValues\":[]},{\"name\":\"a_load_test_change\",\"jdbcType\":12,\"typeName\":\"VARCHAR\",\"typeExpression\":\"VARCHAR\",\"charsetName\":\"utf8mb4\",\"length\":32,\"position\":2,\"optional\":true,\"autoIncremented\":false,\"generated\":false,\"comment\":null,\"hasDefaultValue\":true,\"enumValues\":[]},{\"name\":\"b_load\",\"jdbcType\":8,\"typeName\":\"DOUBLE\",\"typeExpression\":\"DOUBLE\",\"charsetName\":null,\"position\":3,\"optional\":true,\"autoIncremented\":false,\"generated\":false,\"comment\":null,\"hasDefaultValue\":true,\"enumValues\":[]}]},\"comment\":null}]}"}
What You Expected?
支持列名变更
How to Reproduce?
No response
Anything Else?
No response
Are you willing to submit PR?
Code of Conduct