SegmentContent

Description:

Segments a FlowFile into multiple smaller segments on byte boundaries. Each segment is given the following attributes: fragment.identifier, fragment.index, fragment.count, segment.original.filename; these attributes can then be used by the MergeContent processor in order to reconstitute the original FlowFile

Tags:

segment, split

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, and whether a property supports the NiFi Expression Language.

Display NameAPI NameDefault ValueAllowable ValuesDescription
Segment SizeSegment SizeThe maximum data size in bytes for each segment
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)

Relationships:

NameDescription
segmentsAll segments will be sent to this relationship. If the file was small enough that it was not segmented, a copy of the original is sent to this relationship as well as original
originalThe original FlowFile will be sent to this relationship

Reads Attributes:

None specified.

Writes Attributes:

NameDescription
segment.identifierAll segments produced from the same parent FlowFile will have the same randomly generated UUID added for this attribute. This attribute is added to maintain backward compatibility, but the fragment.identifier is preferred, as it is designed to work in conjunction with the MergeContent Processor
segment.indexA one-up number that indicates the ordering of the segments that were created from a single parent FlowFile. This attribute is added to maintain backward compatibility, but the fragment.index is preferred, as it is designed to work in conjunction with the MergeContent Processor
segment.countThe number of segments generated from the parent FlowFile. This attribute is added to maintain backward compatibility, but the fragment.count is preferred, as it is designed to work in conjunction with the MergeContent Processor
fragment.identifierAll segments 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 segments that were created from a single parent FlowFile
fragment.countThe number of segments generated from the parent FlowFile
segment.original.filename The filename of the parent FlowFile
segment.original.filename The filename will be updated to include the parent's filename, the segment index, and the segment count

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:

None specified.

See Also:

MergeContent