首页 > 编程知识 正文

inguinal canal,initializationerror2啥意思

时间:2023-05-05 21:01:06 阅读:139571 作者:1386

canal版本为1.1.4

canal同步表数据呈现Java.lang.runtime exception : target column 3360 idnotmatched

主要原因是源主键id和目标主键id不匹配。 如果主键id字段名不是id而是xx_id,则的配置如下:

数据源密钥: defaultdsdestination : example groupid 3360 G1 outeradapterkey : MySQL1concurrent 3360 truedbmapping 3360数据映射3360 et table : mytest2. usertargetpk : xx _ id : xx _ id # mapall : truetargetcolumns 3360 id : name : role _ id : c _ time : test 1: ETL condition 3360 ' wherec _ time={ time } 还是看了源代码发现的? 这个设计真的很牛。 不能只带一个源主键id的字段出来吗? 比如sourcePk.id吗? 如果直接使用名为targetPk.{id}的{id}是源主键id的列名,而源主键列名为xx_id,则此位置为targetPk.xx_id,并且是相应目标端的主关键字

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。