This functionality is only available for the self-hosted and selected customers on dedicated instances. Customers on dedicated instances please contact Etlworks support for more details. Customers on self-hosted instances please read how to enable the command line script flow.
When to use this Flow type
This flow facilitates the execution of a shell script on a host OS running Etlworks instance. The command line interpreter used for executing the script depends on the operating system of the host OS. Typically, sh
or bash
is used for Linux systems, while cmd
is used for Windows systems.
Typical use cases:
- Running Python programs using the Python installed in the host computer.
- Accessing resources not available from Etlworks sandbox.
Also read about executing script in the remote host using SSH connection.
Create Flow
Step 1. Start creating a Flow
by typing command line
into the Select Flow Type
box. Select Execute command line line script in the host OS
.
Step 2. Continue by entering the script code in Command Line Script
field in the Parameters
tab.
Step 3. Enter other parameters if needed (optional):
Success mask
: enter string or a part of the string which, if found, will indicate that the Flow executed successfully.Error mask
: enter string or a part of the string which, if found, will indicate that the Flow executed with error.Keep log
: if option is selected (default), the system will add the log produced by executing the script to the Flow log.Script
: the JavaScript or Python program that will be executed before executing a command-line script. You can use it to set the global variables that can be referenced as{parameters}
in the command line script. You can also use it to conditionally disable the command-line script Flow.On Exception
: by default, any error causes a halt of execution. Whenignore
is selected, the errors will be ignored and execution will continue. Read how to configure the Flow to ignore all or specific exceptions.Exception Mask
: you can specify what errors should be ignored and still halt the execution for all other errors. Enter part or all of the exception string. This field works only when theIgnore On Exception
option is selected.Execute if Error
: if this option is selected and an error occurs, Etlworks will execute this script code.
Step 4. Optionally enter flow variables as key-value pairs.
The flow variables can be referenced as {VAR_NAME}
anywhere in the command line script.
Enable command-line script flow
Self-hosted customers can enable the command-line script flow without contacting Etlworks support. Here are the steps:
Step 1. Navigate to to root folder where the Etlworks is installed: TOMCAT_HOME
.
Step 2. cd TOMCAT_HOME/conf
.
Step 3. Open TOMCAT_HOME/conf/application.properties
file in any text editor.
Step 4. Add the following line anywhere in the file:
If this line already exists make sure the value is set to true
.
Step 5. Save the file and restart the Etlworks service:
Comments
0 comments
Please sign in to leave a comment.