Anchormen / sql4es

sql4es: JDBC driver for Elasticsearch
https://www.anchormen.nl
Apache License 2.0
278 stars 114 forks source link

ES 5.4 Error SQL4ES 5.0.0 #38

Open sudhirkumar1980 opened 7 years ago

sudhirkumar1980 commented 7 years ago

am able to connect to ES 5.4 using JDBC connection. But getting following error while using table input.

Field in question is of type long in ES. Do i have to use any any type conversion in sql query ?

2017/06/07 10:31:04 - XXXXXXXXXXXXXXXXXXX - ERROR (version 7.1.0.0-12, build 1 from 2017-05-16 17.18.02 by buildguy) : Unexpected error 2017/06/07 10:31:04 - XXXXXXXXXXXXXXXXXXX - ERROR (version 7.1.0.0-12, build 1 from 2017-05-16 17.18.02 by buildguy) : org.pentaho.di.core.exception.KettleDatabaseException: 2017/06/07 10:31:04 - XXXXXXXXXXXXXXXXXXX - Couldn't get row from result set 2017/06/07 10:31:04 - XXXXXXXXXXXXXXXXXXX - 2017/06/07 10:31:04 - XXXXXXXXXXXXXXXXXXX - Unable to get value 'BigNumber(16)' from database resultset, index 0 2017/06/07 10:31:04 - XXXXXXXXXXXXXXXXXXX - Value in column '1' is not of type BigDecimal but is class java.lang.Integer 2017/06/07 10:31:04 - XXXXXXXXXXXXXXXXXXX - 2017/06/07 10:31:04 - XXXXXXXXXXXXXXXXXXX - 2017/06/07 10:31:04 - XXXXXXXXXXXXXXXXXXX - at org.pentaho.di.core.database.Database.getRow(Database.java:2546) 2017/06/07 10:31:04 - XXXXXXXXXXXXXXXXXXX - at org.pentaho.di.core.database.Database.getRow(Database.java:2516) 2017/06/07 10:31:04 - XXXXXXXXXXXXXXXXXXX - at org.pentaho.di.core.database.Database.getRow(Database.java:2494) 2017/06/07 10:31:04 - XXXXXXXXXXXXXXXXXXX - at org.pentaho.di.trans.steps.tableinput.TableInput.doQuery(TableInput.java:259) 2017/06/07 10:31:04 - XXXXXXXXXXXXXXXXXXX - at org.pentaho.di.trans.steps.tableinput.TableInput.processRow(TableInput.java:140) 2017/06/07 10:31:04 - XXXXXXXXXXXXXXXXXXX - at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62) 2017/06/07 10:31:04 - XXXXXXXXXXXXXXXXXXX - at java.lang.Thread.run(Thread.java:745) 2017/06/07 10:31:04 - XXXXXXXXXXXXXXXXXXX - Caused by: org.pentaho.di.core.exception.KettleDatabaseException: 2017/06/07 10:31:04 - XXXXXXXXXXXXXXXXXXX - Unable to get value 'BigNumber(16)' from database resultset, index 0 2017/06/07 10:31:04 - XXXXXXXXXXXXXXXXXXX - Value in column '1' is not of type BigDecimal but is class java.lang.Integer 2017/06/07 10:31:04 - XXXXXXXXXXXXXXXXXXX - 2017/06/07 10:31:04 - XXXXXXXXXXXXXXXXXXX - at org.pentaho.di.core.row.value.ValueMetaBase.getValueFromResultSet(ValueMetaBase.java:4964) 2017/06/07 10:31:04 - XXXXXXXXXXXXXXXXXXX - at org.pentaho.di.core.database.BaseDatabaseMeta.getValueFromResultSet(BaseDatabaseMeta.java:2107) 2017/06/07 10:31:04 - XXXXXXXXXXXXXXXXXXX - at org.pentaho.di.core.database.DatabaseMeta.getValueFromResultSet(DatabaseMeta.java:2950) 2017/06/07 10:31:04 - XXXXXXXXXXXXXXXXXXX - at org.pentaho.di.core.database.Database.getRow(Database.java:2538) 2017/06/07 10:31:04 - XXXXXXXXXXXXXXXXXXX - ... 6 more 2017/06/07 10:31:04 - XXXXXXXXXXXXXXXXXXX - Caused by: java.sql.SQLException: Value in column '1' is not of type BigDecimal but is class java.lang.Integer 2017/06/07 10:31:04 - XXXXXXXXXXXXXXXXXXX - at nl.anchormen.sql4es.ESResultSet.getBigDecimal(ESResultSet.java:548) 2017/06/07 10:31:04 - XXXXXXXXXXXXXXXXXXX - at org.pentaho.di.core.row.value.ValueMetaBase.getValueFromResultSet(ValueMetaBase.java:4919) 2017/06/07 10:31:04 - XXXXXXXXXXXXXXXXXXX - ... 9 more 2017/06/07 10:31:04 - XXXXXXXXXXXXXXXXXXX - Finished reading query, closing connection.

RaniRaven commented 7 years ago

It doesn't support higher ES than 2.4, However, with some changes to the client it shouldn't be hard to fit it.