Solved

How can I avoid fatal errors when an input file is missing?

  • 17 December 2019
  • 3 replies
  • 24 views

Badge

I have a number of DXF input files feeding a workspace that writes to a SQL Server File Geodatabase. These DXF files are sometimes there, sometimes not. The fme workspace fails with a Fatal Error when the Input Reader fails to find the dxf file during "version check". As failure occurs before there is opportunity to incorporate a transformer, I can't use FileExistanceChecker or other file exists processes. Is there a workflow I can use to ensure the translation continues if the input file is missing?

icon

Best answer by hollyatsafe 17 December 2019, 10:56

View original

3 replies

Userlevel 4
Badge +25

You can use a FeatureReader instead of a regular reader, trigger it via a Creator and make sure to set the file that's to be read via an attribute. If the source file can't be found the trigger feature will be output through the <Rejected> port.

The downside is that because the source file is 'unknown' at design time the FeatureReader doesn't know which feature types are present so you need to sort-of-manually specify it (or deal with the output coming through the <Generic> port).

Badge +2

Hi @chris_hvc,

There is also an option to Ignore Failed Readers in the Navigator > Workspace parameters. This setting tells FME whether or not to continue a translation when reading a dataset fails.

Badge

Thanks, both solutions are viable. Ultimately, I've chosen to adjust the workspace parameter "Ignore Failed Readers" to Yes as suggested by @hollyatsafe. This permits the process to 'shrug' if the file is unavailable and continue with the files that are available.

Reply