Skip to main content
Hi there,
I am looking for a transformer or a solution that allows me to check if any attribute of a feature has a specific value (e.g. string "remove"). Only then I want to remove the attribute. Renaming would work as well.
Thanks for your help.

@friedhelm​ This is probably easiest solved in a small Python script. I've attached an example workspace (FME 2021). The Python will remove any attribute with the value "AWS" and also create a list of the removed attributes.


Hi @friedhelm​ , you can use the NullAttributeMapper too with the settings shown in the attached screenshot.remove-specific-attributes-with-nullattributemapper


Hi @friedhelm​ , you can use the NullAttributeMapper too with the settings shown in the attached screenshot.remove-specific-attributes-with-nullattributemapper

Dear Takashi, Mark
thanks a lot. Eirher solution should work for me
Friedhelm

Kind regards,
Friedhelm Moggert-Kägeler
Solutions Director
Maritime Spatial Data



SevenCs GmbH
Atlantic Haus
Zirkusweg 1, 20359 Hamburg, Germany
Phone +49 40 851 72 40
Fax +49 40 851 72 479
www.sevencs.com

@friedhelm​ This is probably easiest solved in a small Python script. I've attached an example workspace (FME 2021). The Python will remove any attribute with the value "AWS" and also create a list of the removed attributes.

Dear Takashi, Mark
thanks a lot. Either solution should work for me
Friedhelm

Kind regards,
Friedhelm Moggert-Kägeler
Solutions Director
Maritime Spatial Data



SevenCs GmbH
Atlantic Haus
Zirkusweg 1, 20359 Hamburg, Germany
Phone +49 40 851 72 40
Fax +49 40 851 72 479
www.sevencs.com

In case it helps, I selected this as one of our questions of the week and created a video about my solution to it here: https://www.youtube.com/watch?v=ZvSaHQ7gouI&t=2338s


Reply