On this Page
Table of Contents | ||||
---|---|---|---|---|
|
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: |
| |||||||
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.
Example: SYS Default value: [None] | |||||||
Table name | Table name to execute the update on.
Example: users Default value: [None] | |||||||
Where Condition | Where condition of the upsert statement.
Default value: [None] | |||||||
With primary key? | The 'With Primary Key' clause is appended to the UPSERT statement. See UPSERT Statement for details.
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 | multiexcerpt-include-macro|||||||
name | Snap Execution||||||||
page | SOAP Execute | Multiexcerpt include macro | name | Snap_Execution_Introduced | page | Anaplan ReadSelect one of the following three modes in which the Snap executes:
Default Value: Execute only |
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
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
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|