20260106-seatunel同步自动监听ddl变更但是不监听create的ddl语句.只进行当前待同步表的结构变更操作
source {
MySQL-CDC {
table-names = [
"amzn_data_prd.amzn_api_logs",
"amzn_data_prd.xxx"
]
# 需要字段演进 重要重要重要重要重要重要重要重要重要重要重要重要重要重要1
schema-changes.enabled = true
}
}
sink {
doris {
table = "${table_name}" # 多表写入
database = "amzn_data_prd" # 同库可固定;跨库用 ${database_name} 也行 :contentReference[oaicite:13]{index=13}
# 不允许自动 CREATE 重要重要重要重要重要2
schema_save_mode = ERROR_WHEN_SCHEMA_NOT_EXIST
}
}
schema-changes.enabled 需要特定的引擎支持, 目前不支持yarn平台的flink和spark, 只能用seatunnel本地启动或者 集群启动, 本质要基于 Zeta
schema_save_mode 过滤create的ddl语句,避免binlog监听到create语句去创建表,特别是一些兼容性不怎么好的olap数据平台可能要单独处理数据类型
.preview-wrapper pre::before { position: absolute; top: 0; right: 0; color: #ccc; text-align: center; font-size: 0.8em; padding: 5px 10px 0; line-height: 15px; height: 15px; font-weight: 600; } .hljs.code__pre > .mac-sign { display: flex; } .code__pre { padding: 0 !important; } .hljs.code__pre code { display: -webkit-box; padding: 0.5em 1em 1em; overflow-x: auto; text-indent: 0; } h2 strong { color: inherit !important; }
本文使用 文章同步助手 同步