Description:
This processor splits a text file into multiple smaller text files on line boundaries, each having up to a configured number of lines.
Modifies Attributes:
| Attribute Name |
Description |
| text.line.count |
The number of lines of text from the original FlowFile that were copied to this FlowFile. |
| fragment.identifier |
All split FlowFiles produced from the same parent FlowFile will have the same randomly generated
UUID added for this attribute. |
| fragment.index |
A one-up number that indicates the ordering of the split FlowFiles that were created from a
single parent FlowFile. |
| fragment.count |
The number of split FlowFiles generated from the parent FlowFile. |
| segment.original.filename |
The filename of the parent FlowFile.
|
Properties:
In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. If a property has a default value, it is indicated. If a property supports the use of the NiFi Expression Language (or simply, "expression language"), that is also indicated.
- Line Split Count
- The number of lines to be included in each split file. The value must be a non-negative integer.
- Default value: no default
- Supports expression language: false
- Header Line Count
- The number of lines that should be considered part of a header on each split file.
- Default value: 0
- Supports expression language: false
- Remove Trailing Newlines
- Whether to remove newlines at the end of each split file. This should be false if you intend to merge the split files later.
- Default value: true
- Supports expression language: false
Relationships:
- failure
- If FlowFiles cannot be split for some reason, the original file follows this relationship and does not follow the original relationship.
- original
- If FlowFiles are successfully split into one or more files, a copy of the original file follows this relationship.
- splits
- If FlowFiles are successfully split into one or more files, those split files follow this relationship.
See Also:
- MergeContent - can defragment FlowFiles
that have been split if Remove Trailing Newlines is set to false and Header Line Count is set to 0.