JDBC_23 - Can't coerce 'Sat Dec 29 13:26:27 CST 2018' of type 'TIME' to column 'endtime2'

asked 2018-12-29 01:13:40 -0600

anonymous user

Anonymous

updated 2018-12-29 01:21:56 -0600

when I insert data into oracle throws JDBC producer,error occurs,the type of the column in oracle is TIMESTAMP, I convert the data type from String to DateTime using format 'yyyy-MM-dd HH:mm:ss.SSS', source data is '2018-12-29 13:26:27.000000'. I tried to convert the data type to time, date, it doesn't work.

image description image description

com.streamsets.pipeline.api.base.OnRecordErrorException: JDBC_23 - Can't coerce 'Sat Dec 29 13:26:27 CST 2018' of type 'DATETIME' to column 'endtime2' at com.streamsets.pipeline.lib.jdbc.JdbcBaseRecordWriter.setParamsToStatement(JdbcBaseRecordWriter.java:584) at com.streamsets.pipeline.lib.jdbc.JdbcGenericRecordWriter.setParameters(JdbcGenericRecordWriter.java:260) at com.streamsets.pipeline.lib.jdbc.JdbcGenericRecordWriter.write(JdbcGenericRecordWriter.java:180) at com.streamsets.pipeline.lib.jdbc.JdbcGenericRecordWriter.writeBatch(JdbcGenericRecordWriter.java:123) at com.streamsets.pipeline.lib.jdbc.JdbcUtil.write(JdbcUtil.java:824) at com.streamsets.pipeline.stage.destination.jdbc.JdbcTarget.write(JdbcTarget.java:208) at com.streamsets.pipeline.api.base.configurablestage.DTarget.write(DTarget.java:34) at com.streamsets.datacollector.runner.StageRuntime.lambda$execute$2(StageRuntime.java:290) at com.streamsets.datacollector.runner.StageRuntime.execute(StageRuntime.java:235) at com.streamsets.datacollector.runner.StageRuntime.execute(StageRuntime.java:298) at com.streamsets.datacollector.runner.StagePipe.process(StagePipe.java:244) at com.streamsets.datacollector.runner.preview.PreviewPipelineRunner.lambda$runSourceLessBatch$0(PreviewPipelineRunner.java:341) at com.streamsets.datacollector.runner.PipeRunner.executeBatch(PipeRunner.java:136) at com.streamsets.datacollector.runner.preview.PreviewPipelineRunner.runSourceLessBatch(PreviewPipelineRunner.java:337) at com.streamsets.datacollector.runner.preview.PreviewPipelineRunner.runPollSource(PreviewPipelineRunner.java:319) at com.streamsets.datacollector.runner.preview.PreviewPipelineRunner.run(PreviewPipelineRunner.java:217) at com.streamsets.datacollector.runner.Pipeline.run(Pipeline.java:538) at com.streamsets.datacollector.runner.preview.PreviewPipeline.run(PreviewPipeline.java:51) at com.streamsets.datacollector.execution.preview.sync.SyncPreviewer.start(SyncPreviewer.java:218) at com.streamsets.datacollector.execution.preview.async.AsyncPreviewer.lambda$start$0(AsyncPreviewer.java:95) at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.lambda$call$0(SafeScheduledExecutorService.java:226) at com.streamsets.datacollector.security.GroupsInScope.execute(GroupsInScope.java:33) at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.call(SafeScheduledExecutorService.java:222) at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.lambda$call$0(SafeScheduledExecutorService.java:226) at com.streamsets.datacollector.security.GroupsInScope.execute(GroupsInScope.java:33) at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.call(SafeScheduledExecutorService.java:222) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at com.streamsets.datacollector.metrics.MetricSafeScheduledExecutorService$MetricsTask.run(MetricSafeScheduledExecutorService.java:100) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)

This is another log of type TIME:

com.streamsets.pipeline.api.base.OnRecordErrorException: JDBC_23 - Can't coerce 'Sat Dec 29 13:26:27 CST 2018' of type 'TIME' to column 'endtime2' at com.streamsets.pipeline.lib.jdbc.JdbcBaseRecordWriter.setParamsToStatement(JdbcBaseRecordWriter.java:584) at com.streamsets.pipeline.lib.jdbc.JdbcGenericRecordWriter.setParameters(JdbcGenericRecordWriter.java:260) at ... (more)

edit retag flag offensive close merge delete