Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive, mail # dev - json_tuple cannot parse array, correct?


Copy link to this message
-
json_tuple cannot parse array, correct?
Connell, Chuck 2012-09-14, 21:50
(I tried this question to user@ but no one knew the answer...)

I am successfully using the json_tuple() function in Hive 0.8.1. It works fine. It appears that there is no way to "drill down" into an array however. I want to confirm that I understand this correctly.

So for the JSON object

{"text1":"hello", "array1":[4,5,6]}

I can retrieve the array as [4,5,6]. But I cannot extract any particular element.

Somewhat worse, for the object

{"array7" : [{"1":"one"} ,  {"2":"two"} , {"3":"three"}]}

I can retrieve the array as [{"1":"one"} ,  {"2":"two"} , {"3":"three"}], but I cannot extract or parse any of the JSON objects in the array.

Correct??

Thank you,
Chuck Connell