blob: b49500ee1ce15bd65dd14c4fa9889d6d04be84f9 [file] [log] [blame]
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"></meta><title>RouteText</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;">RouteText</h1><h2>Description: </h2><p>Routes textual data based on a set of user-defined rules. Each line in an incoming FlowFile is compared against the values specified by user-defined Properties. The mechanism by which the text is compared to these user-defined properties is defined by the 'Matching Strategy'. The data is then routed according to these rules, routing each line of the text individually.</p><h3>Tags: </h3><p>attributes, routing, text, regexp, regex, Regular Expression, Expression Language, csv, filter, logs, delimited, find, string, search, filter, detect</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.</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>Routing Strategy</strong></td><td>Routing Strategy</td><td id="default-value">Route to each matching Property Name</td><td id="allowable-values"><ul><li>Route to each matching Property Name <img src="../../../../../html/images/iconInfo.png" alt="Lines will be routed to each relationship whose corresponding expression evaluates to 'true'" title="Lines will be routed to each relationship whose corresponding expression evaluates to 'true'"></img></li><li>Route to 'matched' if line matches all conditions <img src="../../../../../html/images/iconInfo.png" alt="Requires that all user-defined expressions evaluate to 'true' for the line to be considered a match" title="Requires that all user-defined expressions evaluate to 'true' for the line to be considered a match"></img></li><li>Route to 'matched' if lines matches any condition <img src="../../../../../html/images/iconInfo.png" alt="Requires that at least one user-defined expression evaluate to 'true' for the line to be considered a match" title="Requires that at least one user-defined expression evaluate to 'true' for the line to be considered a match"></img></li></ul></td><td id="description">Specifies how to determine which Relationship(s) to use when evaluating the lines of incoming text against the 'Matching Strategy' and user-defined properties.</td></tr><tr><td id="name"><strong>Matching Strategy</strong></td><td>Matching Strategy</td><td></td><td id="allowable-values"><ul><li>Satisfies Expression <img src="../../../../../html/images/iconInfo.png" alt="Match lines based on whether or not the the text satisfies the given Expression Language expression. I.e., the line will match if the property value, evaluated as an Expression, returns true. The expression is able to reference FlowFile Attributes, as well as the variables 'line' (which is the text of the line to evaluate) and 'lineNo' (which is the line number being evaluated. This will be 1 for the first line, 2 for the second and so on)." title="Match lines based on whether or not the the text satisfies the given Expression Language expression. I.e., the line will match if the property value, evaluated as an Expression, returns true. The expression is able to reference FlowFile Attributes, as well as the variables 'line' (which is the text of the line to evaluate) and 'lineNo' (which is the line number being evaluated. This will be 1 for the first line, 2 for the second and so on)."></img></li><li>Starts With <img src="../../../../../html/images/iconInfo.png" alt="Match lines based on whether the line starts with the property value" title="Match lines based on whether the line starts with the property value"></img></li><li>Ends With <img src="../../../../../html/images/iconInfo.png" alt="Match lines based on whether the line ends with the property value" title="Match lines based on whether the line ends with the property value"></img></li><li>Contains <img src="../../../../../html/images/iconInfo.png" alt="Match lines based on whether the line contains the property value" title="Match lines based on whether the line contains the property value"></img></li><li>Equals <img src="../../../../../html/images/iconInfo.png" alt="Match lines based on whether the line equals the property value" title="Match lines based on whether the line equals the property value"></img></li><li>Matches Regular Expression <img src="../../../../../html/images/iconInfo.png" alt="Match lines based on whether the line exactly matches the Regular Expression that is provided as the Property value" title="Match lines based on whether the line exactly matches the Regular Expression that is provided as the Property value"></img></li><li>Contains Regular Expression <img src="../../../../../html/images/iconInfo.png" alt="Match lines based on whether the line contains some text that matches the Regular Expression that is provided as the Property value" title="Match lines based on whether the line contains some text that matches the Regular Expression that is provided as the Property value"></img></li></ul></td><td id="description">Specifies how to evaluate each line of incoming text against the user-defined properties.</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 incoming text is encoded</td></tr><tr><td id="name"><strong>Ignore Leading/Trailing Whitespace</strong></td><td>Ignore Leading/Trailing Whitespace</td><td id="default-value">true</td><td id="allowable-values"></td><td id="description">Indicates whether or not the whitespace at the beginning and end of the lines should be ignored when evaluating the line.</td></tr><tr><td id="name"><strong>Ignore Case</strong></td><td>Ignore Case</td><td id="default-value">false</td><td id="allowable-values"><ul><li>true</li><li>false</li></ul></td><td id="description">If true, capitalization will not be taken into account when comparing values. E.g., matching against 'HELLO' or 'hello' will have the same result. This property is ignored if the 'Matching Strategy' is set to 'Satisfies Expression'.</td></tr><tr><td id="name">Grouping Regular Expression</td><td>Grouping Regular Expression</td><td></td><td id="allowable-values"></td><td id="description">Specifies a Regular Expression to evaluate against each line to determine which Group the line should be placed in. The Regular Expression must have at least one Capturing Group that defines the line's Group. If multiple Capturing Groups exist in the Regular Expression, the values from all Capturing Groups will be concatenated together. Two lines will not be placed into the same FlowFile unless they both have the same value for the Group (or neither line matches the Regular Expression). For example, to group together all lines in a CSV File by the first column, we can set this value to "(.*?),.*". Two lines that have the same Group but different Relationships will never be placed into the same FlowFile.</td></tr></table><h3>Dynamic Properties: </h3><p>Supports Sensitive Dynamic Properties: <strong>No</strong></p><p>Dynamic Properties allow the user to specify both the name and value of a property.<table id="dynamic-properties"><tr><th>Name</th><th>Value</th><th>Description</th></tr><tr><td id="name">Relationship Name</td><td id="value">value to match against</td><td>Routes data that matches the value specified in the Dynamic Property Value to the Relationship specified in the Dynamic Property Key.<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr></table></p><h3>Relationships: </h3><table id="relationships"><tr><th>Name</th><th>Description</th></tr><tr><td>original</td><td>The original input file will be routed to this destination when the lines have been successfully routed to 1 or more relationships</td></tr><tr><td>unmatched</td><td>Data that does not satisfy the required user-defined rules will be routed to this Relationship</td></tr></table><h3>Dynamic Relationships: </h3><p>A Dynamic Relationship may be created based on how the user configures the Processor.<table id="dynamic-relationships"><tr><th>Name</th><th>Description</th></tr><tr><td>Name from Dynamic Property</td><td>FlowFiles that match the Dynamic Property's value</td></tr></table></p><h3>Reads Attributes: </h3>None specified.<h3>Writes Attributes: </h3><table id="writes-attributes"><tr><th>Name</th><th>Description</th></tr><tr><td>RouteText.Route</td><td>The name of the relationship to which the FlowFile was routed.</td></tr><tr><td>RouteText.Group</td><td>The value captured by all capturing groups in the 'Grouping Regular Expression' property. If this property is not set or contains no capturing groups, this attribute will not be added.</td></tr></table><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>