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

79 天前
 cobbage

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 也是大小写吻合。

905 次点击
所在节点    Java
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1088694

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX