how does hive create table using parquet and snappy

samuob picture samuob · Aug 12, 2015 · Viewed 15.3k times · Source

I know the syntax for creating a table using parquet but I want to know what does this mean to create tables using parquet format and compressed by snappy and how does we do that ? please help me with an example syntax.

What is the advantage by using snappy compression ?

Answer

Santosh Maddula picture Santosh Maddula · May 3, 2016
CREATE TABLE emp(id int, name string, department string, salary float)
ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
STORED AS PARQUET TBLPROPERTIES ("parquet.compression"="SNAPPY");