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.
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.
Figure 1.1: Browse Datasphere Spaces via OData API
By specifying the space, we can see the assets in there.
# Public API URL
# Alternative URL
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.
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 aNew 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
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
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
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.