To perform structured query language (SQL) operations in a Db2 relational database, add a step that includes an IBM Db2 connection command.
To enable these commands, an IT admin first creates an IBM Db2 connector.
Execute Create
Executes a CREATE
statement
Inputs
Input |
Detail |
SQL Text/File |
Enter the SQL text or file to execute |
Outputs
None
Exit Codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
Invalid inputs were given |
3 |
Error |
Failed to run the command |
Execute Query
Executes a SELECT
query, and receives the results as a comma-separated values (CSV) file
Inputs
Input |
Detail |
SQL Text/File |
Enter the SQL text or file to execute |
Delimiter |
Select the delimiter to use for the CSV file output |
Preview Resultws |
To see a preview of the returned row, check this box |
Outputs
Output |
Output Type |
Record Count |
Integer |
Result Set (CSV) |
File |
Exit Codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
Invalid inputs were given |
3 |
Error |
Failed to run the command |
Execute SQL
Executes any SQL command. If there's a result set, it will be available as a file output.
Inputs
Input |
Detail |
SQL Text/File |
Enter the SQL text or file to execute |
Outputs
Output |
Output Type |
Record Count |
Integer |
Result Set (CSV) |
File |
Records Updated |
Integer |
Exit Codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
Invalid inputs were given |
3 |
Error |
Failed to run the command |
Execute Update
Executes an UPDATE
statement
Inputs
Input |
Detail |
SQL Text/File |
Enter the SQL text or file to execute |
Outputs
Output |
Output Type |
Records Updated |
Integer |
Exit Codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
Invalid inputs were given |
3 |
Error |
Failed to run the command |
Insert Records
Executes an INSERT
statement. The source of the data can be either multi-lined text or a CSV file.
Inputs
Input |
Detail |
Table |
Enter the table to insert records into |
CSV Data Source |
Enter the CSV data to insert into the table. The columns in this data must match the same order specified in the columns input. |
Delimiter |
Select the delimiter used in the CSV Data Source input |
Is a File |
If the CSV Data Source input is a file, check this box |
Includes Headers |
If the first row of the CSV Data Source input is the headers, check this box |
Columns |
Enter the list of columns that the CSV Data Source input will populate. The order is important and must match the CSV Data Source input. |
Value Template |
Enter the custom values declaration for the INSERT command. Indicatre values with ? . The number of ? s should match the number of fields in the target. To auto-generate, leave blank. |
Outputs
Output |
Output Type |
Records Inserted |
Integer |
Exit Codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
Invalid inputs were given |
3 |
Error |
Failed to run the command |