hive 导出数据的几种方式

1.使用insert导出

这种方式的优点在于既可以导出到hdfs上还可以导出到本地目录

下面以导出emp表中数据为例

 insert overwrite local directory "/opt/module/data/export/emp" 如果去除local,则是导出到hdfs上

row format delimited fields terminated by " "   (格式,可选)

 select * from emp;

导出结果

2.使用export导出

这种方式只能导出到hdfs上

export table emp to "/emp";

但是速度比较快

原文地址:https://www.cnblogs.com/tele-share/p/9861151.html