Ask Your Question
0

type conversion error

asked 2020-11-06 04:44:59 -0600

Allen gravatar image

with jdbc producer, I am hitting the following error:

errorStackTrace:com.streamsets.pipeline.api.base.OnRecordErrorException: JDBC_23 - Can't coerce '0' of type 'INTEGER' to column 'col1' at com.streamsets.pipeline.lib.jdbc.JdbcBaseRecordWriter.setParamsToStatement(JdbcBaseRecordWriter.java:650) at com.streamsets.pipeline.lib.jdbc.JdbcGenericRecordWriter.setParameters(JdbcGenericRecordWriter.java:309) at com.streamsets.pipeline.lib.jdbc.JdbcGenericRecordWriter.processQueue(JdbcGenericRecordWriter.java:224) at com.streamsets.pipeline.lib.jdbc.JdbcGenericRecordWriter.write(JdbcGenericRecordWriter.java:175) at com.streamsets.pipeline.lib.jdbc.JdbcGenericRecordWriter.writeBatch(JdbcGenericRecordWriter.java:122) at com.streamsets.pipeline.lib.jdbc.JdbcUtil.write(JdbcUtil.java:1198) at com.streamsets.pipeline.stage.destination.jdbc.JdbcTarget.write(JdbcTarget.java:324) at com.streamsets.pipeline.stage.destination.jdbc.JdbcTarget.write(JdbcTarget.java:304) at com.streamsets.pipeline.api.base.configurablestage.DTarget.write(DTarget.java:34) at com.streamsets.datacollector.runner.StageRuntime.lambda$execute$2(StageRuntime.java:303) at com.streamsets.datacollector.runner.StageRuntime.execute(StageRuntime.java:244) at com.streamsets.datacollector.runner.StageRuntime.execute(StageRuntime.java:311) at com.streamsets.datacollector.runner.StagePipe.process(StagePipe.java:221) at com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunner.processPipe(ProductionPipelineRunner.java:864) at com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunner.lambda$executeRunner$3(ProductionPipelineRunner.java:908) at com.streamsets.datacollector.runner.PipeRunner.acceptConsumer(PipeRunner.java:207) at com.streamsets.datacollector.runner.PipeRunner.forEachInternal(PipeRunner.java:152) at com.streamsets.datacollector.runner.PipeRunner.executeBatch(PipeRunner.java:132) at com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunner.executeRunner(ProductionPipelineRunner.java:907) at com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunner.runSourceLessBatch(ProductionPipelineRunner.java:885) at com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunner.processBatch(ProductionPipelineRunner.java:515) at com.streamsets.datacollector.runner.StageRuntime$3.run(StageRuntime.java:383) at java.security.AccessController.doPrivileged(Native Method) at com.streamsets.datacollector.runner.StageRuntime.processBatch(StageRuntime.java:379) at com.streamsets.datacollector.runner.StageContext.processBatch(StageContext.java:299) at com.streamsets.pipeline.lib.jdbc.multithread.JdbcBaseRunnable.handlePostBatchAsNeeded(JdbcBaseRunnable.java:421) at com.streamsets.pipeline.lib.jdbc.multithread.JdbcBaseRunnable.generateBatchAndCommitOffset(JdbcBaseRunnable.java:314) at com.streamsets.pipeline.lib.jdbc.multithread.JdbcBaseRunnable.run(JdbcBaseRunnable.java:178) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.lambda$call$0(SafeScheduledExecutorService.java:226) at com.streamsets.datacollector.security.GroupsInScope.execute(GroupsInScope.java:34) at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.call(SafeScheduledExecutorService.java:222) at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeRunnable.run(SafeScheduledExecutorService.java:188) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.lambda$call$0(SafeScheduledExecutorService.java:226) at com.streamsets.datacollector.security.GroupsInScope.execute(GroupsInScope.java:34) at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.call(SafeScheduledExecutorService.java:222) at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeRunnable.run(SafeScheduledExecutorService.java:188) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-11-09 12:42:11 -0600

jeff gravatar image

updated 2020-11-09 12:43:15 -0600

What is the type of your col1 ? It sounds like your database isn't able to coerce an INT to that type automatically, so you will likely need to add a manual type conversion step before the target.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-11-06 04:44:59 -0600

Seen: 372 times

Last updated: Nov 09