Skip to content

Instantly share code, notes, and snippets.

@AkdM
Last active October 20, 2016 17:33
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 AkdM/5b7b001c840c45e3df01d1de554fa707 to your computer and use it in GitHub Desktop.
Save AkdM/5b7b001c840c45e3df01d1de554fa707 to your computer and use it in GitHub Desktop.
Hive
-- Create names table
CREATE TABLE names(
name STRING,
gender Array<String>,
origin Array<String>,
version DOUBLE
)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '\073'
COLLECTION ITEMS TERMINATED BY ',';
STORED AS ORC;
-- Load data to the names table
LOAD DATA INPATH '/user/adamota/prenoms.csv' INTO TABLE names;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment