Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have implemented a small job to read from postgresql db and log it.
Postgresql Value
--time3.PNG--
Schema Setup in Talend
--time1.PNG--
Actual Logged Value
--time2.PNG--
So DB value 2022-06-19 15:43:13.745071 converted to 2022-06-19 15:43:13.000745 when using talend timestamp. Is there a way to mitigate this issue and get the correct format as in DB value
Thank you
@Heshan Karunaratne , go to the tip page and read the tip of Step 22, 2022, the tip shows an solution about how to migrate a timestamp. I hope the solution is also applied for Postgresql DB.
Regards
Shong
I can reproduce the issue as you in my side.
To get correct format as in DB value, one possible solution is to setup the type to 'String' and DB Type to 'VARCHAR' for the timestamp field in tPostgresqlInput component as the below
Hi,
Even though we mitigate the issue when reading, still getting the issue when writing to db as a timestamp.
Thank you
@Heshan Karunaratne , go to the tip page and read the tip of Step 22, 2022, the tip shows an solution about how to migrate a timestamp. I hope the solution is also applied for Postgresql DB.
Regards
Shong
@Shicong Hong
Thank you, this resolved the issue
Great, thanks for your feedback!