Instantly share code, notes, and snippets.

Embed
What would you like to do?
DROP TABLE IF EXISTS json_complex_test;
CREATE TABLE IF NOT EXISTS json_complex_test ( country string, languages array<string>, religions map<string,string>)
ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe'
STORED AS TEXTFILE;
LOAD DATA INPATH 'wasb://install@myhdi30primary.blob.core.windows.net/complexdata.txt' OVERWRITE INTO TABLE json_complex_test ;
select * from json_complex_test;
select languages[0] from json_complex_test;
select religions['catholic'] from json_complex_test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment