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.
- This is a Write-type Snap.
Works in Ultra Tasks
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
| Field/Field set | Description |
|---|---|
| Label
|
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
|
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
|
Required. The name of the table to perform the upsert operation on.
Default value: [None] Example: employees |
| Key columns
|
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
|
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)
|
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
|
Choose one of the three modes in which the Snap executes. Available options are:
Default value: Execute only |
Troubleshooting
None.