【hive】pentaho无法查询hive

I using table input step in that I am using Hadoop Hive connection type to connect to hadoop database. i am able to see table list but after selecting table I am unable to fetch fields from table and hence unable to preview rows. Getting error as below: 


2012/04/03 18:20:32 - Spoon - Logging goes to  file:///C:/Users/SHAILE~1/AppData/Local/Temp/spoon_996f4d4d-7d8b-11e1-b06e-85d398504852.log 
2012/04/03 18:20:36 - Version checker - OK 
2012/04/03 18:20:36 - class org.pentaho.agilebi.platform.JettyServer - WebServer.Log.CreateListener localhost:10001 
2012/04/03 18:20:38 - Spoon - Asking for repository 
2012/04/03 18:23:42 - Spoon - The transformation has finished!! 
2012/04/03 18:45:23 - C:\Users\shailendrav\Desktop\A.ktr : A - Dispatching started for transformation [C:\Users\shailendrav\Desktop\A.ktr : A] 
2012/04/03 18:45:25 - hive - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : ERROR executing query: org.pentaho.di.core.exception.KettleDatabaseException: 
2012/04/03 18:45:25 - hive - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : Error getting row information from database: 
2012/04/03 18:45:25 - hive - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : Method not supported 
2012/04/03 18:45:25 - hive - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : ERROR in part: openQuery : get rowinfo 
2012/04/03 18:45:25 - Table input.0 - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : Unexpected error 
2012/04/03 18:45:25 - Table input.0 - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : org.pentaho.di.core.exception.KettleDatabaseException: 
2012/04/03 18:45:25 - Table input.0 - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : An error occurred executing SQL in part [openQuery : get rowinfo]: 
2012/04/03 18:45:25 - Table input.0 - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : SELECT * 
2012/04/03 18:45:25 - Table input.0 - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : FROM currency 
2012/04/03 18:45:25 - Table input.0 - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : 
2012/04/03 18:45:25 - Table input.0 - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : 
2012/04/03 18:45:25 - Table input.0 - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : Error getting row information from database: 
2012/04/03 18:45:25 - Table input.0 - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : Method not supported 
2012/04/03 18:45:25 - Table input.0 - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : 
2012/04/03 18:45:25 - Table input.0 - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : 
2012/04/03 18:45:25 - Table input.0 - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : at org.pentaho.di.core.database.Database.openQuery(Database.java:1918) 
2012/04/03 18:45:25 - Table input.0 - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : at org.pentaho.di.trans.steps.tableinput.TableInput.doQuery(TableInput.java:223) 
2012/04/03 18:45:25 - Table input.0 - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : at org.pentaho.di.trans.steps.tableinput.TableInput.processRow(TableInput.java:133) 
2012/04/03 18:45:25 - Table input.0 - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : at org.pentaho.di.trans.step.RunThread.run(RunThread.java:40) 
2012/04/03 18:45:25 - Table input.0 - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : at java.lang.Thread.run(Unknown Source) 
2012/04/03 18:45:25 - Table input.0 - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : Caused by: org.pentaho.di.core.exception.KettleDatabaseException: 
2012/04/03 18:45:25 - Table input.0 - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : Error getting row information from database: 
2012/04/03 18:45:25 - Table input.0 - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : Method not supported 
2012/04/03 18:45:25 - Table input.0 - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : 
2012/04/03 18:45:25 - Table input.0 - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : at org.pentaho.di.core.database.Database.getRowInfo(Database.java:2444) 
2012/04/03 18:45:25 - Table input.0 - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : at org.pentaho.di.core.database.Database.openQuery(Database.java:1905) 
2012/04/03 18:45:25 - Table input.0 - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : ... 4 more 
2012/04/03 18:45:25 - Table input.0 - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : Caused by: java.sql.SQLException: Method not supported 
2012/04/03 18:45:25 - Table input.0 - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : at org.apache.hadoop.hive.jdbc.HiveResultSetMetaData.isSigned(HiveResultSetMetaData.java:275) 
2012/04/03 18:45:25 - Table input.0 - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : at org.pentaho.di.core.database.Database.getValueFromSQLType(Database.java:2456) 
2012/04/03 18:45:25 - Table input.0 - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : at org.pentaho.di.core.database.Database.getRowInfo(Database.java:2437) 
2012/04/03 18:45:25 - Table input.0 - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : ... 5 more 
2012/04/03 18:45:25 - C:\Users\shailendrav\Desktop\A.ktr : A - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : Something went wrong while trying to stop the transformation: org.pentaho.di.core.exception.KettleDatabaseException: 
2012/04/03 18:45:25 - C:\Users\shailendrav\Desktop\A.ktr : A - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : Error cancelling statement 
2012/04/03 18:45:25 - C:\Users\shailendrav\Desktop\A.ktr : A - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : Method not supported 
2012/04/03 18:45:25 - C:\Users\shailendrav\Desktop\A.ktr : A - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : org.pentaho.di.core.exception.KettleDatabaseException: 
2012/04/03 18:45:25 - C:\Users\shailendrav\Desktop\A.ktr : A - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : Error cancelling statement 
2012/04/03 18:45:25 - C:\Users\shailendrav\Desktop\A.ktr : A - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : Method not supported 
2012/04/03 18:45:25 - C:\Users\shailendrav\Desktop\A.ktr : A - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : 
2012/04/03 18:45:25 - C:\Users\shailendrav\Desktop\A.ktr : A - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : at org.pentaho.di.core.database.Database.cancelStatement(Database.java:639) 
2012/04/03 18:45:25 - C:\Users\shailendrav\Desktop\A.ktr : A - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : at org.pentaho.di.core.database.Database.cancelQuery(Database.java:619) 
2012/04/03 18:45:25 - C:\Users\shailendrav\Desktop\A.ktr : A - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : at org.pentaho.di.trans.steps.tableinput.TableInput.stopRunning(TableInput.java:293) 
2012/04/03 18:45:25 - C:\Users\shailendrav\Desktop\A.ktr : A - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : at org.pentaho.di.trans.Trans.stopAll(Trans.java:1352) 
2012/04/03 18:45:25 - C:\Users\shailendrav\Desktop\A.ktr : A - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : at org.pentaho.di.trans.step.BaseStep.stopAll(BaseStep.java:2244) 
2012/04/03 18:45:25 - C:\Users\shailendrav\Desktop\A.ktr : A - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : at org.pentaho.di.trans.step.RunThread.run(RunThread.java:64) 
2012/04/03 18:45:25 - C:\Users\shailendrav\Desktop\A.ktr : A - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : at java.lang.Thread.run(Unknown Source) 
2012/04/03 18:45:25 - C:\Users\shailendrav\Desktop\A.ktr : A - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : Caused by: java.sql.SQLException: Method not supported 
2012/04/03 18:45:25 - C:\Users\shailendrav\Desktop\A.ktr : A - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : at org.apache.hadoop.hive.jdbc.HiveStatement.cancel(HiveStatement.java:83) 
2012/04/03 18:45:25 - C:\Users\shailendrav\Desktop\A.ktr : A - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : at org.pentaho.di.core.database.Database.cancelStatement(Database.java:633) 
2012/04/03 18:45:25 - C:\Users\shailendrav\Desktop\A.ktr : A - ERROR (version 4.2.1-GA, build 15926 from 2011-10-19 15.36.47 by buildguy) : ... 6 more 
2012/04/03 18:45:25 - Table input.0 - Finished reading query, closing connection. 
2012/04/03 18:45:25 - Table input.0 - Finished processing (I=0, O=0, R=0, W=0, U=0, E=1) 
2012/04/03 18:45:25 - C:\Users\shailendrav\Desktop\A.ktr : A - C:\Users\shailendrav\Desktop\A.ktr : A 
2012/04/03 18:45:25 - C:\Users\shailendrav\Desktop\A.ktr : A - C:\Users\shailendrav\Desktop\A.ktr : A

