Why do ExecuteSQLRecord and CSVRecordSetWriter updated the time zone of datetime values?
Hello! I am new to NiFi. I hope someone here can advise me about my problem with time zone. I have these processors:
ListDatabaseTables -> GenerateTableFetch -> ExecuteSQLRecord (writing to csv file by CSVRecordWriter) -> ... ... PutSQL (loading csv file to MySQL using Load Data command)
The source DB is Oracle. CSVRecordWriter has the following properties:
Schema Write Strategy -> Do Not Write Schema
Schema Access Strategy -> Inherit Record Schema
Schema Name -> ${schema.name}
Schema Text -> ${avro.schema}
Date Format -> yyyy-MM-dd
Time Format -> HH:mm:ss
Timestamp Format -> yyyy-MM-dd HH:mm:ss
My source DB and the target DB are both in US east time zone. However, I noticed that the output of ExecuteSQLRecord having time values converted to UTC (added to 5 hours). That results in the wrong time values in the target DB. There may be some ways to convert each date/time column individually, but that will require a huge amount of development effort.
Is there a way to handle this issue properly at global level, or at least at table level? Please note that Time Format needs to be acceptable to MySQL Load Data.
Thank you in advance!
Gary

