hive创建压缩分区表

CREATE EXTERNAL TABLE IF NOT EXISTS dilian(
dilians STRING,
dates STRING,
time STRING,
t STRING,
sip STRING,
size STRING,
method STRING,
url STRING,
target STRING,
type STRING,
uip STRING,
url_domain STRING,
apk STRING
)
PARTITIONED BY (dt STRING)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY "\001"
STORED AS
INPUTFORMAT "com.hadoop.mapred.DeprecatedLzoTextInputFormat"
OUTPUTFORMAT "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat"
LOCATION '/tables/t/dilian1/';

alter table sgv.dilian add if not exists partition (dt = '20170901' ) location '/tables/t/dilian1/20170901';

猜你喜欢

转载自blog.csdn.net/qq_25954159/article/details/77851829