This processor merges a group of FlowFiles together into a "Bundle" based on a user-defined strategy and packages them into a single FlowFile. It is recommended that the processor be configured with only a single incoming connection, as groups of FlowFiles will not be created from FlowFiles in different connections. This processor updates the mime.type attribute as appropriate. After files have been merged by this processor, they can be unpackaged later using the UnpackContent processor.
Uses Attributes:
Attribute Name | Description |
---|---|
fragment.identifier | Applicable only if the <Merge Strategy> property is set to Defragment .
All FlowFiles with the same value for this attribute will be bundled together.
|
fragment.index | Applicable only if the <Merge Strategy> property is set to Defragment .
This attribute must be present on all FlowFiles with the same value for the fragment.identifier
attribute and must be a unique integer between 0 and the value of the fragment.count attribute.
This attribute indicates the order in which the fragments should be assembled.
|
fragment.count | Applicable only if the <Merge Strategy> property is set to Defragment .
This attribute must be present on all FlowFiles with the same value for the fragment.identifier
attribute. All FlowFiles in the same bundle must have the same value for this attribute. The value of
this attribute indicates how many FlowFiles should be expected in the given bundle.
|
segment.original.filename | Applicable only if the <Merge Strategy> property is set to Defragment .
This attribute must be present on all FlowFiles with the same value for the fragment.identifier
attribute. All FlowFiles in the same bundle must have the same value for this attribute. The value of
this attribute will be used for the filename of the completed merged FlowFile.
|
tar.permissions | Applicable only if the <Merge Format> property is set to TAR .
The value of this attribute must be 3 characters; each character must be in the range 0 to 7 (inclusive)
and indicates the file permissions that should be used for the FlowFile's TAR entry. If this attribute
is missing or has an invalid value, the default value of 644 will be used.
|
Modifies Attributes:
Attribute Name | Description |
---|---|
filename | When more than 1 file is merged, the filename comes from the segment.original.filename attribute.
If that attribute does not exist in the source FlowFiles, then the filename is set to the number of
nanoseconds matching system time. Then a filename extension may be applied:
|
merge.count | The number of FlowFiles that were merged into this bundle. |
merge.bin.age | The age of the bin, in milliseconds, when it was merged and output. Effectively this is the greatest amount of time that any FlowFile in this bundle remained waiting in this processor before it was output. |
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.
fragment.count
attribute of the
FlowFiles.true
,
the FlowFiles' paths will determine the folder in the TAR file
where the FlowFile's content will be stored. Otherwise, all
FlowFiles' content will be stored in the TAR file's root
directory. If a FlowFile that is to be bundled has an attribute
with the name tar.permissions
and that attribute's
value is a 3-digit number (with each number in the range of 0-7),
the value will be applied as the File Permissions for that TAR
entry.true
,
the FlowFiles' paths will determine the folder in the ZIP file
where the FlowFile's content will be stored. Otherwise, all
FlowFiles' content will be stored in the ZIP file's root
directory. The <Compression Level> property can be used to
determine the Compression Level to use, from 0 (no compression)
to 9 (highest compression).Relationships: