Executes an external command on the contents of a flow file, and creates a new flow file with the results of the command.
command execution, command, stream, execute
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, and whether a property supports the NiFi Expression Language.
Name | Default Value | Allowable Values | Description |
---|---|---|---|
Command Arguments | The arguments to supply to the executable delimited by the ';' character. Supports Expression Language: true | ||
Command Path | Specifies the command to be executed; if just the name of an executable is provided, it must be in the user's environment PATH. Supports Expression Language: true | ||
Ignore STDIN | false |
| If true, the contents of the incoming flowfile will not be passed to the executing command |
Working Directory | The directory to use as the current working directory when executing the command Supports Expression Language: true | ||
Argument Delimiter | ; | Delimiter to use to separate arguments for a command [default: ;]. Must be a single character | |
Output Destination Attribute | If set, the output of the stream command will be put into an attribute of the original FlowFile instead of a separate FlowFile. There will no longer be a relationship for 'output stream'. The value of this property will be the key for the output attribute. | ||
Max Attribute Length | 256 | If routing the output of the stream command to an attribute, the number of characters put to the attribute value will be at most this amount. This is important because attributes are held in memory and large attributes will quickly cause out of memory issues. If the output goes longer than this value, it will truncated to fit. Consider making this smaller if able. |
Dynamic Properties allow the user to specify both the name and value of a property.
Name | Value | Description |
---|---|---|
An environment variable name | An environment variable value | These environment variables are passed to the process spawned by this Processor |
Name | Description |
---|---|
original | FlowFiles that were successfully processed |
output stream | The destination path for the flow file created from the command's output |
Name | Description |
---|---|
execution.command | The name of the command executed |
execution.command.args | The semi-colon delimited list of arguments |
execution.status | The exit status code returned from executing the command |
execution.error | Any error messages returned from executing the command |