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