Question

Oracle Date to PostgreSQL TIMESTAMPZ

  • 3 April 2020
  • 5 replies
  • 17 views

Badge +6

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

Userlevel 1
Badge +21

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

Badge +6

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

Badge +6

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

Badge +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.

Badge +6

I modified the postgresql start_date to timestamp.

Then I added this dateconverter logic.

SUCCESS!

Reply