Skip to main content
Question

Dynamic schema reading


e.steven

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.

2 replies

rudewi
Participant
Forum|alt.badge.img
  • Participant
  • May 24, 2022

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


e.steven
  • Author
  • May 24, 2022
rudewi wrote:

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!


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