I'm trying to insert a flowfile from NiFi into PostgreSQL database. Flowfile is a JSON which keys are: id, timestamp, metric1, metric2, ..., and I have problems with timestamp data.
This is the value of SQL Insert statement:
INSERT INTO egillor.metrics (id, consumo_red, generacion_pv, timestamp) VALUES (?, ?, ?, ?)
And this is the error
Unable to execute SQL select query INSERT INTO egillor.metrics (id, consumo_red, generacion_pv, timestamp)
VALUES (?, ?, ?, ?) for StandardFlowFileRecord ... due to
java.sql.SQLDataException: The value of the sql.args.4.value is '2021-05-22T00:00:00+02:00', which cannot
be converted to a timestamp; routing to failure:
At the middle of the log, I have the following clue, but I don't now how to fix it
Caused by: java.text.ParseException: Unparseable date: "2021-05-22T00:00:00+02:00"
So, I have to deal with java.text.ParseException from inside a PutDatabaseRecord processor...
Does anyone had this problem in the past? Does anyone know how I can fix it?