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.
OutputThis Snap has exactly one document output view.
ErrorThis Snap has at most one document error view and produces zero or more documents in the view.

Support

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


LabelRequired. 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:

  • Dimension members
  • Fact table
  • Public dimension members

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 members
  • Fact table
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:

  • Dimension members
  • Public dimension members
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:

  • 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.


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

  File Modified

File SAP Analytics Cloud Create_Append_Example.slp

May 04, 2018 by Siddharth Menon

File SAC Upsert_Dimension Members.slp

May 04, 2018 by Siddharth Menon



Snap Pack History

 Click to view/expand

4.23 (main7430)

  • No updates made.

4.22 (main6403)

  • No updates made.

4.21 (snapsmrc542)

  • No updates made.

4.20 (snapsmrc535)

  • No updates made.

4.19 (snapsmrc528)

  • No updates made.

4.18 (snapsmrc523)

  • No updates made.

4.17 Patch ALL7402

  • Pushed automatic rebuild of the latest version of each Snap Pack to SnapLogic UAT and Elastic servers.

4.17 (snapsmrc515)

  • Added the Snap Execution field to all Standard-mode Snaps. In some Snaps, this field replaces the existing Execute during preview check box.

4.16 (snapsmrc508)

  • No updates made. Automatic rebuild with a platform release.

4.15 (snapsmrc500)

  • No updates made. Automatic rebuild with a platform release.

4.14 (snapsmrc490)

  • No updates made. Automatic rebuild with a platform release.

4.13  (snapsmrc486) 

  • New! Initial release of the Snap Pack. This includes SAP Analytics Cloud Create, SAP Analytics Cloud Read, SAP Analytics Cloud Upsert, and SAP Analytics Cloud Delete Snaps.