0

I am able to INSERT into Postgres DB from JOLTTransformJSON when using ConvertJSONToSQL (v1.13.2) and then PutSQL. But it fails when using PutDatabaseRecord after JOLTTransformJSON.

enter image description here The error is:

PutDatabaseRecord Failed to put Records to database java.lang.NumberFormatException: For input string: "Tue Oct 05 15:58:22 EDT 2021" and

java.lang.NumberFormatException: For input string: "20201705101430"

PutDatabaseRecord properties

Schema for the RecordReader enter image description here I have detail_r table in DB where all columns have type character varying type. Some are of length 20 some 10 some are 8 as needed. I am assuming that jolt transform json fields should match with column names. Some columns are extra in table for which no field is available in json and vice-versa. Can this be an issue. I prefer using PutDatabaseRecord over PutSQL because after PutSQL there is ExecuteSQL which doesn't work well with PutSQL , so can this be done, or what is wrong in below approach.

likeGreen
  • 1,001
  • 1
  • 20
  • 40
  • What is your schema for the RecordReader? – Sdairs Oct 05 '21 at 22:23
  • @Sdairs I have UPDATED the question with Schema for RecordReader. It is default setting – likeGreen Oct 06 '21 at 01:01
  • @mattyb Can you suggest something. I want to use PutDatabaseRecord over PutSQL because of this issue https://stackoverflow.com/questions/54734291/executesql-failing-after-putsql-processor and Delete Attributes Expression property to sql\.args\..* for UpdateAttribute doesn't work either – likeGreen Oct 06 '21 at 14:53

0 Answers0