Skip to main content

SplitRecord

Description

Splits up an input FlowFile that is in a record-oriented data format into multiple smaller FlowFiles

Tags

avro, csv, freeform, generic, json, log, logs, schema, split, text

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 NameAPI NameDefault ValueAllowable ValuesDescription
Record Reader *Record ReaderController Service:
RecordReaderFactory

Implementations:
AvroReader
CEFReader
CSVReader
ExcelReader
GrokReader
JsonPathReader
JsonTreeReader
ReaderLookup
ScriptedReader
Syslog5424Reader
SyslogReader
WindowsEventLogReader
XMLReader
YamlTreeReader
Specifies the Controller Service to use for reading incoming data
Record Writer *Record WriterController Service:
RecordSetWriterFactory

Implementations:
AvroRecordSetWriter
CSVRecordSetWriter
FreeFormTextRecordSetWriter
JsonRecordSetWriter
RecordSetWriterLookup
ScriptedRecordSetWriter
XMLRecordSetWriter
Specifies the Controller Service to use for writing out the records
Records Per Split *Records Per SplitSpecifies how many records should be written to each 'split' or 'segment' FlowFile

Supports Expression Language, using FlowFile attributes and Environment variables.

Dynamic Properties

This component does not support dynamic properties.

Relationships

NameDescription
failureIf a FlowFile cannot be transformed from the configured input format to the configured output format, the unchanged FlowFile will be routed to this relationship.
originalUpon successfully splitting an input FlowFile, the original FlowFile will be sent to this relationship.
splitsThe individual 'segments' of the original FlowFile will be routed to this relationship.

Reads Attributes

This processor does not read attributes.

Writes Attributes

NameDescription
fragment.countThe number of split FlowFiles generated from the parent FlowFile
fragment.identifierAll split FlowFiles produced from the same parent FlowFile will have the same randomly generated UUID added for this attribute
fragment.indexA one-up number that indicates the ordering of the split FlowFiles that were created from a single parent FlowFile
mime.typeSets the mime.type attribute to the MIME Type specified by the Record Writer for the FlowFiles routed to the 'splits' Relationship.
record.countThe number of records in the FlowFile. This is added to FlowFiles that are routed to the 'splits' Relationship.
segment.original.filenameThe filename of the parent FlowFile

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.

See Also