kettle连接Hbase中数据导出(7)


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

 

1)新建转换——Big Data——Hbase Input双击打开

 

2)在hbase中创建表

3点击Get table names

4)创建Mapping

在下图中单击Get table names按钮,从下拉列表中选择需要创建MAPPING的表名,在Mapping name中输入Mapping名称,然后再设置key字段,如下图

4)创建完Mapping后,再返回Configure query页签

A 设置Zookeeper Host(s)

B 设置Zookeeper post默认为2181

C 单击Get mapped table names,从已经创建过MAPPING的列表中选择表名

D 单击Get mappings or the specified table 获取该表MAPPING

E 单击Get Key/Fields Info获取Key字段

 

2016/07/28 11:27:48 - Default - ERROR (version 3.2.0, build 1 from 2016-07-07 10.46.10 by xnren) : Error disconnecting from database : 
2016/07/28 11:27:48 - Default - ERROR (version 3.2.0, build 1 from 2016-07-07 10.46.10 by xnren) : Unable to commit repository connection
2016/07/28 11:27:48 - Default - ERROR (version 3.2.0, build 1 from 2016-07-07 10.46.10 by xnren) : 
2016/07/28 11:27:48 - Default - ERROR (version 3.2.0, build 1 from 2016-07-07 10.46.10 by xnren) : Error comitting connection
2016/07/28 11:27:48 - Default - ERROR (version 3.2.0, build 1 from 2016-07-07 10.46.10 by xnren) : No operations allowed after connection closed. 

 

注:上图报错因为数据库资源库连接断了,重新连接数据库资源池,ctrl+r

 

执行运行

但是没有文件,解决办法:

把上面的这个对勾去掉,就可以写入文件了

$ cat file.txt

Key;A

Key;115

 

 

 

 

 

 

 

 

 

 

 

 

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM