I am trying to insert 3.8M records into a Teradata table containing 14 columns, through a batch of 10000 records using RJDBC
package of R.
It always crashes after inserting 380000 records i.e. at 39th batch execution.
This is the error I get,
Error in .jcall(ps, "[I", "executeBatch") :
java.sql.BatchUpdateException: [Teradata JDBC Driver] [TeraJDBC 15.10.00.22] [Error 1338] [SQLState HY000] A failure occurred while executing a PreparedStatement batch request. Details of the failure can be found in the exception chain that is accessible with getNextException.
I've tried changing to a different set of rows from the same dataframe. And, behavior remains same, crashes at the 39th batch execution.
Any idea what is this Error 1338
and what could be the fix?
Also, it mentions about getNextException
but how do I use that with R?
The approach I'm using is similar to this one https://developer.teradata.com/blog/ulrich/2013/11/a-wider-test-case-on-r-jdbc-fastload