Skip to main content

Hi All,

I’m having a bit of headache to read all the SHP included within a ZIP through the FeatureReader transformer, I’m getting the following error Shapefile and cannot be read for some reason. I can reader it with the normal SHP reader but can’t get it to work on FeatureReader, here is a screenshot of the settings:

 

What am I doing wrong?

 

 I have been able to read the folders within the ZIP file but now the second FeatureReader fails because can’t find the temp files? Why is it going to temp files? screenshot below:

 


Reading directly from a ZIP file means FME extracts the data from the ZIP file to a temporary folder to be able to read the contents.

It could be that the temp file extraction is removed after the first reader is read into cache. Have you tried reading the contents of the zip without featureCaching?


Thanks @jkr_wrk I think I was able to achieve what I wanted by adding the expression >**\*.shp] in the dataset and modifying the published parameters to files. The expression allows to search through the ZIP file and find the extension .shp. 

Below a screenshot for completeness: 

 


@galigis Thats the correct approach. FME treats ZIP files as folders, so the path to open a shp in a zip will always need to end with *.shp but can include a *.zip as a parent


Reply