Skip to main content

I am creating a FME server app that reads shapefiles, applies some spatial analysis and then writes the results out to shapefile and an excel.

 

Input shapefiles however will have varying schemas/attributes. The source I have set as a user parameter, that will prompt the input shapefile path.

 

How do I get my reader to process/read varying schemas? I have ticked 'Merge Feature Type' on the reader. I assumed this would adjust the user attributes dynamically based on the input, but the schema remains fixed to the shapefile I set the bench up with.

Try using the feature reader transformer . this gives you the option to read in the schema features separately. You'll have to set the features to read parameter to 'schema and data features'

http://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Transformers/Transformers/featurereader.htm

if you want to change this schema, have a look into using the schema feature here:

https://community.safe.com/s/article/dynamic-workflows-advanced-example-modifying-the-s


Try using the feature reader transformer . this gives you the option to read in the schema features separately. You'll have to set the features to read parameter to 'schema and data features'

http://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Transformers/Transformers/featurereader.htm

if you want to change this schema, have a look into using the schema feature here:

https://community.safe.com/s/article/dynamic-workflows-advanced-example-modifying-the-s

Great thanks for that. I've used the feature reader method, coupled with a test filter and attribute exposer to set the schema based on the input. Cheers!


Reply