Closed maidangdang closed 4 years ago
好的,最近工作比较忙,我们内部版本是实现了 复杂json的拓展的, 包括array, map类型(展开), 但是nested类型 还没支持
@sundy-li 感谢回复,但是我看不到回复的内容,麻烦看看,谢谢!
另外,前面的问题2,应该是:clickhouse_sinker是否支持写clickhouse的nested字段?,支持的话也给个demo
@maidangdang 加入了 GjsonParser, 这里是 map,array的解析示例 https://github.com/housepower/clickhouse_sinker/blob/master/parser/parser_test.go#L84
clickhouse表: CREATE TABLE test.test(gname String, glist Array(String)) ENGINE = Memory
task/json_reques.json: { "name" : "json_test",
}
往kafka写入数据: {"gname": "name", "glist":["1","2"]} {"gname": "name", "glist":['1','2']}
最后从clickhouse查到gname列是写进去了,但是glist写不进去。 请问下: 1.写array列应该怎样写? 2.是否支持写clickhouse的map类型字段,支持的话也给个demo
谢谢!