JSON SerDe for Hive that supports JSON arrays
I have tried the JSON SerDe that Amazon provides for EMR instance and works great if you need to address/map JSON dictionary fields to columns. However I wasn't been able to figure how to do the same with JSON arrays. For example if there is a JSON array as follows:
[23123.32, "Text Text", { "key1": "value1" } ]
Is there a way to map the first element of an array to a column in Hive table? What about the embedded dictionary fields?
我一直在努力解决同样的问题,直到我在github上发现了这个serde - https://github.com/rcongiu/Hive-JSON-Serde一旦你启动配置单元,使用'add jar'命令就可以包含它,它就像一个魅力。
链接地址: http://www.djcxy.com/p/60332.html