////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at
  http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
////
:documentationPath: /pipeline/transforms/
:language: en_US
:description: The Execute A Process transform executes a shell script (on the host that runs the pipeline). This transform is similar to the Shell workflow action, but can be used in a pipeline to execute for every row.

= image:transforms/icons/execprocess.svg[Execute a process transform Icon, role="image-doc-icon"] Execute a process

[%noheader,cols="3a,1a", role="table-no-borders" ]
|===
|
== Description

The Execute A Process transform executes a shell script (on the host that runs the pipeline).

The transform is similar to the xref:workflow/actions/shell.adoc[Shell] workflow action, but can be used in a pipeline to execute for every row.

|
== Supported Engines
[%noheader,cols="2,1a",frame=none, role="table-supported-engines"]
!===
!Hop Engine! image:check_mark.svg[Supported, 24]
!Spark! image:question_mark.svg[Maybe Supported, 24]
!Flink! image:question_mark.svg[Maybe Supported, 24]
!Dataflow! image:question_mark.svg[Maybe Supported, 24]
!===
|===

== Options

[options="header"]
|===
|Option|Description
|Transform name|Name of the transform; this name has to be unique in a single pipeline
|Process field|The field name in the data stream that defines the process to start (shell script / batch file to start).
Arguments can also be used.
|Fail if not success|Checking this option means if the exit status is different than zero the transform fails.
You can use error handling to get these rows.
|Output line delimiter|Without defining a line delimiter, all returned lines are collapsed into a single string with no line delimiters.
You can set to any line delimiter and special characters can be set with the format $[value], e.g. $[0D] for CR or $[0D,0A] for CR/LF.
|Result fieldname|Specify here the name of the result fieldname (STRING) added to the output stream of the pipeline.
This field is populated by the output stream (stdout) of the process.
|Error fieldname|Specify here the name of the error fieldname (STRING) added to the output stream of the pipeline.
This field is filled by the error stream (stderr) of the process.
|Exit value|Specify here the name of the exit fieldname (INTEGER) added to the output stream of the pipeline.
This field is filled by the exit output of the process.
|===
