Skip to content

Instantly share code, notes, and snippets.

@hadoopsters
Created December 19, 2017 01:51
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 hadoopsters/861a0fef40f9ba5bc8e21f099c3d5059 to your computer and use it in GitHub Desktop.
Save hadoopsters/861a0fef40f9ba5bc8e21f099c3d5059 to your computer and use it in GitHub Desktop.
CREATE TABLE my_database.my_table
(
column_1 string,
column_2 int,
column_3 double
)
PARTITIONED BY
(
year int,
month smallint,
day smallint,
hour smallint
)
STORED AS ORC
TBLPROPERTIES('ORC.COMPRESS'='SNAPPY'); -- ensure SNAPPY is uppercase, lowercase triggers a nasty bug in Hive (fixed in later versions)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment