Last active
August 29, 2015 14:02
-
-
Save dharkum/47092457f279a4b63d7b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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