Attachments

  1. hive connection details.jpg
    206 kB
    04/Apr/12 6:59 AM
  2. hive error.jpg
    196 kB
    04/Apr/12 6:57 AM
  3. no list of tables.jpg
    187 kB
    04/Apr/12 9:11 AM
  4. no list of tables.jpg
    187 kB
    04/Apr/12 9:10 AM
  5. sql output.jpg
    177 kB
    04/Apr/12 9:13 AM

Activity

Doug Moran added a comment -  03/Apr/12 9:27 AM -  edited
I believe that this was fixed and will be in the 4.3 release in a 2 weeks. Can you please try out the latest build and verify that it works for you. 

Download the CE build from CI here: 
http://ci.pentaho.com/view/Data%20Integration/job/pentaho-big-data-plugin/lastSuccessfulBuild/artifact/pentaho-big-data-plugin/dist/pdi-ce-4.3.0-SNAPSHOT-big-data.zip 

Thanks, 
Doug 
shailendra vichare added a comment -  04/Apr/12 1:09 AM
Hi Doug, 

Thanks for your quick reply. 

Regards, 
Shailendra.
shailendra vichare added a comment -  04/Apr/12 6:57 AM -  edited
Hi Doug, 

I have tried latest build for connecting to Hive database with the help of table input step. Still I am not able to fetch the fields in SQL and hence data from Hive database. I have attached screenshot of error. 

