Description:

Splits incoming FlowFiles by a specified byte sequence

Tags:

content, split, binary

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
Byte Sequence Format Hexadecimal *Hexadecimal
*Text
Specifies how the <Byte Sequence> property should be interpreted
Byte Sequence A representation of bytes to look for and upon which to split the source file into separate files
Keep Byte Sequence false *true
*false
Determines whether or not the Byte Sequence should be included with each Split
Byte Sequence Location Trailing *Trailing
*Leading
If <Keep Byte Sequence> is set to true, specifies whether the byte sequence should be added to the end of the first split or the beginning of the second; if <Keep Byte Sequence> is false, this property is ignored.

Relationships:

Name Description
original The original file
splits All Splits will be routed to the splits relationship

Reads Attributes:

None specified.

Writes Attributes:

Name Description
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

How to configure?

Step 1: Drag and drop the SplitContent processor to canvas.

Step 2: Double click the processor to configure, the configuration dialog will be opened as follows,

properties

Step 3: Check the usage of each property and update those values.

Properties and usage

Byte Sequence Format: Enters the format of the byte sequence.

Byte Sequence: Enters the bytes to be used while splitting the source file into separate files.

Keep Byte Sequence: Specifies whether include byte sequence with each split.

  • True
  • false

Byte Sequence Location: If Keep Byte Sequence is set to true, specifies whether the byte sequence should be added to the end of the first split or the beginning of the second split.

For example, To split date and time from csv file you should follow the below configuration,

Sample

Incident Id

Created on

17024 1/7/2018 23:55
18301 1/2/2018 23:16

Byte Sequence Format: Hexadecimal

Byte Sequence: 20

Here byte sequence is configured using Hexadecimal. You can change it to text and mention byte sequence as space to achieve the same result.

sample

See Also:

MergeContent