Description:

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.

Tags:

attributes, routing, text, regexp, regex, Regular Expression, Expression Language, csv, filter, logs, delimited

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.

Name Default Value Allowable Values Description
Routing Strategy Route to each matching Property Name * Route to each matching Property Name
* Route to 'matched' if line matches all conditions
* Route to 'matched' if lines matches any condition
Specifies how to determine which Relationship(s) to use when evaluating the lines of incoming text against the 'Matching Strategy' and user-defined properties.
Matching Strategy * Satisfies Expression
* Starts With
* Ends With
* Contains
* Equals
* Matches Regular Expression
* Contains Regular Expression
Specifies how to evaluate each line of incoming text against the user-defined properties.
Character Set UTF-8 The Character Set in which the incoming text is encoded
Ignore Leading/Trailing Whitespace true Indicates whether or not the whitespace at the beginning and end of the lines should be ignored when evaluating the line.
Ignore Case false * true
* false
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'.
Grouping Regular Expression 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 Group from all Capturing Groups. Two lines will not be placed into the same FlowFile unless the 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.

Dynamic Properties:

Dynamic Properties allow the user to specify both the name and value of a property.

Name Value Description
Relationship Name value to match against Routes data that matches the value specified in the Dynamic Property Value to the Relationship specified in the Dynamic Property Key.

Relationships:

Name Description
original The original input file will be routed to this destination when the lines have been successfully routed to 1 or more relationships
unmatched Data that does not satisfy the required user-defined rules will be routed to this Relationship

Dynamic Relationships:

A Dynamic Relationship may be created based on how the user configures the Processor.

Name Description
Name from Dynamic Property FlowFiles that match the Dynamic Property's value

Reads Attributes:

None specified.

Writes Attributes:

None specified.