You probably want to be using the UDF get_json_object(), I added to this stackoverflow post [http://stackoverflow.com/questions/24447428/parse-json-arrays-using-hive] a few months ago....the problem was specific to top-level JSON arrays, and is related to JIRA HIVE-1575 [https://issues.apache.org/jira/browse/HIVE-1575], however the example there should get you on the right track...
From: TJay Belt [mailto:tjayb...@yahoo.com] Sent: Thursday, July 23, 2015 4:04 PM To: User Subject: im having an issue extracting some data from json within hive in hdinsight and i wonder if this audience could help me out in any way. Here is a link to the request i put out on StackOverflow. I need help retrieving sub arrays from JSON with a HIVE query<http://stackoverflow.com/questions/31593852/i-need-help-retrieving-sub-arrays-from-json-with-a-hive-query> [image]<http://stackoverflow.com/questions/31593852/i-need-help-retrieving-sub-arrays-from-json-with-a-hive-query> I need help retrieving sub arrays from JSON with a HIVE ...<http://stackoverflow.com/questions/31593852/i-need-help-retrieving-sub-arrays-from-json-with-a-hive-query> I have the following JSON. { "_id": "00075602-f58d-49f5-8a82-9b5fb5582443", "ActivityCountedCollection": [{ "Lesson": "98d66ab9-1ef4-4b61-a05d-857b3e07e0f8... View on stackoverflow.com<http://stackoverflow.com/questions/31593852/i-need-help-retrieving-sub-arrays-from-json-with-a-hive-query> Preview by Yahoo Thanks TJay ====================================================================== THIS ELECTRONIC MESSAGE, INCLUDING ANY ACCOMPANYING DOCUMENTS, IS CONFIDENTIAL and may contain information that is privileged and exempt from disclosure under applicable law. If you are neither the intended recipient nor responsible for delivering the message to the intended recipient, please note that any dissemination, distribution, copying or the taking of any action in reliance upon the message is strictly prohibited. If you have received this communication in error, please notify the sender immediately. Thank you.