hive表导出

来源:互联网 发布:js弹出div模态窗口 编辑:程序博客网 时间:2024/06/05 11:22
  1. 导出到hadoop hdfs

启动hive , 在hive中输入:

hive> insert overwrite directory '/user/output/ouye_payed'select TransactionMoney from OUYE_TransactionLog where transactionjob='payed';    >
  1. 导出到本地系统(hdfs格式)
hive> insert overwrite local directory '/soft_ins/test'    > select * from test;
  1. 导出到本地txt文件
bin/hive -e "SELECT  * from e6admin.gxzl_kgx_drw where mat_track_no='20150927222804386620'" >> /soft_ins/gxzl_kgx_drw.txt
0 0
原创粉丝点击