Skip to main content
Question

Workspace using FeatureReader


danilo_fme
Evangelist
Forum|alt.badge.img+45

Hi User's,

I have a Workspace that needs to search in ( Folder and Subfolders ) the files in shapefiles Polygon01.shp and Polygon02.shp.

Two differents Folders:

  • C:\\SAFE_Base_Conhecimento\\ZIP_Procura_arquivo\\Files\\Folder_01
  • C:\\SAFE_Base_Conhecimento\\ZIP_Procura_arquivo\\Files\\Folder_02

The Folder_02 doens't has any files, the folder is empty.

When the Wokspace is run a error happened after the transformer FeatureReader. The reason is because didn't find any SHP files in Folder_02.

My question: Its possible to configure the FeatureReader to run and search SHP files without this error? Or has another option before to configure and check if the Folder has any SHP files?

I'm use FME Desktop 2016.

Thanks in Advance,

5 replies

jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • July 20, 2017

Hook up an inspector or logger to the Rejected port, or change your Translation Rejected Feature Handling Default to Continue Translation/


fmelizard
Safer
Forum|alt.badge.img+18
  • Safer
  • July 20, 2017

Hi @danilo_inovacao if you're able to upgrade to FME 2017.0, the FeatureReader will pass the location without a shapefile through the <Rejected> port (provided you've enabled the option @jdh has mentioned).


erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • July 20, 2017

Another option would be:

Use a "Directory and File Path" reader to select the folders that contain one or more Shape files (Select files and use the windows path directory attribute and use a DuplicateFilter to get the unique values).

Then feed that folder (with "/*.shp" concatenated to it) to the FeatureReader.

That way you will only pass folders containing a Shape file and not get the error.

This should work for older versions of FME.


danilo_fme
Evangelist
Forum|alt.badge.img+45
  • Author
  • Evangelist
  • July 20, 2017
fmelizard wrote:

Hi @danilo_inovacao if you're able to upgrade to FME 2017.0, the FeatureReader will pass the location without a shapefile through the <Rejected> port (provided you've enabled the option @jdh has mentioned).

Hi @TiaAtSafe, thanks your help. :)

danilo_fme
Evangelist
Forum|alt.badge.img+45
  • Author
  • Evangelist
  • July 20, 2017
erik_jan wrote:

Another option would be:

Use a "Directory and File Path" reader to select the folders that contain one or more Shape files (Select files and use the windows path directory attribute and use a DuplicateFilter to get the unique values).

Then feed that folder (with "/*.shp" concatenated to it) to the FeatureReader.

That way you will only pass folders containing a Shape file and not get the error.

This should work for older versions of FME.

Hi @erik_jan, thanks your help :)

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