VI Execrows Output Object
The Visual Integrator (VI) Execrows output object runs command scripts based on input from the data flow.
NOTE: Since the introduction of DI-Production, DI highly recommends using the Production Execute process node instead of the VI Execrows output object. For more information, see Execute Process Node.
The Execrows output object has four panes where you set attributes.
You set attributes for the Execrows output object in the object attributes pane.
Attribute | Description |
---|---|
Input |
Defines the object from which the data flow arrives. Use one of the following methods to attach the Execrows object to an input data flow object:
|
Output_File |
Specifies the output file to receive the output of each command. If not specified, the output is written to the VI logs tab. |
Append_Output |
Specifies to either append or clear the output file for each run.
|
Echo |
Specifies whether or not commands are printed to the VI standard output as they run.
|
Chdir |
Specifies a working directory for the commands run. If not specified, the commands are run using the VI working directory. |
Add_Environment | Specifies new or updated environment variables to set before running the given commands. Click on the ellipses to open a list editor. This attribute is an array of strings of the format "environment variable=environment value". Existing environment variables that are not listed are not changed and are passed to the commands. (Available as of |
Error_Command |
Specifies an executable command to run when errors occur while running other commands. |
Each object has an area where you can enter comments.
It is a DI best practice to enter a note for every object in a VI script. You can set a VI preference to give a warning for each object without a note.
Enter commands for the Execrows output object in the commands grid.
Specify one or more commands for the Execrows object to run. The commands run sequentially. The Execrows object waits for all background processes to complete before finishing. If an error occurs, the executable command specified by the Error_Command attribute runs.
Keep the following in mind:
- Before running the command for a row, VI substitutes Execrows column parameters with the corresponding column values. An Execrows column parameter consists of a dollar sign ($) followed by a column name consisting of alphanumeric characters and underscores. To accommodate non-alphanumeric column names and to allow alphanumeric strings to immediately follow the parameter, the column name can also be enclosed in parentheses following the dollar sign ($). A dollar sign ($) can be included in the command strings by using two dollar signs ($$).
- Place a dash (-) in front of a command string to ignore errors.
- Place an ampersand (&) in front of a command to run that command as a background process, allowing the object to continue on to the next command (regardless of row) before the background process completes.
- Use the redirection character (>) to direct the output of the command to a file. Supply the file name after the redirection character. The redirection-and-append option (>>) is also supported.
- When running commands in Linux/UNIX using Execrows, note that some characters, such as the dollar sign ($) have special meanings. Enclose text containing the special character in single quotation marks to prevent the special character interpretation.
The Execrows object's column grid displays the input columns it is to process.
Attribute | Description |
---|---|
Input | Displays the name of each input column. This attribute is read-only. |
Source Object |
Displays the name and object type of the source object. Double-click the Source Object for a column to change the task flow focus to that object. |