Skip to content

Instantly share code, notes, and snippets.

@dharkum
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dharkum/47092457f279a4b63d7b to your computer and use it in GitHub Desktop.
Save dharkum/47092457f279a4b63d7b to your computer and use it in GitHub Desktop.
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