Hello, I am having trouble with writing to a db2 database table using the jdbc generic insert, or being more specific writing a timestamp format string to a timestamp column.
I have to read from a csv fle and insert the rows into a db2 database table
I can perfectly do so by skipping the timestamp column but that will cause the field in the table record to take the current timestamp value(which obviously is not the intended outcome)
when I try it with the date value i get the next error “Batch failure. The batch was submitted, but at least one exception occurred on an individual member of the batch”, I only get this error when including the date in the mapper output to the jdbc insert.
the initial date&time string is in his format: “M/DD/YYYY HH.MM” and I format it in two steps(mappers)
first: Date.parse($[‘Date & Time’]).toLocaleDateTimeString() OUTPUT=>“2018-08-21T16:48:00.000”
second: ($DATE_PROCESSED.slice(0,10)+"-"+$DATE_PROCESSED.slice(11).replaceAll (":",".")+“000”).toString() OUTPUT=>“2018-08-21-16.48.00.000000” this is the format(TIMESTAMP) that is stored in the database but for some reason the insert still fails only when I include it in the mapper and I have tested the same string that the mapper gives me by inserting through query and it works fine… I don’t know what could be messing in the middle that I am not seeing… I’d appreciate
any insights you can have on the way I am managing things.