All Forums Extensibility
ranjan.kumar1 3 posts Joined 08/11
28 Sep 2011
handling exceptions

I am inserting into teradata using JDBC driver for teradata. In order to process invalid data I am trying to catch the error the executeBatch method in the driver gives. See below-

11/09/28 13:10:39 INFO mapred.JobClient: Task Id : attempt_201109221551_12394_r_000000_0, Status : FAILED
        at com.teradata.jdbc.jdbc_3.ifjdbc_4.TeraLocalPreparedSta tement.executeBatch( 292)
        at org.apache.hadoop.mapreduce.lib.db.DBOutputFormat$DBRe cordWriter.close(

Can you suggest how can I do this? In particular when I put a wrong type of data in a field of the PreparedStatement I would like to catch the exception - which should be a SQLException. It seems that exception does not get caught until the executeBatch at the driver level

tomnolan 594 posts Joined 01/08
29 Sep 2011

You appear to be using an old version of the Teradata JDBC Driver.

We recommend that you upgrade to the newest version of the Teradata JDBC Driver available here on Developer Exchange.


You must sign in to leave a comment.