Oracle Database Delete

Use this activity to run an SQL DELETE on the Oracle database connection. The Oracle database deletes activity returns information in the form of rows affected.

Settings

The Settings tab has the following fields:

Field Description
Oracle Database Connection Name of the Oracle Database connection from which to retrieve information. You can select the connection from the Oracle Database Connection list.
Schema

Enter the appropriate schema from the Oracle Database.

Input Settings

The Input Settings tab has the following fields:

Field Description
Delete Statement

An SQL statement used to delete records from a table. You construct prepared SQL queries by using substitution variables (or parameters) of the form ? in the delete statement.

As you begin typing a query, the auto-suggest dropdown menu displays relevant keywords, table names, and column names that you can select from. To choose a column name from the dropdown menu, first type the table name followed by a period (.), which shows the list of available column names for that table.

If you are unfamiliar with the tables present in the database schema, press the CTRL + space key in the query editor to obtain auto-suggestion of all the tables and keywords present in the database schema.

Each substitution variable identifies an input parameter whose mapped value is substituted in the substitution variable at runtime. The user can reuse the substitution variable for the same input parameter elsewhere in the delete query.

The type of the input parameters used in the WHERE clause is fetched from the database using the selected Oracle database connection for the entered delete query. Input and output fields in the Input and Output tabs of the activity are also populated based on the SQL DELETE statement.

Be sure to include the semicolon (;) at the end of the query. This activity expects a 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 being unresponsive.

Examples of DELETE query:

  • DELETE from SYSTEM.employee where name = ?name;
    For the above delete query, the output field is generated for id (NUMBER) 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.
  • Delete from SYSTEM.employee;
    For the above delete query, no output and input would be generated, as where a clause is not present.
  • Call Procedure and Call Functions Syntax:
    • With no parameters
      Exec Procedure_Name;
      
      Select Function_Name( );
      
      
    • With prepared parameters
      Exec  Procedure_Name @procedure_variable = ?param1;
      
      Select Function_Name(?Param1, ?Param2);
      
      
Manually Configure Metadata Set the Manually Configure Metadata field to True to fetch table metadata manually. For more information, see Using Manually Configure Metadata Option.
Note: Schema retrieval may fail if nonstandard SQL is used.
Table Schema Displays the metadata of the SQL delete statement. You can modify the column metadata if Manually Configure Metadata is set to True.
Note: Ensure that the metadata you modify agrees with the query added.

Input

The Input tab displays the input schema of the activity as a tree structure. The schema varies according to the object that you selected on the Input Settings tab. You can provide the input values in the Flogo connector for Oracle Database mapping input fields directly or use the Mapper to map the input values to a field from the output of a preceding activity in the flow.

Output

The Output tab displays the output schema of the activity as a tree structure. The output is read-only. 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.