Hive 拼花地板文件格式到序列文件格式的转换

Hive 拼花地板文件格式到序列文件格式的转换,hive,parquet,sequencefile,Hive,Parquet,Sequencefile,我把我的蜂巢表格以拼花格式存储在HDFS中的某个位置。我可以将此位置的拼花地板文件转换为序列文件格式并在其上构建配置单元表吗? 是否有执行此转换的程序?创建新的序列文件表并使用插入选择重新加载数据: insert into sequence_table select * from parquet_table; 创建新的序列文件表并使用插入选择重新加载数据: insert into sequence_table select * from parquet_table; 适用于@AndyRed

我把我的蜂巢表格以拼花格式存储在HDFS中的某个位置。我可以将此位置的拼花地板文件转换为序列文件格式并在其上构建配置单元表吗?
是否有执行此转换的程序?

创建新的序列文件表并使用插入选择重新加载数据:

insert into sequence_table
select * from parquet_table;

创建新的序列文件表并使用插入选择重新加载数据:

insert into sequence_table
select * from parquet_table;

适用于@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
;

适用于@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
;

让我试试。谢谢。如果我的序列表是按年、月、日分区的,那么我如何将我的拼花地板表中按年、月、日分区的所有记录插入序列表?创建分区表,
insert overwrite table sequence\u table partition(年、月、日)从拼花地板表中选择,分区键应该是最后一个,在末尾添加“按分区分配”键以减少减压器上的压力。如果目标表的结构完全相同,可以选择*。让我试试。谢谢。如果我的序列表是按年、月、日分区的,那么我如何将我的拼花地板表中按年、月、日分区的所有记录插入序列表?创建分区表,
insert overwrite table sequence\u table partition(年、月、日)从拼花地板表中选择,分区键应该是最后一个,在末尾添加“按分区分配”键以减少减压器上的压力。如果目标表具有完全相同的结构,您可以选择*。为什么?………@DuduMarkovitz我公司的其他一些团队希望将数据作为序列文件格式。为什么?………@DuduMarkovitz我公司的其他一些团队希望将数据作为序列文件格式。如果我的序列表按年、月进行分区,那么,我怎样才能将拼花地板表中按年、月、日划分的所有记录插入序列表中呢?如果我的序列表是按年、月、日分区的,那么我如何将我的拼花地板表中按年、月、日分区的所有记录插入序列表?只需插入?