Skip to main content
Althotta
Silver ⭐️⭐️⭐️
Jun 9, 2022 5:23 AM UTC
Solved

NIFI ExecuteSQL AVRO logical type converts all dates to UTC

While querying postgres database using ExecuteSQL Processor 1.16.1 converts the date into UTC format. However my target system requirement is to store data in local timezone. This happens only if you set the AVRO logical data type to True. If Avro logical types set to false then it returns the localtime. I have few 100 date fields and i cannot convert each of these from the source. How do i force the ExecuteSQL with AVRO type set to return the date as-is from the source. 

 

When Avro Type set to false : "install_date" : "2018-07-20 13:31:25.733"

When Avro Type set to true:  "install_date" : "2018-07-20T05:31:25.733Z",

 

ckumar
ckumarAnswer
Platinum ⭐️
Jun 9, 2022 1:09 PM UTC

4 replies

ckumar
Platinum ⭐️
ckumarAnswer
Platinum ⭐️
Jun 9, 2022 1:09 PM UTC
VidyaSargur
Community Manager
Community Manager
Jun 15, 2022 7:17 AM UTC

@Althotta, Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future. 

Translate
Regards, Vidya Sargur Madabhushi| Senior Community Manager | Was your question answered? Make sure to mark the answer as the Best Answer. If you find a reply useful, say thanks by clicking on the thumbs up button.
Althotta
AlthottaAuthor
Silver ⭐️⭐️⭐️
Jun 15, 2022 2:01 PM UTC

I had a look into it but that's not the right solution to my opinion. ExecuteSQL just converts every date into UTC, lets say if the dates are already in UTC then it once again converts to UTC which is not right. 

Translate
ckumar
Platinum ⭐️
Platinum ⭐️
Jun 16, 2022 1:51 PM UTC

I suggest you have a technical support case opened with the Cloudera Technical Support team so we can dive further.

 

Thank You.

Translate