Solved

FME 2016 DateFormatter failed to handle some invalid date attribute?

  • 3 October 2017
  • 9 replies
  • 20 views

Badge

Hi! I am using FME 2016 DateFormatter to process a field that some time will contain invalid text. I configured the DateFormatter to only process text in a specific format, but give the same text output to all other input formats.

However, the DateFormatter will crash the FME for input of some specific input. The screenshot below shows the configuration I uses in DateFormatter and the error message. The input field value is "8 a.m." without quote. The other inputs such as "between 8 a.m. and 3 p.m." will also crash the FME execution.

More details:

  • if I input some other "nicer" random text such as "sldfjsldfj", the DateFormatter will successfully return "some text" as configured.
  • if I change the Source Date Format configuration to "Auto-Detection", "some text" will also be returned.

Attached is my test FME script.

My guess is, DateFormatter is unfortunately tricked by some specific text when it attempt to parse the input. such that it started being parsed, and then the FME execution is crashed.

My questions are:

Thank you!

icon

Best answer by lenaatsafe 3 October 2017, 20:03

View original

9 replies

Badge

Hi @sui_huang

I would really want to suggest upgrading to FME 2017.1 for better datetime support. FME 2016 DateFormatter has a list of known issues - this was one of the reasons why we launched DateTime project for FME 2017.

You can have more than one FME install on your machine. Would you mind downloading FME 2017.1 from https://www.safe.com/support/support-resources/fme-downloads/ and giving it a try?

Badge

Hi @sui_huang

I would really want to suggest upgrading to FME 2017.1 for better datetime support. FME 2016 DateFormatter has a list of known issues - this was one of the reasons why we launched DateTime project for FME 2017.

You can have more than one FME install on your machine. Would you mind downloading FME 2017.1 from https://www.safe.com/support/support-resources/fme-downloads/ and giving it a try?

cuserssui-huangdesktopfme2017test.fmw

 

Hi @LenaAtSafe

 

I tried FME 2017.1 with the new DateTimeConverter transformer. The same input will still crashes the FME execution session. In the attached fme2017 test workspace, if the AttributeCreator transformer that populates invalid value is disable, the other feature with valid data will go through.

 

 

 

 

Userlevel 3
Badge +17

Hi @sui_huang

I would really want to suggest upgrading to FME 2017.1 for better datetime support. FME 2016 DateFormatter has a list of known issues - this was one of the reasons why we launched DateTime project for FME 2017.

You can have more than one FME install on your machine. Would you mind downloading FME 2017.1 from https://www.safe.com/support/support-resources/fme-downloads/ and giving it a try?

Hi @sui_huang, unlike the previous DateFormatter, the new DataTimeConverter in FME 2017.1+ will reject the feature having an invalid date/time string against the specified Input Format.

 

You can connect a transformer (or a Junction) to the <Rejected> port in order to handle (or just discard) the rejected features appropriately.

 

Alternatively, you can also set "Continue Translation" to the "Rejected Feature Handling" parameter in the Navigator/Workspace Parameters/Translation, if all features rejected by transformers in the workspace can be discarded.
Badge
Hi @sui_huang, unlike the previous DateFormatter, the new DataTimeConverter in FME 2017.1+ will reject the feature having an invalid date/time string against the specified Input Format.

 

You can connect a transformer (or a Junction) to the <Rejected> port in order to handle (or just discard) the rejected features appropriately.

 

Alternatively, you can also set "Continue Translation" to the "Rejected Feature Handling" parameter in the Navigator/Workspace Parameters/Translation, if all features rejected by transformers in the workspace can be discarded.
Hi @takashi in the case I tested, it did direct the feature to <reject> port, but still crashed, such that other features cannot be processed.

 

Userlevel 3
Badge +17
Hi @takashi in the case I tested, it did direct the feature to <reject> port, but still crashed, such that other features cannot be processed.

 

Have you connected a transformer such as Logger or a Junction to the <Rejected> port?

 

 

Badge
cuserssui-huangdesktopfme2017test.fmw

 

Hi @LenaAtSafe

 

I tried FME 2017.1 with the new DateTimeConverter transformer. The same input will still crashes the FME execution session. In the attached fme2017 test workspace, if the AttributeCreator transformer that populates invalid value is disable, the other feature with valid data will go through.

 

 

 

 

I agree with @takashi - it is the Workbench and workspace parameter now. Please check either

 

  • Tools > FME Options > Translation > Rejected feature Handling Default
or

 

  • Navigator > Workspace Parameters > Translation > Rejected Feature Handling

 

Badge
Hi @takashi in the case I tested, it did direct the feature to <reject> port, but still crashed, such that other features cannot be processed.

 

@takashi no I didn't, but I am sure it crashed because another feature already go through when the error happened.
Badge
Hi @takashi in the case I tested, it did direct the feature to <reject> port, but still crashed, such that other features cannot be processed.

 

Please alter your Rejected Feature Handling parameter.

 

 

Badge
Hi @takashi in the case I tested, it did direct the feature to <reject> port, but still crashed, such that other features cannot be processed.

 

@LenaAtSafe changing the parameter works. Thank you!

 

@Takashi I tried and found adding a logger as you suggested will also make it work. Thank you!

 

Reply