博客信息

Hive数据导出三种方式

发布时间:『 2017-06-23 15:40』  博客类别:Hadoop/Spark  阅读(1341) 评论(0)

一、导出到本地文件系统

insert overwrite local directory '/home/data/' 
row format delimited 
FIELDS TERMINATED BY '\t'
COLLECTION ITEMS TERMINATED BY ','
MAP KEYS TERMINATED BY ':'
select * from test;

二、导出到HDFS中

insert overwrite directory '/home/wyp/hdfs'
select * from wyp;

三、导出到Hive的另一个表中

insert into table test
     partition (age='25')
     select id, name, tel
     from wyp;


关键字:   无
评论信息
暂无评论
发表评论
验证码: 
Powered by IMZHANGJIE.CN Copyright © 2015-2025 粤ICP备14056181号