问题描述
我有以下由 http 服务返回的 json 负载 -
{"dataSentOct": "2020-12-26:09:00,Sat:09:00,232639.0,76862.10390000002,35011.5945,41850.50940000002,20925.25470000001,136.17,2.0468187081064766,New,10.392742222776956,Diverged","dataRecvdOct": "2020-12-26:09:00,282921.0,93455.93440000001,42554.872,50901.06240000001,25450.531200000005,137.32,Diverged"}
并且我定义了以下 Siddhi 规则来解析响应 -
@info(name = 'Response')
@sink(type='log')
@source(type = 'http-call-response',http.status.code = '2\d+',sink.id='predictions',@map(type = 'json',@attributes(dataSentOct='$.dataSentOct',dataRecvdOct='$.dataRecvdOct') ))
define stream ResponseStream(dataSentOct string,dataRecvdOct string);
但是我在 siddhi 日志中收到以下错误 -
[2021-02-11 18:49:33,571] ERROR {io.siddhi.extension.map.json.sourcemapper.JsonSourceMapper} - Json message {"dataSentOct": "2020-12-26:09:00,Diverged"} contains missing attributes. Hence dropping the message.
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)