You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by A A <hi...@yahoo.com> on 2011/03/12 11:25:28 UTC
Syntax for using json_tuple() for accessing array elements in JSON
Hi All,
Iam using hive-0.7.0.
I want to use some like :
eg:
select a.timestamp, b.*
from log a lateral view json_tuple(a.appevent, 'eventid', 'eventname') b as f1,
f2;
For array elements in JSON.
So I tried something like json_tuple(a.appevent, 'arr[0].property1',
'arr[1].property1').
However it always returns NULL.
IS this supported? Or should I revert back and use get_json_object()?
Thanking you in advance.
Regards,
A.