GenerateFlowFile 2.2.0

Bundle
org.apache.nifi | nifi-standard-nar
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
Input Requirement
FORBIDDEN
Supports Sensitive Dynamic Properties
false
  • Additional Details for GenerateFlowFile 2.2.0

    GenerateFlowFile

    This processor can be configured to generate variable-sized FlowFiles. The File Size property accepts both a literal value, e.g. “1 KB”, and Expression Language statements. In order to create FlowFiles of variable sizes, the Expression Language function random() can be used. For example, ${random():mod(101)} will generate values between 0 and 100, inclusive. A data size label, e.g. B, KB, MB, etc., must be included in the Expression Language statement since the File Size property holds a data size value. The table below shows some examples.

    File Size Expression Language Statement File Sizes Generated (values are inclusive)
    ${random():mod(101)}b 0 - 100 bytes
    ${random():mod(101)}mb 0 - 100 MB
    ${random():mod(101):plus(20)} B 20 - 120 bytes
    ${random():mod(71):plus(30):append(“KB”)} 30 - 100 KB

    See the Expression Language Guide for more details on the random() function.

Properties
Dynamic Properties
Relationships
Name Description
success
Writes Attributes
Name Description
mime.type Sets the MIME type of the output if the 'Mime Type' property is set