hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Narayanan K <>
Subject get_json_object for nested field returning a String instead of an Array
Date Mon, 07 Apr 2014 22:52:08 GMT
Hi all

I am using get_json_object to read a json text file. I have created
the external table as below :

PARTITIONED BY (dt string)
LOCATION '/users/abc/';

The json data has some fields that are not simple fields but fields
which are nested fields like -  "field" : [{"id":1},{"id":2}.. ].

While using the get_json_object to retrieve that field, it is
returning back a string instead of an Array. Hence I am not able to
explode the array as it is a string.

Is there some way we can get an array of get_json_object instead of a
string so that we can perform explode on this nested field ? or Anyway
we can convert the string into an array so that I can use explode ?

Thanks in advance,

View raw message