Hive 企业中两种常用表创建组合

常用组合:parquet格式 + snappy压缩

set parquet.compression=snappy;
 CREATE TABLE db_name.tb_name(
id              STRING
)
PARTITIONED BY (date_str STRING ,hour_str STRING )
ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' 
LINES TERMINATED BY '\n'
STORED AS PARQUET;  

常用组合:ORC格式 + snappy压缩

CREATE TABLE db_name.tb_name(
id              STRING
)
PARTITIONED BY (date_str STRING ,hour_str STRING )
ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' 
LINES TERMINATED BY '\n'
STORED AS ORC
TBLPROPERTIES ("orc.compress"="SNAPPY") ;
上一篇:MongoDB、Sql Server和Mysql导入导出指定条件数据


下一篇:hive 模块二