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