Please help. 

Thanks, 
Shailendra.
shailendra vichare added a comment -  04/Apr/12 7:50 AM
Hi Doug, 

Is this issue related to Hive JDBC drivers? At present I am using HIVE 0.5 JDBC driver. 

Thanks, 
Shailendra.
shailendra vichare added a comment -  04/Apr/12 9:18 AM
Hi Doug, 

Above issue is resolved by using HIVE 0.7.0 JDBC driver with Pentaho 4.3 version. 
But now I am getting following error with this version. 

1) After selecting generate SQL, I am unable to get list of tables eventhough tables are present. Please refer attachment with 'no list of tables' title. 
2) To get data I am writing SQL as 
    "FROM currency s 
     SELECT s.currencycode, s.name, s.modifieddate" 
but getting all the values in first column and not in separate columns as shown in attachment 'sql output'. 

Please help. 

Thanks, 
Shailendra. 
 
Doug Moran added a comment -  14/Jun/12 3:59 PM
Shailendra,
Sorry I missed your reply.

Your query is not standard SQL, perhaps it is fooling the parser into thinking it's doing a sub select.

Try:
SELECT s.currencycode, s.name, s.modifieddate
FROM currency s
Matey Dzhigoshev added a comment -  29/Jun/12 10:41 AM

Hi All, 

I use hive-jdbc-0.7.1-cdh3u4.jar with Pentaho 4.3.0 Developer release, but it not work for me. I receive same error as it describe above. 

Please help, 

Thanks, 
Mat 

Jordan Ganoff added a comment -  11/Jul/12 2:01 PM
Hi Mat, 

Please make sure you're using the Pentaho Hive JDBC Driver that ships with PDI 4.3.0. It contains required fixes we rely on. You can obtain PDI 4.3.0 from  http://sourceforge.net/projects/pentaho/files/Data%20Integration/4.3.0-stable/

If you just need the JDBC driver you can try using the latest JDBC build from our continuous integration environment. Here's a link to our driver that is now compatible with Hive 0.7.0 - 0.9.0 (and likely 0.9.x):  http://ci.pentaho.com/job/apache-hive/lastSuccessfulBuild/artifact/jdbc/dist/hive-jdbc-0.7.0-pentaho-SNAPSHOT.jar 

Thanks, 
Jordan
Doug Moran added a comment -  01/Aug/12 2:02 PM
Please test this after the Hadoop distro shim layer work ( PDI-8044)
Carter Everett added a comment -  31/Aug/12 12:50 PM
validated
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值