Skip to main content

Possibly something that may already be addressed - this is in FME 2019.2.3.1

If reading a date time field from Oracle, if you try to sort this field numerically you get an error message, presumably because the date times are seen as strings

Failed to sort Feature Table. Ensure fields you wish to sort by are of a sortable type

Breaking bulk mode, e.g. with a python caller,  addresses the issue and the sorter works.

Hi @ebygomm

It looks like a similar error for 2019 was reported here (fixed for 2020.1). Are you using SQLExecutor or the regular reader to read from Oracle?


Have you tried

Select to_number(to_char(datefield,'YYYYMMDD')), datefield from table order by 1

That should return the dates, ordered numerically.


Hi @ebygomm

It looks like a similar error for 2019 was reported here (fixed for 2020.1). Are you using SQLExecutor or the regular reader to read from Oracle?

Yes, thanks, looks like it's the same error. I'm using an sql executor. This workspace will be running in 2019 but it's good to be able to annotate the workaround with details of the issue and fix.


Have you tried

Select to_number(to_char(datefield,'YYYYMMDD')), datefield from table order by 1

That should return the dates, ordered numerically.

It's not a problem to workaround now I know about it, it just means that this part of the workflow is subtly different from another part with a different input, but I can add the annotation to explain why.

It puzzled me for a bit because when i was setting it up I had feature caching on and running from cached data has no issues :-)


Reply