Created on 07-19-2021 07:42 AM - edited 07-19-2021 08:08 AM
I live in a GMT +2 timezone but we collect all our data as GMT.
My PutDatabaseRecord processor receives JSON with one field being the timestamp, e.g.:
2021-07-19 14:52:39
If I look at the flowfile just before the PutDatabaseRecord processor this timestamp is correct. However it gets inserted into the database as 2021-07-19 16:52:39
I can't find any documentation on how to prevent this in 1.14.0.
Any idea what to do? Currently I'm subtracting an additional 2 hours to make up for this but that's not a good permanent fix.
Edit:
Is this perhaps related to this issue? @mburgess : if not and this is a bug then I can give more info.
https://issues.apache.org/jira/browse/NIFI-8768?jql=text%20~%20%22time%20zone%20JsonTreeReader%22
Edit 2: this worked previously in 1.12.2
Created 07-19-2021 11:20 AM
Created 07-19-2021 11:42 AM
Do not use string. "Use Avro Logical Types: TRUE". So, try converting to Avro before PutDatabaseRecord.
Created 07-19-2021 11:10 PM
My data source is not QueryDatabaseTable, it is json received from another source. Do I need to convert JSON to AVRO now before using PutDatabaseRecord?
Also, if I do add a new ConvertRecord processor for every PutDatabaseRecord I have, these do not have the "Use Avro Logical Types: TRUE" option either.
Created 07-20-2021 11:11 PM
Is there any way to reach the Devs to know if this is intentional or not?
I need to upgrade a bunch of servers from 1.12.2 to 1.14.0, but I also need to know if we first have to add a bunch of processors to deal with this timezone change from PutDatabaseRecord.
Created 07-22-2021 07:47 AM
I have seen a similar issue a while ago but that one got fixed, the best way to reach the experts to check if there is a known fix is to go to the Cloudera Support Portal, once you log in you should be able to log a support ticket.
Created 07-30-2021 02:07 AM
Unfortunately seems I cannot access the support ticket area - not enough privileges.
All I need to know if this is a bug (in which case I stay with 1.12.1) or if this is a new "feature" in which case I need to update all my flows when upgrading to 1.14.0.
Created 08-03-2021 02:00 PM
I am honestly not sure, timezones are one of the most tricky topics so I cannot easily determine if there was a mistake that got fixed, or whether a new one is introduced.
If you have problems accessing the support portal please reach out to the cloudera contact person for your company, best to fix your support account before you try to log a support case during a production down situation 😉
Created 08-03-2021 11:12 PM
I managed to speak to some devs on Slack and we found a related issue, posted below.
https://issues.apache.org/jira/projects/NIFI/issues/NIFI-8749
Hopefully it gets fixed soon so that we can upgrade to 1.14.0 +