首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Parquet文件格式向序列文件格式的转换

Parquet文件格式向序列文件格式的转换
EN

Stack Overflow用户
提问于 2017-03-27 16:48:45
回答 2查看 794关注 0票数 0

我将我的蜂箱表作为Parquet格式存储在HDFS中的某个位置。我能把这个位置的拼花文件转换成顺序文件格式并在上面构建蜂巢表吗?是否有任何程序来进行此转换?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2017-03-27 17:12:30

创建新的序列文件表并使用insert select重新加载数据:

代码语言:javascript
复制
insert into sequence_table
select * from parquet_table;
票数 1
EN

Stack Overflow用户

发布于 2017-03-27 17:57:23

代码语言:javascript
复制
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;

For @AndyReddy

代码语言:javascript
复制
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
;
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43052129

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档