Question

Dynamic attributes based on a json message.

  • 11 March 2022
  • 1 reply
  • 0 views

The workspaces receives a JSON message with information about the columns & geometry (where the user is interested in). 

fme1 

We use the geometry in the FeatureReader (Spatial Filter) that is working fine, but the user only wants the attributes: "test1", "test2" in this example. How can i filter the feature class only to: "test1" & "test2". And how can i make this dynamic because it is every time different (attributes)?

 

 

 

The output is an excel file.

 

 

 

fme2 

 

 

thank you. 


1 reply

Userlevel 5
Badge +29

Have a look at the SchemaSetter transformer. This will generate a schema on each feature (as a list). you can then break that schema down, keep the attributes specified in the JSON, and then set the output writer to dynamic so it uses the updated schema.

https://community.safe.com/s/article/dynamic-workflow-tutorial-introduction

Reply