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

 

 

 

 

 

 

 

 

 

 

 

 

 

 

转载于:https://www.cnblogs.com/zeppelin/p/5718730.html

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值