PostgreSQL Delete

Use this activity to execute an SQL Delete to delete the record and return the information based on the returning clause specified in the delete query.

Settings

The Settings tab has the following fields:

Field Description
Connection Name of the PostgreSQL database connection from which to retrieve information. You can select the connection from the drop-down list.

Input Settings

The Input Settings tab has the following fields:

Field Description
Delete An SQL statement used to delete the record from the table. You can construct prepared SQL queries by using substitution variables (or parameters) of the form ?<fieldname> in the query statement.
Each substitution variable identifies an input parameter whose mapped value will be substituted into the substitution variable at runtime. You can reuse the substitution variable for the same input parameter elsewhere in the delete query. The type information for the input parameters used in the WHERE and RETURNING clause, is fetched from the database using the selected connection for the entered delete query. Also, output parameters used in the RETURNING clause and their corresponding type information is automatically fetched from the database using the selected connection for the entered delete query. Similarly, input and output fields in the Input and Output tabs of the activity are also automatically generated.
Note: Be sure to include the semicolon (;) at the end of a query. This activity expects a delete query to end with a semicolon to indicate the end of the query. A missing semicolon at the end of the query results in the query hanging.

The following example represents a typical delete query:

Delete from student where name = ?name returning id;

For the above delete query, output field is generated for id from the returning clause and input field is generated for name (VARCHAR). Also the mapped value for the field name is substituted into the substitution variable ?name.

Fields The grid is provided for informational purposes only.

Input

This tab displays the input schema of the activity as a tree structure. The information in the schema varies based on the delete query provided. The fields that were selected in the Input Settings tab will be available in the schema. You can either hard code the values or map them to a field from the output of a preceding activity in the flow using the Mapper.

Output

This tab displays the output schema of the activity as a tree structure. The output is read-only. The information in the schema varies based on the fields selected on the Settings tab. The properties that are displayed in the schema correspond to the output of this activity and can be used as input by subsequent activities in the flow.