blob: b3436b2545838a77534eb422a6ac2142ac7d6923 [file] [log] [blame]
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"></meta><title>ReplaceTextWithMapping</title><link rel="stylesheet" href="../../../../../css/component-usage.css" type="text/css"></link></head><script type="text/javascript">window.onload = function(){if(self==top) { document.getElementById('nameHeader').style.display = "inherit"; } }</script><body><h1 id="nameHeader" style="display: none;">ReplaceTextWithMapping</h1><h2>Description: </h2><p>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.</p><h3>Tags: </h3><p>Text, Regular Expression, Update, Change, Replace, Modify, Regex, Mapping</p><h3>Properties: </h3><p>In the list below, the names of required properties appear in <strong>bold</strong>. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the <a href="../../../../../html/expression-language-guide.html">NiFi Expression Language</a>.</p><table id="properties"><tr><th>Display Name</th><th>API Name</th><th>Default Value</th><th>Allowable Values</th><th>Description</th></tr><tr><td id="name"><strong>Regular Expression</strong></td><td>Regular Expression</td><td id="default-value">\S+</td><td id="allowable-values"></td><td id="description">The Regular Expression to search for in the FlowFile content<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name"><strong>Matching Group</strong></td><td>Matching Group</td><td id="default-value">0</td><td id="allowable-values"></td><td id="description">The number of the matching group of the provided regex to replace with the corresponding value from the mapping file (if it exists).<br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong></td></tr><tr><td id="name"><strong>Mapping File</strong></td><td>Mapping File</td><td></td><td id="allowable-values"></td><td id="description">The name of the file (including the full path) containing the Mappings.<br/><br/><strong>This property requires exactly one file to be provided..</strong><br/></td></tr><tr><td id="name"><strong>Mapping File Refresh Interval</strong></td><td>Mapping File Refresh Interval</td><td id="default-value">60s</td><td id="allowable-values"></td><td id="description">The polling interval in seconds to check for updates to the mapping file. The default is 60s.</td></tr><tr><td id="name"><strong>Character Set</strong></td><td>Character Set</td><td id="default-value">UTF-8</td><td id="allowable-values"></td><td id="description">The Character Set in which the file is encoded</td></tr><tr><td id="name"><strong>Maximum Buffer Size</strong></td><td>Maximum Buffer Size</td><td id="default-value">1 MB</td><td id="allowable-values"></td><td id="description">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'</td></tr></table><h3>Relationships: </h3><table id="relationships"><tr><th>Name</th><th>Description</th></tr><tr><td>success</td><td>FlowFiles that have been successfully updated are routed to this relationship, as well as FlowFiles whose content does not match the given Regular Expression</td></tr><tr><td>failure</td><td>FlowFiles that could not be updated are routed to this relationship</td></tr></table><h3>Reads Attributes: </h3>None specified.<h3>Writes Attributes: </h3>None specified.<h3>State management: </h3>This component does not store state.<h3>Restricted: </h3>This component is not restricted.<h3>Input requirement: </h3>This component requires an incoming relationship.<h3>System Resource Considerations:</h3>None specified.</body></html>