Canal1.4版本多表join入库Es问题


一、问题描述:

es adapter 同步数据报Unknown column '_v._id' in 'where clause'

表示需要将主键改为_id,如下所示

esMapping:
  _index: mytest
  _type: _doc
  _id: _id
  upsert: true
  #relations:
  #  customer_order:
  #    name: customer
  sql: "SELECT
        top.id as id,
        top.id as _id 
   from top "

 二、问题描述

同步DDL报错
原因在于:h2.mv.db缓存了数据库表结构,我们可以修改deployer中的canal.properties文件。
将canal.instance.tsdb.enable = false 修改为false

https://hub.fastgit.org/alibaba/canal/issues/2772

 三、binlog消费位置

show master status,最新的位置开始binlog获取
https://hub.fastgit.org/alibaba/canal/issues/1697

instance.properties,指定binlog读取位置
https://hub.fastgit.org/alibaba/canal/issues/3391

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM