[Amazon](500310) Invalid operation error

0

Hi Team,
We are fetching the data from redshift db using JDBC way in java.
The query used for getting the data from tables is select * from table_name limit 200;
Below are the errors occurred for different tables. .I am able to see the data in resultset .But while getting next record of particular row it throwing the below errors. Could you please help us to understand the error and resolution for it.

ERROR1:
[Amazon](500310) Invalid operation: Invalid input syntax for type numeric

Details:
error: Invalid input syntax for type numeric
code: 8001
context: value: ""
query: 88634410
location: cg_util.cpp:604
process: query19_773_88634410 [pid=79398]
-----------------------------------------------;
at com.amazon.redshift.client.messages.inbound.ErrorResponse.toErrorException(Unknown Source)
    at com.amazon.redshift.client.PGMessagingContext.handleErrorResponse(Unknown Source)  
    at com.amazon.redshift.client.PGMessagingContext.handleMessage(Unknown Source)  
    at com.amazon.jdbc.communications.InboundMessagesPipeline.getNextMessageOfClass(Unknown Source)  
    at com.amazon.redshift.dataengine.PGResultSet.hasMoreRows(Unknown Source)  
    at com.amazon.jdbc.common.SForwardResultSet.updateCursorPosition(Unknown Source)  

ERROR2:For other table

[Amazon](500310) Invalid operation: Divide by zero;
at com.amazon.redshift.client.messages.inbound.ErrorResponse.toErrorException(Unknown Source)
at com.amazon.redshift.client.PGMessagingContext.handleErrorResponse(Unknown Source)
at com.amazon.redshift.client.PGMessagingContext.handleMessage(Unknown Source)
at com.amazon.jdbc.communications.InboundMessagesPipeline.getNextMessageOfClass(Unknown Source)
at com.amazon.redshift.dataengine.PGResultSet.hasMoreRows(Unknown Source)
at com.amazon.jdbc.common.SForwardResultSet.updateCursorPosition(Unknown Source)
at com.amazon.jdbc.common.SForwardResultSet.next(Unknown Source)

ERROR3:
java.sql.SQLException: [Amazon](500310) Invalid operation: operator does not exist: text ||;
at com.amazon.redshift.client.messages.inbound.ErrorResponse.toErrorException(Unknown Source)
at com.amazon.redshift.client.PGMessagingContext.handleErrorResponse(Unknown Source)
at com.amazon.redshift.client.PGMessagingContext.handleMessage(Unknown Source)
at com.amazon.jdbc.communications.InboundMessagesPipeline.getNextMessageOfClass(Unknown Source)
at com.amazon.redshift.client.PGMessagingContext.doMoveToNextClass(Unknown Source)
at com.amazon.redshift.client.PGMessagingContext.getParameterDescription(Unknown Source)
at com.amazon.redshift.client.PGClient.prepareStatement(Unknown Source)
at com.amazon.redshift.dataengine.PGQueryExecutor.<init>(Unknown Source)
at com.amazon.redshift.dataengine.PGDataEngine.prepare(Unknown Source)
at com.amazon.jdbc.common.SPreparedStatement.<init>(Unknown Source)
at com.amazon.jdbc.jdbc41.S41PreparedStatement.<init>(Unknown Source)
at com.amazon.jdbc.jdbc42.S42PreparedStatement.<init>(Unknown Source)
at com.amazon.redshift.core.jdbc42.PGJDBC42PreparedStatement.<init>(Unknown Source)
at com.amazon.redshift.core.jdbc42.PGJDBC42ObjectFactory.createPreparedStatement(Unknown Source)
at com.amazon.jdbc.common.SConnection.prepareStatement(Unknown Source)
at com.amazon.jdbc.common.SConnection.prepareStatement(Unknown Source)

Please share your thoughts on this

Thanks,
Padma Yeddula

已提問 3 年前檢視次數 1578 次
1 個回答
0

Are you still having this issue? If so, please provide a minimal code example or script that we can use to reproduce the problem.

You can send me a direct message with this if needed.

已回答 3 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南