FilterAttribute

Description:

Filters the attributes of a FlowFile by retaining specified attributes and removing the rest or by removing specified attributes and retaining the rest.

Tags:

attributes, modification, filter, retain, remove, delete, regex, regular expression, Attribute Expression Language

Properties:

In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.

Display NameAPI NameDefault ValueAllowable ValuesDescription
Filter ModeFilter ModeRetain
  • Retain Retains only the attributes matching the filter, all other attributes are removed.
  • Remove Removes the attributes matching the filter, all other attributes are retained.
Specifies the strategy to apply on filtered attributes. Either 'Remove' or 'Retain' only the matching attributes.
Attribute Matching StrategyAttribute Matching StrategyEnumerate attributes
  • Enumerate attributes Provides a set of attribute keys to filter for, separated by a comma delimiter ','.
  • Use regular expression Provides a regular expression to match keys of attributes to filter for.
Specifies the strategy to filter attributes by.
Filtered AttributesFiltered AttributesA set of attribute names to filter from FlowFiles. Each attribute name is separated by the comma delimiter ','.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)

This Property is only considered if the [Attribute Matching Strategy] Property has a value of "Enumerate attributes".
Filtered Attributes PatternFiltered Attributes PatternA regular expression to match names of attributes to filter from FlowFiles.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)

This Property is only considered if the [Attribute Matching Strategy] Property has a value of "Use regular expression".

Relationships:

NameDescription
successAll successful FlowFiles are routed to this relationship

Reads Attributes:

None specified.

Writes Attributes:

None specified.

State management:

This component does not store state.

Restricted:

This component is not restricted.

Input requirement:

This component requires an incoming relationship.

System Resource Considerations:

None specified.