kettle连接Hive中数据导入导出(6)

时间:2016-07-30 23:58:25   收藏:0   阅读:5727

1.hive往外写数据

http://wiki.pentaho.com/display/BAD/Extracting+Data+from+Hive+to+Load+an+RDBMS

连接hive

 

技术分享

表输入

 

技术分享

1)往excel中写数据

技术分享

技术分享

2)往文本文件中写数据

技术分享

技术分享

技术分享

注:这里需要填上hive的表名.字段名,不然会报如下错误:

2016/07/27 15:43:01 - 表输入.0 - ERROR (version 3.2.0, build 1 from 2016-07-07 10.46.10 by xnren) : Unexpected error
2016/07/27 15:43:01 - 表输入.0 - ERROR (version 3.2.0, build 1 from 2016-07-07 10.46.10 by xnren) : org.pentaho.di.core.exception.KettleDatabaseException: 
2016/07/27 15:43:01 - 表输入.0 - ERROR (version 3.2.0, build 1 from 2016-07-07 10.46.10 by xnren) : Couldn‘t get row from result set
2016/07/27 15:43:01 - 表输入.0 - ERROR (version 3.2.0, build 1 from 2016-07-07 10.46.10 by xnren) : Error retrieving next row

技术分享

技术分享

2.hive中写数据

http://wiki.pentaho.com/display/BAD/Loading+Data+into+Hive

技术分享

技术分享

技术分享

1 hive -e "load data local inpath ‘/opt/a.txt‘ into table jj.ss"

原始数据:

技术分享

插入数据:

技术分享

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!