Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
When UpdateAttribute is used to remove attributes, it requires that a regex be used to specify attribute names. This can be very error-prone, slow, and difficult to understand/configure/maintain.
As an alternative, we should allow specify an EL Expression to be used. Any attribute that matches the Expression would be removed.
For example, if the value of the new property were set to `${attribute.name:in( 'ABC', 'XYZ' )}` then the attributes 'ABC' and 'XYZ' would be removed (if they exist).
The Expression should also be provided access to "attribute.value": `${attribute.value:contains('SOME VALUE')}`. In this case, any attribute whose value contained the text "SOME VALUE" would be removed from the FlowFile.
Because the existing property name is "Delete Attributes Expression" I would recommend we rename the existing property's Display Name to "Delete Attributes Regex" and then add a new property named "Attribute Removal Expression".