+ Start a Discussion
Stefaan Somers 12Stefaan Somers 12 

Dataloader write to SQL database : how to log

I have a job to extract data from Salesforce to an SQL database.
In my logging I can see the following log, but I cannot see which Salesforce record is causing this.
2018-10-25 06:56:42,120 ERROR [Account_Extract] database.DatabaseWriter writeRowList (DatabaseWriter.java:211) - Database error encountered while writing row #12057 through row #12058 (execute batch update). Database configuration: Account_Extract.  Sql error: Argument data type decimal is invalid for argument 1 of substring function..
com.microsoft.sqlserver.jdbc.SQLServerException: Argument data type decimal is invalid for argument 1 of substring function.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1454)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:388)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:338)
    at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4026)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1416)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:185)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:160)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(SQLServerPreparedStatement.java:306)
    at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
    at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
    at com.salesforce.dataloader.dao.database.DatabaseWriter.writeRowList(DatabaseWriter.java:177)
    at com.salesforce.dataloader.action.visitor.AbstractQueryVisitor.writeBatch(AbstractQueryVisitor.java:130)
    at com.salesforce.dataloader.action.visitor.AbstractQueryVisitor.addResultRow(AbstractQueryVisitor.java:117)
    at com.salesforce.dataloader.action.visitor.PartnerQueryVisitor.writeExtraction(PartnerQueryVisitor.java:80)
    at com.salesforce.dataloader.action.visitor.AbstractQueryVisitor.visit(AbstractQueryVisitor.java:83)
    at com.salesforce.dataloader.action.AbstractExtractAction.visit(AbstractExtractAction.java:57)
    at com.salesforce.dataloader.action.AbstractAction.execute(AbstractAction.java:129)
    at com.salesforce.dataloader.controller.Controller.executeAction(Controller.java:121)
    at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:149)
    at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:100)
    at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.java:253)


Does anyone have an idea how I can troubleshoot this kind of activity, so I know which record is causing this