Skip to main content
Question

Oracle Date to PostgreSQL TIMESTAMPZ


jbradfor
Contributor
Forum|alt.badge.img+7

Trying to use DateTimeConverter to conver Oracle Date to PostgreSQL timestampz. Have tried multiple formats.

Value of attribute 'start_date' could not be converted to type 'timestamptz'. Feature will be logged and skipped

5 replies

ebygomm
Influencer
Forum|alt.badge.img+38
  • Influencer
  • April 3, 2020

Are you reading data from Oracle? If it's coming from the date field in Oracle it will already be in an FME format irrespective of how it is displayed in Oracle so you shouldn't need to do this conversion


jbradfor
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • April 3, 2020
ebygomm wrote:

Are you reading data from Oracle? If it's coming from the date field in Oracle it will already be in an FME format irrespective of how it is displayed in Oracle so you shouldn't need to do this conversion

Correct from Oracle Date to PostgrSQL timestampz. I removed the DateTimeConverter, this is the result:

Value of attribute 'start_date' could not be converted to type 'timestamptz'. Feature will be logged and skipped


jbradfor
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • April 3, 2020
ebygomm wrote:

Are you reading data from Oracle? If it's coming from the date field in Oracle it will already be in an FME format irrespective of how it is displayed in Oracle so you shouldn't need to do this conversion

I changed the target postgresql table to use timstamp instead of timestamptz. Same error.

 

Value of attribute 'start_date' could not be converted to type 'timestamp'. Feature will be logged and skipped


Forum|alt.badge.img+2

@jbradfor as @ebygomm mentions - if your source data is Oracle with a data type timedate, then FME will have converted the Oralce date field into the FME data format. So you shouldn't need the TimeDateConverter at all. To check that FME is reading and interpreting your Oracle date field correctly, add an Inspector after the Oracle reader feature type and check the date field. It should have the standard FME date format.


jbradfor
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • April 3, 2020

I modified the postgresql start_date to timestamp.

Then I added this dateconverter logic.

SUCCESS!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings