Closed kirankvgit closed 7 years ago
-- data, save in maps.json
{"a": { "b" : { "c":{ "d": "HELLO!"}}}}
-- table
create table maps( a map<string, map<string,map<string,string>>> )
ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe';
LOAD DATA LOCAL INPATH 'maps.json' OVERWRITE INTO TABLE maps;
-- this will work
select a['b']['c']['d'] from maps;
OK
HELLO!
Hi
I do have the Json file which has map type with spaces in between keys and 3 levels of map for each key of root level map. How can I access the data elements which are at 3rd level of map. Any help would be appreciated.
thanks in advance best regards Kiran