Oracle - Delete

Overview

The Oracle - Delete Snap executes an SQL delete as per the configured properties.



Important: JDBC Driver upgrade and behavior change

The Oracle JDBC Driver is upgraded from OJDBC6 JAR (v11.2.0.4) to OJDBC10 JAR (v19.20.0.0) in the latest distribution in October 2023 and deployed to the stable distribution in the November 2023 release (after the Snaplex upgrade). The latest JDBC driver upgrade is backward-compatible. Learn more: Oracle JDBC driver and JOOQ upgrades.

You can consume this driver upgrade with the 434patches23000 Snap Pack version.

This JDBC driver upgrade has resulted in specific behavior changes that include errors, status codes, and success and failure messages. Learn more about the behavior changes to ensure your migration to the upgraded driver is seamless.

Prerequisites

None.

Snap views

Type Description Examples of upstream and downstream Snaps
Input

This Snap has at most one document input view.

Expected input: The records to be deleted.

Output

This Snap has at most one document output view.

Expected output: If an output view is available, then the original document used to create the statement will be output with the status of the delete executed.

  • N/A
Learn more about Error handling.

Snap settings

Legend:
  • Expression icon (): Allows using pipeline parameters to set field values dynamically (if enabled). SnapLogic Expressions are not supported. If disabled, you can provide a static value.
  • SnapGPT (): Generates SnapLogic Expressions based on natural language using SnapGPT. Learn more.
  • Suggestion icon (): Populates a list of values dynamically based on your Snap configuration. You can select only one attribute at a time using the icon. Type into the field if it supports a comma-separated list of values.
  • Upload : Uploads files. Learn more.
Learn more about the icons in the Snap settings dialog.
Field/Field set Description

Label

String

Required. Specify a unique name for the Snap. Modify this to be more appropriate, especially if more than one of the same Snaps is in the pipeline.

Default value: Oracle Delete

Example: Delete contract emps

Schema name

String/Expression/ Suggestion

Specify the database schema name. The suggestions in the Schema field are populated only when at least a single table exists in the schema. If no tables exist to use that schema, only SYS, SYSTEM, and XDB are populated.

The values can be passed using the pipeline parameters but not the upstream parameter.

Default value: N/A

Example: SYS

Table name*

String/Expression/ Suggestion

Required. Specify the table that the rows will be deleted from. This list is populated based on the tables associated with the selected schema.

Note: The values can be passed using the pipeline parameters but not the upstream parameter.

Default value: N/A

Example: people

Delete condition (deletes all records from table if left blank)

String/Expression

This is an expression property to specify the SQL WHERE clause of the delete statement. The delete condition may also be passed via an upstream Snap or through the pipeline parameters.

Note: Specify a valid WHERE clause for the delete condition. If you leave this field blank, the Snap deletes all the records from the table.
Warning: Caution: Using expressions that join strings together to create SQL queries or conditions has a potential SQL injection risk and is hence unsafe. Ensure that you understand all implications and risks involved before using concatenation of strings with '=' Expression enabled.

Default value: N/A

Examples without using expressions:

Examples using expressions:

  • "EMPNO=$EMPNO and ENAME=$EMPNAME"
  • email = $email
  • emp=$emp
  • "emp='" + $emp + "'"
  • "EMPNO=" + $EMPNO + " and ENAME='" + $EMPNAME+ "'"
Number of retries

Integer/Expression

Specify the maximum number of attempts to make to receive a response. The request is terminated if the attempts do not result in a response.

Default value: 0

Example: 3

Retry interval (seconds)

Integer/Expression

Specify the time interval between two successive retry requests. A retry happens only when the previous attempt resulted in an exception.

Default value: 1

Example: 10

Session parameters

Use this field set to specify the session parameters.
Session parameter name

String/Expression

Specify the name of the session parameter.

  • This Snap correctly applies the specified session parameters during deletion operations. For example, date/time format.
  • It supports the Enable, Disable, and Force commands in session parameters.
  • This field supports only pipelines parameters, not upstream values.

Default value: None

Example: NLS_TIMESTAMP_FORMAT

Session parameter value

String/Expression

Specify the value for the session parameter. This field supports only pipelines parameters, not upstream values.

Default value: None

Example: YYYY-MM-DD-HH:MI:SS.FF

Snap execution

Dropdown list
Choose one of the three modes in which the Snap executes. Available options are:
  • Validate & Execute: Performs limited execution of the Snap and generates a data preview during pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during pipeline runtime.
  • Execute only: Performs full execution of the Snap during pipeline execution without generating preview data.
  • Disabled: Disables the Snap and all Snaps that are downstream from it.

Default value: Execute only

Example: Validate & execute

Examples

  1. Delete student records
  2. Error Handling of the Snap (Oracle Delete)