Skip to main content
Solved

What User Parameter format is needed so it can be used with a DuplicateFilter & AttributeKeeper as their 'Key Attributes' field input?

  • February 28, 2022
  • 1 reply
  • 15 views

I'm currently working in FME 2021.2 and trying implement a workbench that can do some dynamic filtering, etc by using a user parameter that defines which fields to act against. The workbench reads in zipped shp file(s) that can have different schemas each time it runs and I want to use a parameter to define which fields I wish to analyse. I can successfully get it to work when one field name is entered but never with 2 or more.

Does anybody know what the parameter type should be (eg. text) and what format the field names need to be entered as (eg. VM_STATUS,R20AH or VM_STATUS R20AH)?

 

When 2 or more fields, only 1 feature is returned. I know for a particular datasets that I should expect 207 which is what I get by manually selecting the fields when the data is cached while debugging the workbench.

 

Thankyou for any time spent looking at this

Best answer by kailinatsafe

Hello @anryan​, it would seem dynamic attributes aren't exactly handled well in the mentioned transformers (eg. AttributeKeeper). I tried a few different methods: concatenating desired values into a list, using the 'Attribute Name' user parameter (to select single or multiple attribute names), but I haven't had any good results. Unfortunately, I think python may be required for this.

 

There isn't really a way to make the Keeper/remover more dynamic, as you need to select which to keep/remove. However, there is an example by David Reksten, with Python on how to remove dynamic attributes here, perhaps you can take a look at the linked workspace there? Let me know if you have any further questions. Best, Kailin Opaleychuk

View original
Did this help you find an answer to your question?

1 reply

kailinatsafe
Safer
Forum|alt.badge.img+21
  • Safer
  • Best Answer
  • March 1, 2022

Hello @anryan​, it would seem dynamic attributes aren't exactly handled well in the mentioned transformers (eg. AttributeKeeper). I tried a few different methods: concatenating desired values into a list, using the 'Attribute Name' user parameter (to select single or multiple attribute names), but I haven't had any good results. Unfortunately, I think python may be required for this.

 

There isn't really a way to make the Keeper/remover more dynamic, as you need to select which to keep/remove. However, there is an example by David Reksten, with Python on how to remove dynamic attributes here, perhaps you can take a look at the linked workspace there? Let me know if you have any further questions. Best, Kailin Opaleychuk


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