canal版本为:1.1.5
canal 同步表数据报错:
[pool-40-thread-1] ERROR c.a.otter.canal.adapter.launcher.loader.AdapterProcessor - java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.RuntimeException: Target column: id not matched
java.lang.RuntimeException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.RuntimeException: Target column: id not matched
问题分析
主要原因是目标库表不匹配, targetTable: 项设置为test001.tt9
dataSourceKey: defaultDS
destination: canal_1221
groupId: g1
outerAdapterKey: mysql1
concurrent: true
dbMapping:
database: test
table: tt9
targetTable: tt9
targetPk:
id: id
mapAll: true
# targetColumns:
# id:
# name:
# role_id:
# c_time:
# test1:
etlCondition: "where c_time>={}"
commitBatch: 3000 # 批量提交的大小
# targetTable: tb_user #目标数据源的表名 ,这边不能设置为目标数据库.表名,目标库只能在应outerAdapter中的表示的库名