V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
cobbage
V2EX  ›  Java

这周么搞个了 Canal Adapter 同步 es。有个问题关于字段 key 大小写的问题基于什么考量,还是我还有没看到的地方

  •  
  •   cobbage · 9 天前 · 520 次点击

    DML: {"data":[{"ID":"01238f0d262106456d3a864247117b48","LOGIN_NAME":"ttt","USERNAME":"tt"}],"database":"zzcm","destination":"example","es":1731220850000,"groupId":"g1","isDdl":false,"old":[{"LOGIN_NAME":"tttt"}],"pkNames":["ID"],"sql":"","table":"sys_user","ts":1731220854645,"type":"UPDATE"}

    DML: {"data":[{"ID":"01238f0d262106456d3a864247117b46","LOGIN_NAME":"tttt","USERNAME":"tt"}],"database":"zzcm","destination":"example","es":1731221326000,"groupId":"g1","isDdl":false,"old":null,"pkNames":["ID"],"sql":"","table":"sys_user","ts":1731221327113,"type":"DELETE"}

    DML: {"data":[{"ID":"01238f0d262106456d3a864247117b99","LOGIN_NAME":"tttt","USERNAME":"tt"}],"database":"zzcm","destination":"example","es":1731221336000,"groupId":"g1","isDdl":false,"old":null,"pkNames":["ID"],"sql":"","table":"sys_user","ts":1731221336823,"type":"INSERT"}

    DML 里面字段 key 大写;表名小写;

    需要和配置 sql 大小写吻合才行(这个稍不注意有些数据就不合适和匹配不上了 还不报错!!!)。

    还有指定的 id/pk 也是大小写吻合。

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2672 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 15:31 · PVG 23:31 · LAX 07:31 · JFK 10:31
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.