Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Ian_Henry
Product and Topic Expert
Product and Topic Expert
In this blog post I will show how we can configure the SAP Analytics Cloud (SAC) Data Export API to access SAC planning data and integrate it with Datasphere, formerly known as Data Warehouse Cloud (DWC) and SAP Data Intelligence (DI).

The API provides OData and Cloud Data Integration (CDI) access for great integration with Datasphere and DI. CDI is a superset of OData, therefore when available it is better to use CDI.

The SAC Data Export API has been made generally available during the QRC in 2022 Q2. Initially, it was part of a controlled release, see the SAC Roadmap Explorer for the latest updates.

Details of the SAC Data Export API are covered in the SAC help documentation and the SAP API Business Hub.

For bi-directional integration between SAC and Datasphere then you will also need to follow another blogpost - Using the Datasphere OData API with SAC.

The steps to be covered in this blog post are the technical setup of the integration.

  1. SAP Analytics Cloud Configuration

  2. Postman

  3. Datasphere

  4. Data Intelligence


1. SAP Analytics Cloud Configuration


To use the SAC Data Export API you require 3 parameters, I refer to these numbers further in the blog post.

  1. Token URL

  2. OAuth Client ID

  3. Secret


In SAC navigate to System -> Administration -> App Integration

Here you will see your OAuth Clients and Token URL.

Add a New OAuth Client, when the Data Export API is enabled/released you will see the Data Export Service as an Access Type as below.


Figure 1.1: Access - Data Export Service


Create a New OAuth Client, similar to that below.


Figure 1.2: New OAuth Client


With these 3 parameters we can access the Data Export API with either Postman, Datasphere, SAP Data Intelligence.

2. Postman


We can test the API with postman to verify it's working as expected.

First we need to Authenticate using the OAuth Client details created above.


Figure 2.1: Postman Authentication


All being well we can click "Get New Access Token", which will let us use the API.


Figure 2.2: Postman Authentication Success



Figure 2.3: Use Token


Click Use Token and we can use that token to call the actual API
https://my-sac-tenanant.eu10.hcs.cloud.sap/api/v1/dataexport/administration/Namespaces(NamespaceID='sac')


Figure 2.4: Postman API Call - NameSpaces


Above, we can see the API is working and returning metadata as requested

3. SAP Datasphere


Switching to Datasphere we can add a new connection of type Cloud Data Integration (CDI).


Figure 3.1: Cloud Data Integration


In Datasphere the URL format would be the following.
https://my-sac-tenant.eu10.sapanalytics.cloud/api/v1/dataexport/administration


Figure 3.2: CDI Connection Details


To use remote tables with the CDI Connection a Data Provisioning Agent is required.


Figure 3.3: CDI Connection Details Continued


Be careful when copying and pasting the Client ID and Client Secret not to include any leading or trailing spaces.


Figure 3.3: Validate Connection



Figure 3.4: Data Builder - Import Tables



Figure 3.5: Import Tables - Select Connection


We can now see namespace (sac) and the planning models, some of which have a GUID others have a description. We can see the the GUID on your SAC planning model as the URL suffix when the model is open.


Figure 3.6: Select Required Planning Model and Tables


We are now able to use the remote tables for modeling with either remote access (federation) or replicate as a snapshot into Datasphere, or for FactData we support real-time replication.

 

4. SAP Data Intelligence


In SAP Data Intelligence we can create a new connection of type CLOUD_DATA_INTEGRATION. Use the three configuration parameters as below and paste in your details from SAC, obtained in step 1.

The Service Path should be
/api/v1/dataexport/administration

 


Figure 4.1: SAP Data Intelligence - Cloud Data Integration Connection


Switching to the Data Intelligence Modeler perspective


Figure 4.2: Modeler - Generation 2 - SAP Application Consumer


We can then browse the SAC Planning Models, via the namespace (sac) and then the provider, some of which have a description others have a GUID.


Figure 4.3: SAP Application Consumer - Browse Objects



5. Conclusion


In this blog post you can see that we can access SAC Planning data using the SAP Cloud Data Integration within SAP Datasphere and SAP Data Intelligence.
42 Comments