Mark Payne created NIFI-7156:
--------------------------------
Summary: UpdateAttribute should allow Expression Language to be
used for selecting which attributes to remove
Key: NIFI-7156
URL: https://issues.apache.org/jira/browse/NIFI-7156
Project: Apache NiFi
Issue Type: Improvement
Components: Extensions
Reporter: Mark Payne
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".
--
This message was sent by Atlassian Jira
(v8.3.4#803005)