开发者社区> 问答> 正文

请问读取kafka的数据, 发现没有iskey这个属性, 请问该如何设置?

环境信息

canal version1.1.2 mysql version 5.7.13 kafka 接受的数据如下: {"data":[{"mm":"11","mm2":"guo"}],"database":"test_canal","es":1545908671000,"id":1,"isDdl":false,"mysqlType":{"mm":"bigint(255)","mm2":"varchar(255)"},"old":null,"sql":"","sqlType":{"mm":-5,"mm2":12},"table":"table222","ts":1545908671246,"type":"INSERT"} {"data":[{"mm":"11","mm2":"guo"}],"database":"test_canal","es":1545908671000,"id":2,"isDdl":false,"mysqlType":{"mm":"bigint(255)","mm2":"varchar(255)"},"old":null,"sql":"","sqlType":{"mm":-5,"mm2":12},"table":"table222","ts":1545908671345,"type":"INSERT"} {"data":[{"mm":"11","mm2":"guo"}],"database":"test_canal","es":1545908671000,"id":2,"isDdl":false,"mysqlType":{"mm":"bigint(255)","mm2":"varchar(255)"},"old":null,"sql":"","sqlType":{"mm":-5,"mm2":12},"table":"table222","ts":1545908671245,"type":"INSERT"} {"data":[{"mm":"12","mm2":"guo"}],"database":"test_canal","es":1545908679000,"id":3,"isDdl":false,"mysqlType":{"mm":"bigint(255)","mm2":"varchar(255)"},"old":null,"sql":"","sqlType":{"mm":-5,"mm2":12},"table":"table222","ts":1545908679794,"type":"INSERT"} 发现没有iskey 属性

原提问者GitHub用户guojingzoe

展开
收起
古拉古拉 2023-05-08 16:44:16 96 0
1 条回答
写回答
取消 提交回答
  • flatMessage没有列的具体信息,1.1.3会增加pkNames的列信息

    原回答者GitHub用户agapple

    2023-05-09 18:14:35
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Java Spring Boot开发实战系列课程【第16讲】:Spring Boot 2.0 实战Apache Kafka百万级高并发消息中间件与原理解析 立即下载
MaxCompute技术公开课第四季 之 如何将Kafka数据同步至MaxCompute 立即下载
消息队列kafka介绍 立即下载