Skip to main content
I have a workspace with three FeatureReaders (two reading multiple datasets from two different SDE databases) and one reading a single zipped shapefile from a URL. They are all written to a Generic writer with the dynamic schema setting that is getting the schemas from Workspace Resources (Reader as Resource), one for each datasource (FeatureReader). I also have published and private parameters set to allow the user to pick one or more datasets from one or more FeatureReaders to run through the workspace.

 

 

This works fine for the SDE datasets, but when the zipped shapefile is selected, the translation fails with the following error:

 

 

 

UniversalReader -- readSchema resulted in 0 schema features being returned

Shape Reader: No Shape files found in specified directory 'C:/Users/cw0157/AppData/Local/Temp/2/HAZ_HW_SITES.zip_1372349846576_4848'. Check if directory specified is valid

Error fetching dynamic schema definitions from reader `SHAPE_1'. Error reading from `C:/Users/cw0157/AppData/Local/Temp/2/HAZ_HW_SITES.zip_1372349846576_4848' reader.

MULTI_WRITER: Error fetching dynamic schema definitions from reader 'SHAPE_1'

MULTI_WRITER: Error fetching dynamic schema definitions from reader 'SHAPE_1'

 

 

 

Thanks,

 

Michael
Hi Michael,

 

 

Have you verified that the shape is downladed and unzipped at the specified location? 

 

 

Itay
The directory doesn't exist, which I noticed and thought might be the issue. However, as a test if I read the zip file and write it to a non-Generic writer (a Shape writer, for example) the translation is successful and seems to be reading it from a similar directory (which also doesn't exist). So, based on that I thought that wasn't the issue and it had something to do with the Generic writer and/or reading the schema from a Workspace Resource.

 

 

If the directory is the issue, how does one specify a directory that does exist?
The downloading location is usially the defined FME temp directory if possible, you can define the location yourself.

 

 

But since your testing shows otherwise, I would also expect the generic writer to be able to writer dynamically or the resource reader to behave as an ordinary reader.

 

 

You can try to add your destination schema dataset  with a normal reader instead of a resource and see if it makes a difference. 
Itay - I tried your suggestion of adding the normal SHAPE reader as the source for the destination schema and it worked!

 

 

Thanks for the help!
FYI - I just noticed that while the solution (using the normal SHAPE reader as the source for the destination schema - not a SHAPE reader added as a Workspace Resource) worked by making the schema available to the generic writer, it unfortunately reads all the features from the SHAPE reader each time the workspace is run. In this instance, it's not a big deal because it's a small dataset, but for a larger dataset this could cause a significate decrease in performance if all the features are read, even if the dataset isn't selected for download.

Reply