因为默认flinkcdc是2.X 要手动设置scan.incremental.snapshot.enabled
我的代码
bin/flink run -Dyarn.application.name=TrayLotBinding_Log -Dexecution.checkpointing.interval=3s -Dparallelism.default=3 -c org.apache.doris.flink.tools.cdc.CdcTools lib/flink-doris-connector-1.18-1.6.2.jar sqlserver-sync-database --database ods --table-prefix TEST_ --sqlserver-conf hostname=10.50.2.XXX --sqlserver-conf port=1433 --sqlserver-conf username=XXXX --sqlserver-conf password="XXXX" --sqlserver-conf database-name=F1SUB --sqlserver-conf schema-name="dbo" --sqlserver-conf scan.startup.mode='initial' --including-tables "AOI" --sqlserver-conf scan.incremental.snapshot.enabled='true' --debezium.snapshot.isolation.mode='read-uncommitted' --sink-conf fenodes=10.48.XXX.XXX:8030 --sink-conf username=root --sink-conf password="XXXXX" --sink-conf jdbc-url=jdbc:mysql://10.48.XXX.XXX:9030 --sink-conf sink.label-prefix=label --table-conf replication_num=3
执行后会报错