SAP HANA - Upsert

SAP HANA - Upsert

This page is no longer maintained (May 13, 2026). For the most current information, go to SAP HANA - Upsert.


On this Page

Snap type:

Read

 

Description:

This Snap executes a SAP HANA Upsert with the given properties. The documents that are provided on the input view will be either inserted or updated into the provided table on the provided database.

 

Expected upstream Snaps: The columns of the selected table need to be mapped upstream using a Mapper Snap. The Mapper Snap will provide the target schema, which reflects the schema of the table that is selected for the Upsert Snap.

Expected downstream Snaps: The Snap will output one document for every record inserted or updated, hence any document processing Snap can be used downstream.

Expected input: Document that conforms to the input view schema of the Snap. The input view schema is provided to an upstream Mapper Snap, based on the selected service object.

Expected output: Document which represents the status of the upsert operation for that document. Each upsert operation is represented as one document in the output view.

 

Prerequisites:

[None]

 

Support and limitations:

Works in Ultra Pipelines.

Account: 

This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See Configuring SAP HANA Accounts for information on setting up this type of account.

 

Views:

Input

This Snap has exactly one input view.

Output

This Snap has at most one 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 update.

Error

This Snap has at most one error view and produces zero or more documents in the view.

Settings

Label

 

Required. The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline.

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.

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

Example: SYS

Default value: [None]

 

Table name

 

Table name to execute the update on.

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

Example: users

Default value: [None]  

 

Where Condition

 

Where condition of the upsert statement.  

Instead of building multiple Snaps with inter dependent DML queries, it is recommended to use the Stored Procedure or the Multi Execute Snap.
In a scenario where the downstream Snap does depends on the data processed on an Upstream Database Bulk Load Snap, use the Script Snap to add delay for the data to be available.

Default value: [None]

 

With primary key?

 

The 'With Primary Key' clause is appended to the UPSERT statement. See UPSERT Statement for details.

The 'Where condition' property and 'With primary key' property can not be combined together. If you enter 'Where condition', then 'With primary key?' property value is ignored.

Default value: Not selected

 

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.

Example: 3

Default value: 0

Retry interval (seconds)

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

Example:  10

Default value: 1

Snap Execution

Select one of the following three modes in which the Snap executes:

  • 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 ValueExecute only
Example: Validate & Execute

Example

The following example illustrates the usage of Upsert Snap. In this example we will supply two documents from upstream having customer information. We will try to upsert this data into table called 'K_CUSTOMER'.

Following is the sample pipeline:

Input data is passed using JSON Generator Snap. Following is the sample data passed.


 

The where condition is applied on field 'customername' of customer1 table. Once the Upsert Snap execution completes, the record with customername 'John' updates and a new record is created for customer 'Shaun'.

The sample output looks as shown below:


See Also