Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-7156

UpdateAttribute should allow Expression Language to be used for selecting which attributes to remove

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Extensions
    • 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".

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            markap14 Mark Payne
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: