Hive数据导出
2016-08-30 本文已影响0人
发条香蕉
Hive数据导出
- 导出方式
- Hadoop命令方式
- Get (hadoop fs -get /warehouse/test/* /home/data)
- text (hadoop fs -text /warehouse/test/* > /home/data)
- 通过INSERT...DIRECTORY方式
- insert overwrite [local] directory '/tmp/ca_employees' [row format delimited fields terminated by '\t']
select name,salary,address from employees - Shell命令加管道:hive -f/e |sed/grep/awk >file
- hive -S -e "select * from test" | grep wer
- 第三方工具
- insert overwrite [local] directory '/tmp/ca_employees' [row format delimited fields terminated by '\t']
- Hadoop命令方式