创建一个带有默认serde(lazysimpleserde)和默认stored(textfile)的外部空表。 添加分区。 alter partition set fileformat(或set serde)。
Hive语言手册
CREATE EXTERNAL TABLE test(ip string, localTime string )
PARTITIONED BY (partition__hive__ STRING) location '/tmp/table/empty';
alter table test add partition (partition__hive__='p_0') location 'hdfs://hdfsTest/hive/table/test/2018/11/21/08';
alter table test partition (partition__hive__='p_0') SET FILEFORMAT parquet;
alter table test add partition (partition__hive__='p_1') location 'hdfs://hdfsTest/hive/table/test/2018/11/21/09';
alter table test partition (partition__hive__='p_1') SET SERDE 'org.apache.hive.hcatalog.data.JsonSerDe';
1条答案
按热度按时间2cmtqfgy1#
创建一个带有默认serde(lazysimpleserde)和默认stored(textfile)的外部空表。
添加分区。
alter partition set fileformat(或set serde)。
Hive语言手册