3

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 ?

samuob
  • 31
  • 1
  • 1
  • 2

3 Answers3

15
CREATE TABLE emp(id int, name string, department string, salary float)
ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
STORED AS PARQUET TBLPROPERTIES ("parquet.compression"="SNAPPY");
thor
  • 21,418
  • 31
  • 87
  • 173
Santosh Maddula
  • 161
  • 1
  • 7
0

Snappy has a good tradeoff between compression and CPU. Enabling snappy in parquet files should only be a config of your utility class.

jocelyn
  • 788
  • 6
  • 12
0

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');