ReplaceTextWithMapping
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
Change, Mapping, Modify, Regex, Regular Expression, Replace, Text, Update
Properties
In the list below required Properties are shown with an asterisk (*). Other properties are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.
Display Name | API Name | Default Value | Allowable Values | Description |
---|---|---|---|---|
Regular Expression * | Regular Expression | \S+ | The Regular Expression to search for in the FlowFile content Supports Expression Language, using FlowFile attributes and Environment variables. | |
Matching Group * | Matching Group | 0 | The number of the matching group of the provided regex to replace with the corresponding value from the mapping file (if it exists). Supports Expression Language, using Environment variables. | |
Mapping File * | Mapping File | The name of the file (including the full path) containing the Mappings. | ||
Mapping File Refresh Interval * | Mapping File Refresh Interval | 60s | The polling interval to check for updates to the mapping file. The default is 60s. | |
Character Set * | Character Set | UTF-8 | The Character Set in which the file is encoded | |
Maximum Buffer Size * | Maximum Buffer Size | 1 MB | Specifies 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' |
Dynamic Properties
This component does not support dynamic properties.
Relationships
Name | Description |
---|---|
failure | FlowFiles that could not be updated are routed to this relationship |
success | FlowFiles that have been successfully updated are routed to this relationship, as well as FlowFiles whose content does not match the given Regular Expression |
Reads Attributes
This processor does not read attributes.
Writes Attributes
This processor does not write attributes.
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
This component does not specify system resource considerations.