SAP HANA - Upsert

Overview

This Snap inserts or updates data in a database table. If a record with the specified key already exists, it updates the record; otherwise, it inserts a new record. The Snap uses the MERGE statement to perform the upsert operation.

Supported Accounts

Prerequisites

None.

Limitations and known issues

None.

Snap views

Type Description Examples of upstream and downstream Snaps
Input This Snap has exactly one document input view. Document containing the values to insert or update.
Output This Snap has exactly one document output view. Document for each record processed, containing the operation status.
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

Insert or update records in a table: Insert or update records based on key column.

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 - Upsert

Example: Upsert 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.

Default value: [None]

Example: myschema

Table name

String/Expression/ Suggestion

Required. The name of the table to perform the upsert operation on.

Default value: [None]

Example: employees

Key columns

String

Required. The column names to use as keys for matching records. Multiple columns can be specified as a comma-separated list. These columns determine whether a record should be updated or inserted.

Default value: [None]

Example: id

Example: employee_id, department_id

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

Troubleshooting

None.