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
An OData API is available to allow SAP Analytics Cloud (SAC) and third party tools to acquire Datasphere data, (formerly known as Data Warehouse Cloud (DWC)). Acquisition of data within SAC is often required for SAC Planning scenarios.

Release History

2022.11 Initial release of the Datasphere OData API. Access was restricted to consumption from SAC.
2022.20 General Availability of the OData API for all clients to consume
2023.02 ODATA APIs have been renamed to SAP Datasphere Consumption APIs.

You are now able to access the Datasphere Consumption API as detailed in the Official SAP Datasphere Help and the SAP API Business Hub.

For bi-directional integration betweem Datasphere and SAC, refer to another blog post I shared - Using the SAC Data Export API with Datasphere and Data Intelligence.

This blog post covers the steps required to import Datasphere data into SAC.

  1. Identify the OData Source (Data Service URL) in Datasphere

  2. Lookup your redirect URI in SAC

  3. Create the OAuth Client in Datasphere

  4. Create OData Connection in SAC

  5. Import from OData Connection

  6. Conclusion


** Note currently I recommend using the Alternative URL as it was more reliable for me than the Public API URL **

1. Identify the OData Source in Datasphere (Data Service URL)


We could use the documentation to construct our OData URL, alternatively we can copy and paste that from our space assets.

First we can browse the available spaces using a URL such as
# Public API URL
https://datasphere-tenant.eu10.hcs.cloud.sap/api/v1/dwc/catalog/spaces
# Alternative URL
https://datasphere-tenant.eu10.hcs.cloud.sap/dwaas-core/odata/v4/catalog/spaces


Figure 1.1: Browse Datasphere Spaces via OData API


By specifying the space, we can see the assets in there.
# Public API URL
https://datasphere-tenant.eu10.hcs.cloud.sap/api/v1/dwc/catalog/spaces('I049374')/assets
# Alternative URL
https://datasphere-tenant.eu10.hcs.cloud.sap/dwaas-core/odata/v4/catalog/spaces('I049374')/assets


Figure 1.2: Browse Space Assets & Identify OData URLs


Identify the dataset you require and then copy assetRelationalDataUrl, this is your Data Service URL in the SAC OData Connection.

Note My JSON response is being formatted by a browser extension, yours may be JSON returned in plain text.

If we click on the assetRelationalDataUrl, we receive the metadata from the OData Service.


Figure 1.3: Metadata from OData Service


We can see the data from the OData service by appended the dataset name a second time.


Figure 1.4: Actual Data from OData Service


 

2. Lookup your redirect URI in SAC


The redirect URI comes from the SAC connection properties, as SAC establishes this connection to Datasphere

Create a new OData Connection in SAC and we can identify the URI


Figure 2.1: Create Connection


Switch Authentication Type to OAuth 2.0 Authorization Code, and scroll down to see the Redirect URI



Figure 2.2: OData Redirect URI


Copy the Redirect URI, you will need this in Datasphere.



https://bocauth.us1.sapbusinessobjects.cloud:443

Note, my SAC tenant is in eu10 but strangely the Redirect URI is in us1.

 

3. Create the OAuth Client in Datasphere


A new OAuth Client needs to created in Datasphere

Navigate to System -> Administration -> App Integration

Add a New OAuth Client, paste the Redirect URI from step 1, ensuring there are no leading spaces.


Figure 3.1: New OAuth Client in Datasphere


Once created copy the OAuth Client ID and Secret


Figure 3.2: OAuth Client credentials


We also need to the copy the following from the OAuth Client URLs

Authorisation URL

Token URL 

 

4. Create OData Connection in SAC


We can now create the SAC OData Connection.

The SAC connection points to a single dataset/view from Datasphere,

You now have the 5 connection parameters and can copy and paste these values.

Data Service URL = assetRelationalDataUrl


OAuth Client ID


Secret


Token URL 


Authorisation URL



Figure 4.1: Create OData Connection in SAC



Figure 4.2: OData Connection Details


All being well we can save the connection.

5. Import from OData Connection


We can now create either a model or dataset from our OData connection.


Figure 5.1: Create Model - Choose OData



Figure 5.2: Select Connection



Figure 5.3: Create Query from the dataset



Figure 5.4: Build OData Services Query



Figure 5.5 Data will be uploaded



Figure 5.6: Model Data



6. Conclusion


In this blog post you can see that we can now import Datasphere data into SAC. This (in conjunction with the SAC OData/CDI API) provides support for bi-directional integration that helps with SAC Planning scenarios.

For further reading checkout Max's Blog on the bi-directional SAC Planning and Datasphere scenarios.
12 Comments
JefB
Active Contributor
Hi Ian, great stuff.
Will there be any support for delta loads?
Ian_Henry
Product and Topic Expert
Product and Topic Expert

Thanks Jef,

There's no delta support that I am aware of, but it's just 1 click to reimport your dataset in SAC.

shashankp
Discoverer
0 Kudos
There was no indication whatsoever that this ODATA Feature was going to be SAC Specific. Even with this release - SAP DWC is lacking a key feature that is available in so many other Cloud DW Products. The ability to use odata to expose data from SAP DWC is long overdue - is this coming in the near future?
Ian_Henry
Product and Topic Expert
Product and Topic Expert
The initial release is for SAC.
Yes, we plan to make the DWC OData API available for third-party tools and applications in the near future.
DenizOsoy
Product and Topic Expert
Product and Topic Expert
0 Kudos
Helpful! Great blog post Ian, thank you!
zili_zhou
Advisor
Advisor
0 Kudos

Hi Ian, thanks for the detailed blog.  I also put the other blog link here.

Leverage the SAP Analytics Cloud Data Export Service to extract your planning data to SAP HANA, SAP ...

 

 

igorzhilin
Explorer
0 Kudos
Hi Ian,

Maybe you could help me figure this out. I am trying to find the Token URL.

Here is the story:

I have an S/4 HANA public Cloud system.

I downloaded SAC Package "SAP Financial Compliance Management" from SAC Content Network.

It comes with an OData connection "Data Source to consume the Controls Business Service" that I need to adjust so that it connects to my system.



In the Connections, I do see the created "Data Source to consume the Controls Business Service". This is the one I need to adjust.


But what do I put in the field "Token URL"? I tried with my system's URL https://mySystem.com/oauth/token but it does not seem to be the correct one.

avinash_eppar
Participant
0 Kudos
ian.henry

Thanks for this blog Ian. I also would like to know about creating generic OData connection in SAP DWC.

TIA,

Avinash
MKreitlein
Active Contributor
0 Kudos
Hello Ian,

great Blog.

Question... why has this note been removed, and what was contained there? Are there no restrictions any longer?

SAP Note/KBA 3199078 has been removed.

BR, Martin
Ian_Henry
Product and Topic Expert
Product and Topic Expert
Hi Martin,

Thanks for the feedback. I checked the SAP note 3199078, and it has been archived. That was only valid for the initial release when the OData API was first made available. I have updated the blogpost to remove that reference now. The API is available for all 3rd party clients to use and has built in controls to ensure it performs as expected.

Cheers, Ian.
Ian_Henry
Product and Topic Expert
Product and Topic Expert
Hi Avinash, this blogpost is describing exposing DWC view as OData. An OData connection is available to retrieve data but that is seperate to what I have described here.
sarthaksrivasta
Explorer
Hello Ian,

Great blog,

I have one question in this process, Do we need to create one Odata Connection for every DWC View that we need to access in SAC?

As I am getting error if I am not mentioning view name in the end of Odata URL in SAC Connection.

Thanks,
Sarthak Srivastava