Skip to main content

GenerateFlowFile

Description

This processor creates FlowFiles with random data or custom content. GenerateFlowFile is useful for load testing, configuration, and simulation. Also see DuplicateFlowFile for additional load testing.

Tags

generate, load, random, test

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
File Size *File Size0BThe size of the file that will be used
Batch Size *Batch Size1The number of FlowFiles to be transferred in each invocation
Data Format *Data FormatText
  • Binary
  • Text
Specifies whether the data should be Text or Binary
Unique FlowFiles *Unique FlowFilesfalse
  • true
  • false
If true, each FlowFile that is generated will be unique. If false, a random value will be generated and all FlowFiles will get the same content but this offers much higher throughput
Custom Textgenerate-ff-custom-textIf Data Format is text and if Unique FlowFiles is false, then this custom text will be used as content of the generated FlowFiles and the File Size will be ignored. Finally, if Expression Language is used, evaluation will be performed only once per batch of generated FlowFiles

Supports Expression Language, using Environment variables.
Character Set *character-setUTF-8Specifies the character set to use when writing the bytes of Custom Text to a flow file.
Mime Typemime-typeSpecifies the value to set for the "mime.type" attribute.

Dynamic Properties

NameValueDescription
Generated FlowFile attribute nameGenerated FlowFile attribute valueSpecifies an attribute on generated FlowFiles defined by the Dynamic Property's key and value. If Expression Language is used, evaluation will be performed only once per batch of generated FlowFiles.

Supports Expression Language: Yes, evaluated using Environment variables.

Relationships

NameDescription
success

Reads Attributes

This processor does not read attributes.

Writes Attributes

NameDescription
mime.typeSets the MIME type of the output if the 'Mime Type' property is set

State Management

This component does not store state.

Restricted

This component is not restricted.

Input Requirement

This component does not allow an incoming relationship.

System Resource Considerations

This component does not specify system resource considerations.

See Also