SAP HANA - Delete

Overview

This Snap allows you to execute an SQL delete with the given properties.

Supported Accounts

Snap views

Type Description Examples of upstream and downstream Snaps
Input This Snap has exactly one document input view. If the input view is defined, then the where clause can substitute incoming values for a given expression.
Output This Snap has at most one document output view. If an output view is available, then the original document that was used to create the statement will be output with the status of the delete executed.
Learn more about Error handling.
Note: Database Write Snaps output all records of a batch (as configured in your account settings) to the error view if the write fails during batch processing.

Examples

Delete records from a table: Delete records from a table based on a condition.

Snap settings

Note: Learn about the common controls 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: SAP HANA - Delete

Example: Delete employee records

Schema name

String/Expression/ Suggestion

The database schema name. In case it is not defined, then the suggestion for the table name will retrieve all tables names of all schemas. The property is suggestible and will retrieve available database schemas during suggest values.
Note: The values can be passed using the pipeline parameters but not the upstream parameter.

Default value: [None]

Example: myschema

Table name

String/Expression/ Suggestion

Required. Table name to execute the delete on.
Note: The values can be passed using the pipeline parameters but not the upstream parameter.

Default value: [None]

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.

Examples:

Without using expressions

Using expressions

  • "EMPNO=$EMPNO and ENAME=$EMPNAME"
  • email = $email
  • emp=$emp
  • "emp='" + $emp + "'"
  • "EMPNO=" + $EMPNO + " and ENAME='" + $EMPNAME+ "'"
Warning: 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: [None]

Example: email = $email

Number of retries

Integer

Specifies the maximum number of attempts to be made 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

Specifies 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

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, by extension, its downstream Snaps.

Default value: Execute only

Example: Validate & Execute