ExecuteProcess 2025.10.9.21

Bundle

org.apache.nifi | nifi-standard-nar

Description

Runs an operating system command specified by the user and writes the output of that command to a FlowFile. If the command is expected to be long-running, the Processor can output the partial data on a specified interval. When this option is used, the output is expected to be in textual format, as it typically does not make sense to split binary data on arbitrary time-based intervals.

Tags

command, external, invoke, process, script, source

Input Requirement

FORBIDDEN

Supports Sensitive Dynamic Properties

false

Properties

PropertyDescription
Argument DelimiterDelimiter to use to separate arguments for a command [default: space]. Must be a single character.
Batch DurationIf the process is expected to be long-running and produce textual output, a batch duration can be specified so that the output will be captured for this amount of time and a FlowFile will then be sent out with the results and a new FlowFile will be started, rather than waiting for the process to finish before sending out the results
CommandSpecifies the command to be executed; if just the name of an executable is provided, it must be in the user’s environment PATH.
Command ArgumentsThe arguments to supply to the executable delimited by white space. White space can be escaped by enclosing it in double-quotes.
Output MIME typeSpecifies the value to set for the “mime.type” attribute. This property is ignored if ‘Batch Duration’ is set.
Redirect Error StreamIf true will redirect any error stream output of the process to the output stream. This is particularly helpful for processes which write extensively to the error stream or for troubleshooting.
Working DirectoryThe directory to use as the current working directory when executing the command

Restrictions

Required PermissionExplanation
execute codeProvides operator the ability to execute arbitrary code assuming all permissions that NiFi has.

Relationships

NameDescription
successAll created FlowFiles are routed to this relationship

Writes attributes

NameDescription
commandExecuted command
command.argumentsArguments of the command
mime.typeSets the MIME type of the output if the ‘Output MIME Type’ property is set and ‘Batch Duration’ is not set