hive数据导出到linux本地

方法1(hive下执行):insert overwrite local directory 'Linux本地目录' row format delimited fields terminated by  '\t'  select * from 表名 where ......;
eg:insert overwrite local directory '/lx/mp.txt' row format delimited fields terminated by  '\t'  select * from emp where deptno=10;
方法2(linux下执行):hive -e "select * from 表名 where .... " > linux文件路径
【hive数据导出到linux本地】eg:hive -e "select * from emp " >  /lx/emp.txt

    推荐阅读