Skip to main content

Is there a transformer that is a cross between an AttributeKeeper/Remover and a Tester? Meaning that I need to dynamically split my data not on attribute values but on the attribute field names, so all of the fields with the suffix '_alias' are routed one direction and all other fields are routed another.

Any thoughts on how I can achieve this?

Hi @joshuadamron,

I'm not aware of a transformer that will allow you to test the Attribute Names rather than there values, as a workaround I would use the steps proposed by Mark in this post where he suggests first using an AttributeExploder. The output of this is attr_name and attr_value pairs so you can then use a Tester with the operation 'Ends With' _alias. Once sorted through the different output ports you can then aggregate the data back together.

 

Please also consider upvoting this idea: https://knowledge.safe.com/questions/35011/filter-by-attribute-names.html requesting support for a transformer that allows you to filter by attribute name.


You can use two bulk attribute removers - 1 to keep everything ending in _alias and one to keep everything not ending in _alias


You can use two bulk attribute removers - 1 to keep everything ending in _alias and one to keep everything not ending in _alias

Thank you, exactly what I was looking for!


Reply