其他分享
首页 > 其他分享> > Hive 企业中两种常用表创建组合

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

标签:TERMINATED,name,组合,创建,PARTITIONED,Hive,snappy,str,STRING
来源: https://blog.csdn.net/qq_35495339/article/details/95625491