Skip to Content
Technical Articles
Author's profile photo Ian Henry

Using the Data Warehouse Cloud OData API with SAP Analytics Cloud

An OData API has been developed to allow SAP Analytics Cloud (SAC) to acquire Data Warehouse Cloud (DWC) data. Acquisition of data within SAC is often required for SAC Planning scenarios. Consumption of this API by 3rd party tools is also planned, but not available with the initial release.

The DWC OData API is available in Data Warehouse Cloud from wave 2022.11 onwards.

At the time of writing this the OData API is in a controlled release status which means you need to log a support incident to get this enabled as detailed in SAP Note 3199078. There are some restrictions as to the use of the API which need to be respected, currently SAP Analytics Cloud (SAC) is the only support client.

Once enabled you will be able to access the API as detailed in the Official SAP Help and de

This blog post covers the following steps

  1. Identify the OData Source (Data Service URL) in DWC
  2. Lookup your redirect URI in SAC
  3. Create the OAuth Client in DWC
  4. Create OData Connection in SAC
  5. Import from OData Connection
  6. Conclusion

** Note currently there is an issue with the Public API so please use the Private API URLs **

1. Identify the OData Source (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

# Private API 
https://dwc-tenant.eu10.hcs.cloud.sap/dwaas-core/odata/v4/catalog/spaces
# Public API
https://dwc-tenant.eu10.hcs.cloud.sap/api/v1/dwc/catalog/spaces

Figure%201.1%3A%20Browse%20DWC%20Spaces%20via%20OData%20API

Figure 1.1: Browse DWC Spaces via OData API

By specifying the space, we can see the assets in there.

# Private API
https://dwc-tenant.eu10.hcs.cloud.sap/dwaas-core/odata/v4/catalog/spaces('I049374')/assets
# Public API
https://dwc-tenant.eu10.hcs.cloud.sap/api/v1/dwc/catalog/spaces('I049374')/assets

Figure%201.2%3A%20Browse%20Space%20Assets%20Identify%20OData%20URLs

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%201.3%3A%20Metadata%20from%20OData%20Service

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%201.4%3A%20Actual%20Data%20from%20OData%20Service

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 DWC

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

Figure%201.1%3A%20Create%20Connection

Figure 2.1: Create Connection

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

Figure%201.2%3A%20OData%20Redirect%20URI

Figure 2.2: OData Redirect URI

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

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 DWC

A new OAuth Client needs to created in DWC

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%202.1%3A%20New%20OAuth%20Client%20in%20DWC

Figure 3.1: New OAuth Client in DWC

Once created copy the OAuth Client ID and Secret

Figure%202.2%3A%20OAuth%20Client%20credentials

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 DWC,

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%204.1%3A%20Create%20OData%20Connection%20in%20SAC

Figure 4.1: Create OData Connection in SAC

Figure%204.2%3A%20OData%20Connection%20Details

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%205.1%3A%20Create%20Model

Figure 5.1: Create Model – Choose OData

Figure%205.2%3A%20S

Figure 5.2: Select Connection

Figure%205.3%3A%20Choose%20Dataset

Figure 5.3: Create Query from the dataset

Figure%205.4%3A

Figure 5.4: Build OData Services Query

Figure%205.5

Figure 5.5 Data will be uploaded

Figure%205.6%3A

Figure 5.6: Model Data

6. Conclusion

In this blog post you can see that we can now import DWC 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 DWC scenarios.

Assigned Tags

      4 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Jef Baeyens
      Jef Baeyens

      Hi Ian, great stuff.
      Will there be any support for delta loads?

      Author's profile photo Ian Henry
      Ian Henry
      Blog Post Author

      Thanks Jef,

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

      Author's profile photo Shashank Paritala
      Shashank Paritala

      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?

      Author's profile photo Ian Henry
      Ian Henry
      Blog Post Author

      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.