JSON SerDe for Hive supporting JSON arrays

I tried JSON SerDe that Amazon provides an instance of EMR and works great if you need to address / map JSON dictionary fields into columns. However, I could not figure out how to do the same with JSON arrays. For example, if there is a JSON array as follows:

[23123.32, "Text of the text", {"key1": "value1"}]

Is there a way to map the first element of an array to a column in a Hive table? What about the built-in dictionary fields?

+7
source share
1 answer

I struggled with the same problem until I found this heart on github - https://github.com/rcongiu/Hive-JSON-Serde Just turn it on using the "add jar" command when you start the hive and it works like charm.

+4
source

All Articles