Description:

Updates the content of a FlowFile by evaluating a Regular Expression against it and replacing the section of the content that matches the Regular Expression with some alternate value provided in a mapping file.

Tags: Text, Regular Expression, Update, Change, Replace, Modify, Regex, Mapping

Properties:

In the list below, the names of required properties appear in bold. Anyother properties (not in bold) are considered optional. The table also indicates any default values, whether a property supports the NiFi Expression Language (or simply EL), and whether a property is considered "sensitive", meaning that its value will be encrypted. Before entering a value in a sensitive property, ensure that the nifi.properties file has an entry for the property nifi.sensitive.props.key.

NameDescriptionDefault ValueValid ValuesELSensitive
Regular ExpressionThe Regular Expression to search for in the FlowFile content\S+YesNo
Matching GroupThe number of the matching group of the provided regex to replace with the corresponding value from the mapping file (if it exists).0YesNo
Mapping FileThe name of the file (including the full path) containing the Mappings.NoNo
Mapping File Refresh IntervalThe polling interval in seconds to check for updates to the mapping file. The default is 60s.60sNoNo
Character SetThe Character Set in which the file is encodedUTF-8NoNo
Maximum Buffer SizeSpecifies the maximum amount of data to buffer (per file) in order to apply the regular expressions. If a FlowFile is larger than this value, the FlowFile will be routed to 'failure'1 MBNoNo

Relationships:

NameDescription
failureFlowFiles that could not be updated are routed to this relationship
successFlowFiles that have been successfully updated are routed to this relationship, as well as FlowFiles whose content does not match the given Regular Expression