Solved

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

  • 28 February 2022
  • 1 reply
  • 7 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

icon

Best answer by kailinatsafe 1 March 2022, 17:27

View original

1 reply

Userlevel 3
Badge +13

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

Reply