Reputation: 31
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 ?
Upvotes: 3
Views: 21130
Reputation: 19
create table info(name string , city string,distance int) row format delimited fields terminated by <terminator>
lines terminated by <terminator>
stored as PARQUET tblproperties('parquet.compress'='SNAPPY');
Upvotes: 0
Reputation: 171
CREATE TABLE emp(id int, name string, department string, salary float)
ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
STORED AS PARQUET TBLPROPERTIES ("parquet.compression"="SNAPPY");
Upvotes: 16
Reputation: 898
Snappy has a good tradeoff between compression and CPU. Enabling snappy in parquet files should only be a config of your utility class.
Upvotes: 0