SAP Analytics Cloud Upsert
On this Page
Overview
The SAP Analytics Cloud Upsert Snap is a Write type Snap that can be used for updating/inserting (upserting) records into dimensions, fact tables, and public dimensions. The Snap accepts document input and produces document output so Snaps that have a document input/output can be used downstream/upstream of this Snap. The SAP Analytics Cloud Upsert Snap also supports batching to provide an efficient processing and performance.
Fact table - Append Vs Upsert
Two Snaps in this Snap Pack are currently used for adding data into a fact table - SAP Analytics Cloud Create and SAP Analytics Cloud Upsert. The SAP Analytics Cloud Create Snap lets you append records into an existing fact table (append/clean and append) while the SAP Analytics Cloud Upsert Snap lets you update records in an existing table (probably update a measure/dimension member) or insert a new record.
Prerequisites
A valid SAP Analytics Cloud account with appropriate read and write access.
Configuring Accounts
This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See Configuring SAP Analytics Cloud Accounts for information on setting up this type of account.
Configuring Views
Input | This Snap has exactly one document input view. |
---|---|
Output | This Snap has exactly one document output view. |
Error | This Snap has at most one document error view and produces zero or more documents in the view. |
Support
- Works in Ultra pipelines.
Known Issues
- The output fields will be in string format so any processing on the output data must be done keeping this in mind, alternatively you may convert the output string into the appropriate data-type for your processing needs.
Snap Settings
Label | Required. The name for the Snap. Modify this to be more specific, especially if there are more than one of the same Snap in the pipeline. |
---|---|
Request type | The SAP Analytics Cloud object where the data is to be upserted. Currently, the Snap supports upserting data into the following objects:
Default value: Dimension members |
Model ID | Conditional. The model ID of the target model for which the fact table is to be created. This is a suggestible field and the Snap suggest's IDs of all the models based on the account settings. Default value: [None] Model ID is required only when upserting into the following objects:
|
Dimension ID | Conditional. The dimension ID for the dimension in the SAP Analytics Cloud instance. This is a suggestible field and lists out all the dimensions for a specific model. This property is required only when deleting dimension members, for deleting fact tables the model ID is sufficient. Default value: [None] Dimension ID is required only when upserting into the following objects:
|
Batch size | Number of documents to be processed per batch. The smallest value that can be specified here is 1. The output is segregated per batch. Default value: [None] |
Snap execution | Select one of the three modes in which the Snap executes. Available options are:
|
Examples
Upserting Dimension Members from Incoming Documents
The pipeline below shows how dimension members are upserted into a specified dimension within a model from incoming documents:
Input data is provided as a JSON document from the JSON Generator Snap, the screenshot below shows the input records:
The Mapper Snap is used to map the objects in the input records with the dimensions and measures in the target model. The SAP Analytics Cloud Create Snap is configured as shown below:
Batch size is 2 and the Request type is Dimension members so the input records are upserted to the model likewise - in two batches where the first batch has two records and the last batch has one record. A preview of the output from the Snap is as shown in the screenshot below:
The exported pipeline is available in the Downloads section below.
Downloads
See Also
Snap Pack History
Have feedback? Email documentation@snaplogic.com | Ask a question in the SnapLogic Community
© 2017-2024 SnapLogic, Inc.