Skip to main content
Question

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.


Forum|alt.badge.img
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.

5 replies

Forum|alt.badge.img+2
  • January 14, 2022

@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.


takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • January 14, 2022

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


Forum|alt.badge.img
  • Author
  • January 15, 2022
takashi wrote:

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

Forum|alt.badge.img
  • Author
  • January 15, 2022
markatsafe wrote:

@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

mark2atsafe
Safer
Forum|alt.badge.img+43
  • Safer
  • January 17, 2022

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


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