hive> create table src (i int) stored as parquet;
OK
Time taken: 0.427 seconds
hive> create table trg stored as sequencefile as select * from src;
为@andyreddy
create table src (i int)
partitioned by (year int,month tinyint,day tinyint)
stored as parquet
;
create table trg (i int)
partitioned by (year int,month tinyint,day tinyint)
stored as sequencefile
;
set hive.exec.dynamic.partition.mode=nonstrict
;
insert into trg partition(year,month,day)
select * from src
;
2条答案
按热度按时间g52tjvyc1#
创建新的序列文件表并使用insert select重新加载数据:
3ks5zfa02#
为@andyreddy