SAP Datasphere Consuming Data
SAP Datasphere Consuming Data
All users of SAP Datasphere with any of the standard roles can consume data exposed by spaces they are
assigned to. If a user does not need to access SAP Datasphere itself, and only wants to consume data exposed
by it, they should be granted the DW Consumer role.
Data can be exposed as analytic models, perspectives, and views, which are accessible to clients, tools, and
apps as follows:
Analytic models (see Creating an Analytic Live Connection Live Connection (via OData/ODBC
Model) an SAP Add-In)
Exposed: Automatically
For more information, see: • Consume Data • Consume Data in • Consume Data in
in SAP Analytics Microsoft Excel via Power BI and
Cloud via a Live an SAP Add-In Other Clients,
Connection [page [page 14] Tools, and Apps
8] via an OData Serv-
• Integrate with ice [page 15]
SAP Analytics • Consume Data in
Cloud for Planning Power BI and
[page 10] Other Clients,
Tools, and Apps
via ODBC [page
17]
* The workflow of consuming views with a semantic usage of Analytical Dataset in SAP Analytics Cloud
and Microsoft Excel via live connection is now deprecated. We recommend that you migrate your analytical
datasets to the new Fact semantic usage and expose your view data via analytic models (see Analytical
Datasets (Deprecated)).
** SAP Analytics Cloud primarily uses the consumption of view data via ODATA for planning (see Integrate with
SAP Analytics Cloud for Planning [page 10]).
Note
Before exposing data for consumption, you should consider applying row-level security via data access
controls (see Securing Data with Data Access Controls).
You can create a live connection from SAP Analytics Cloud to SAP Datasphere and consume data exposed as
analytic models and perspectives to create stories and analytic applications.
• Be a SAP Datasphere user with any of the standard roles. If you do not need to connect to SAP Datasphere
itself, and only consume data, then an administrator can grant you the DW Consumer role (see Standard
Roles Delivered with SAP Datasphere).
If data access controls have been applied, then the data you can consume will be filtered based on your
user id (see Securing Data with Data Access Controls).
• Be assigned to the SAP Datasphere space exposing the data (see Control User Access to Your Space).
• Have access to an SAP Analytics Cloud tenant and have the role BI Content Creator or another role
providing equivalent privileges.
• Create or have access to an SAP Analytics Cloud live data connection to your SAP Datasphere tenant (see
Live Data Connections to SAP Datasphere in the SAP Analytics Cloud documentation).
Note
The workflow of consuming views with a semantic usage of Analytical Dataset in SAP Analytics Cloud and
Microsoft Excel via live connection is now deprecated. We recommend that you migrate your analytical
datasets to the new Fact semantic usage and expose your view data via analytic models (see Analytical
Datasets (Deprecated)).
For more information, see Consume Data in SAP Analytics Cloud via a Live Connection [page 8].
You can use SAP Datasphere as a data source for loading actuals or external data into an SAP Analytics Cloud
planning model. You can also load your SAP Analytics Cloud planning data into SAP Datasphere and combine it
with live actuals or other data as appropriate.
For more information, see Integrate with SAP Analytics Cloud for Planning [page 10].
You can create a live connection from SAP Analytics Cloud to SAP Datasphere and consume data exposed as
analytic models and perspectives in Microsoft Excel, via the SAP Analytics Cloud add-in for Microsoft Office.
• Install the add-in (see Deploying the Add-In in the SAP Analytics Cloud, Add-In for Microsoft Office
documentation.
Note
This topic focuses on the SAP Analytics Cloud add-in for Microsoft Office. You can also consume
data exposed as perspectives and views in the SAP Analysis for Microsoft Office add-in (see the SAP
Analysis for Microsoft Office documentation). Data exposed as analytic models cannot be consumed in
the SAP Analysis for Microsoft Office add-in.
• Be a SAP Datasphere user with any of the standard roles. If you do not need to connect to SAP Datasphere
itself, and only consume data, then an administrator can grant you the DW Consumer role (see Standard
Roles Delivered with SAP Datasphere).
If data access controls have been applied, then the data you can consume will be filtered based on your
user id (see Securing Data with Data Access Controls).
• Be assigned to the SAP Datasphere space exposing the data (see Control User Access to Your Space).
• Have access to an SAP Analytics Cloud tenant and have the role BI Content Creator or another role
providing equivalent privileges.
• Create or have access to an SAP Analytics Cloud live data connection to your SAP Datasphere tenant (see
Live Data Connections to SAP Datasphere in the SAP Analytics Cloud documentation).
Note
The workflow of consuming views with a semantic usage of Analytical Dataset in SAP Analytics Cloud and
Microsoft Excel via live connection is now deprecated. We recommend that you migrate your analytical
datasets to the new Fact semantic usage and expose your view data via analytic models (see Analytical
Datasets (Deprecated)).
For more information, see Consume Data in Microsoft Excel via an SAP Add-In [page 14].
You can consume data exposed from SAP Datasphere in clients, tools, and apps via an OData service or via a
database user/Open SQL schema.
See Consume Data in Power BI and Other Clients, Tools, and Apps via an OData Service [page 15] and
Consume Data in Power BI and Other Clients, Tools, and Apps via ODBC [page 17].
You can connect to the OData API and consume data exposed as views or analytic models in SAP Analytics
Cloud and other clients, tools, and apps that are capable of accessing an OData service and authenticating via
an OAuth client.
You must:
• Be a SAP Datasphere user with any of the standard roles. If you do not need to connect to SAP Datasphere
itself, and only consume data, then an administrator can grant you the DW Consumer role (see Standard
Roles Delivered with SAP Datasphere).
If data access controls have been applied, then the data you can consume will be filtered based on your
user id (see Securing Data with Data Access Controls).
• Be assigned to the SAP Datasphere space exposing the data (see Control User Access to Your Space).
• Obtain the following parameters for an OAuth client defined in your SAP Datasphere tenant:
• Client ID
• Secret
• OAuth2SAML Token URL - To be used in the OAuth 2.0 SAML Bearer Assertion workflow.
• OAuth2SAML Audience - To be used in the OAuth 2.0 SAML Bearer Assertion workflow.
Note
Consuming exposed data in third-party clients, tools, and apps via an OData service requires a three-
legged OAuth2.0 flow with type authorization_code. Users must manually authenticate against
For more information, see Consume Data via the OData API [page 17].
You can create a live connection from SAP Analytics Cloud to SAP Datasphere and consume data exposed as
analytic models and perspectives to create stories and analytic applications.
Context
You must:
• Be a SAP Datasphere user with any of the standard roles. If you do not need to connect to SAP Datasphere
itself, and only consume data, then an administrator can grant you the DW Consumer role (see Standard
Roles Delivered with SAP Datasphere).
If data access controls have been applied, then the data you can consume will be filtered based on your
user id (see Securing Data with Data Access Controls).
• Be assigned to the SAP Datasphere space exposing the data (see Control User Access to Your Space).
• Have access to an SAP Analytics Cloud tenant and have the role BI Content Creator or another role
providing equivalent privileges.
• Create or have access to an SAP Analytics Cloud live data connection to your SAP Datasphere tenant (see
Live Data Connections to SAP Datasphere in the SAP Analytics Cloud documentation).
The workflow of consuming views with a semantic usage of Analytical Dataset in SAP Analytics Cloud and
Microsoft Excel via live connection is now deprecated. We recommend that you migrate your analytical
datasets to the new Fact semantic usage and expose your view data via analytic models (see Analytical
Datasets (Deprecated)).
Procedure
Note
If an administrator has configured a connection to an SAP Analytics Cloud tenant (and you are
assigned one or more BI roles), you can use the (Product Switch) in the top-right corner of the
screen to navigate.
Note
SAP Datasphere analytic models are not supported in the Classic Design Experience mode.
4. In the Tools menu, click Add New Data and then select Data from an existing dataset or model to open the
Select Dataset or Model dialog.
5. In the panel on the left, select your SAP Datasphere live data connection, select your space, and then click
the object to open.
Note
The workflow of consuming views with a semantic usage of Analytical Dataset in SAP Analytics Cloud
and Microsoft Excel via live connection is now deprecated. We recommend that you migrate your
analytical datasets to the new Fact semantic usage and expose your view data via analytic models (see
Analytical Datasets (Deprecated)).
6. Drag a chart or table from the Assets list in the left panel and build your story as usual.
For detailed information about creating stories, see Data Visualization (Stories) in the SAP Analytics Cloud
documentation.
Note
For information about SAP Analytics Cloud limitations with this type of connection, see SAP Note
2832606 .
SAP Datasphere integrates with SAP Analytics Cloud to act as a data source for loading actuals or external
data into a planning model, and can also persist your planning data and combine it with live actuals or other
data as appropriate.
You can:
• Load actuals data from SAP Datasphere into SAP Analytics Cloud for use in your planning models via
an OData Services Connection (see Consume SAP Datasphere Data in SAP Analytics Cloud via an OData
Service [page 10]).
• Load data from SAP Analytics Cloud into SAP Datasphere as a remote table or via a data flow and
optionally combine it with actuals data or other sources as appropriate (see Load SAP Analytics Cloud
Planning Data into SAP Datasphere [page 12]).
See also the blog Introducing the Bi-Directional Integration of SAP Datasphere and SAP Analytics Cloud for
Planning .
You can create an import data connection in SAP Analytics Cloud to consume data from a view exposed via the
SAP Datasphere OData API and consume it in an SAP Analytics Cloud model.
• Create an SAP Analytics Cloud OData Services Connection to an SAP Datasphere View [page 11]
• Create a Model from Your Connection [page 12]
You can create an OData services connection in SAP Analytics Cloud to load (replicate) data from an SAP
Datasphere view to SAP Analytics Cloud.
Note
The view being consumed must be persisted and any remote tables in its lineage must have their data
replicated to SAP Datasphere.
You must:
• Be a SAP Datasphere user with any of the standard roles. If you do not need to connect to SAP Datasphere
itself, and only consume data, then an administrator can grant you the DW Consumer role (see Standard
Roles Delivered with SAP Datasphere).
If data access controls have been applied, then the data you can consume will be filtered based on your
user id (see Securing Data with Data Access Controls).
• Obtain the following parameters for an OAuth client defined in your SAP Datasphere tenant:
• Client ID
• Secret
• OAuth2SAML Token URL - To be used in the OAuth 2.0 SAML Bearer Assertion workflow.
• OAuth2SAML Audience - To be used in the OAuth 2.0 SAML Bearer Assertion workflow.
• Have access to an SAP Analytics Cloud tenant and have the role BI Content Creator or another role
providing equivalent privileges.
Note
If an administrator has configured a connection to an SAP Analytics Cloud tenant (and you are
assigned one or more BI roles), you can use the (Product Switch) in the top-right corner of the
screen to navigate.
Parameter Value
Data Service URL Enter the full URL to your SAP Datasphere view in the following format:
https://<tenant_url>.cloud.sap/dwaas-core/odata/v4/
consumption/relational/<Space_ID>/<view>
OAuth Client ID Enter the values for your SAP Datasphere OAuth client.
Secret
Token URL
Authorization URL
You can use your OData Services connection to load your view's data into an SAP Analytics Cloud model:
Note
Alternatively, you can load data into an existing SAP Analytics Cloud model (see Import and Prepare Fact
Data for a Model with Measures in the SAP Analytics Cloud documentation).
You can transfer your SAP Analytics Cloud planning model data into SAP Datasphere via a Cloud Data
Integration connection and optionally combine and compare it with your actuals data.
You can create a Cloud Data Integration connection in SAP Datasphere to load (replicate) data from an SAP
Analytics Cloud planning model to SAP Datasphere.
You must:
• Have access to an SAP Analytics Cloud tenant and have the role BI Content Creator or another role
providing equivalent privileges.
• Obtain the following parameters for an OAuth client defined in your SAP Analytics Cloud tenant:
• Client ID
• Secret
• Token URL
• Authorization URL
• [if data flows are required] Ensure that Data Provisioning Agent is configured in your SAP Datasphere
tenant (see Preparing Data Provisioning Agent Connectivity).
Create a Cloud Data Integration connection to your SAP Analytics Cloud tenant, using OAuth 2.0
authentication (see Cloud Data Integration Connections).
See the blog Using the SAC Data Export API with SAP Datasphere and Data Intelligence for more
information.
You can load your SAP Analytics Cloud planning data to SAP Datasphere via your Cloud Data Integration
connection:
You can combine the planning data loaded from SAP Analytics Cloud with your actuals data (or any other
appropriate data) in a view and then expose the view to allow it to be consumed in an SAP Analytics Cloud
story via a live connection (see Consume Data in SAP Analytics Cloud via a Live Connection [page 8].
Context
You must:
• Install the add-in (see Deploying the Add-In in the SAP Analytics Cloud, Add-In for Microsoft Office
documentation.
Note
This topic focuses on the SAP Analytics Cloud add-in for Microsoft Office. You can also consume
data exposed as perspectives and views in the SAP Analysis for Microsoft Office add-in (see the SAP
Analysis for Microsoft Office documentation). Data exposed as analytic models cannot be consumed in
the SAP Analysis for Microsoft Office add-in.
• Be a SAP Datasphere user with any of the standard roles. If you do not need to connect to SAP Datasphere
itself, and only consume data, then an administrator can grant you the DW Consumer role (see Standard
Roles Delivered with SAP Datasphere).
If data access controls have been applied, then the data you can consume will be filtered based on your
user id (see Securing Data with Data Access Controls).
• Be assigned to the SAP Datasphere space exposing the data (see Control User Access to Your Space).
• Have access to an SAP Analytics Cloud tenant and have the role BI Content Creator or another role
providing equivalent privileges.
• Create or have access to an SAP Analytics Cloud live data connection to your SAP Datasphere tenant (see
Live Data Connections to SAP Datasphere in the SAP Analytics Cloud documentation).
Note
The workflow of consuming views with a semantic usage of Analytical Dataset in SAP Analytics Cloud and
Microsoft Excel via live connection is now deprecated. We recommend that you migrate your analytical
Note
This topic focuses on the SAP Analytics Cloud add-in for Microsoft Office. You can also consume data as
perspectives and views in the SAP Analysis for Microsoft Office add-in (see the SAP Analysis for Microsoft
Office documentation). Data exposed as analytic models cannot be consumed in the SAP Analysis for
Microsoft Office add-in.
Procedure
1. Open your Excel desktop app (or Excel for the Web) and create a new blank workbook.
2. Click the SAP Analytics Cloud Ribbon tab, and click Sign In to open the SAP Analytics Cloud panel.
3. Enter the URL for your SAP Analytics Cloud tenant, and click Go.
4. Enter your SAP Analytics Cloud user name and password, and click Log On to connect to the tenant.
5. Click Add Table, select your SAP Datasphere connection and space, then select your object, and click
Open.
Note
The workflow of consuming views with a semantic usage of Analytical Dataset in SAP Analytics Cloud
and Microsoft Excel via live connection is now deprecated. We recommend that you migrate your
analytical datasets to the new Fact semantic usage and expose your view data via analytic models (see
Analytical Datasets (Deprecated)).
6. Select measures and dimensions as appropriate and work with your data as usual.
For detailed information about working in Excel, see Analyze Your Data in the SAP Analytics Cloud, Add-In
for Microsoft Office documentation.
See also the blog Access SAP Datasphere with SAP’s Microsoft Excel add-ins (published May 2022).
You can consume data exposed as views in Microsoft Power BI and other third-party clients, tools, and apps via
the OData API.
You can connect Power BI to SAP Datasphere via an OData service by way of a custom connector or a blank
query and consume views that are exposed for consumption.
• Be a SAP Datasphere user with any of the standard roles. If you do not need to connect to SAP Datasphere
itself, and only consume data, then an administrator can grant you the DW Consumer role (see Standard
Roles Delivered with SAP Datasphere).
If data access controls have been applied, then the data you can consume will be filtered based on your
user id (see Securing Data with Data Access Controls).
• Be assigned to the SAP Datasphere space exposing the data (see Control User Access to Your Space).
• Obtain the following parameters for an OAuth client defined in your SAP Datasphere tenant:
• Client ID
• Secret
• OAuth2SAML Token URL - To be used in the OAuth 2.0 SAML Bearer Assertion workflow.
• OAuth2SAML Audience - To be used in the OAuth 2.0 SAML Bearer Assertion workflow.
Note
Consuming exposed data in third-party clients, tools, and apps via an OData service requires a three-
legged OAuth2.0 flow with type authorization_code. Users must manually authenticate against
the configured IDP in order to generate the authorization code before continuing with the remaining
OAuth2.0 steps.
You can consume data exposed as views in Microsoft Power BI and other third-party clients, tools, and apps via
an Open SQL schema and ODBC.
You can connect Power BI to SAP Datasphere via an Open SQL schema, and consume perspectives and views
that are exposed for consumption.
You must:
• Request a space administrator or integrator to provide you with access to a database user/Open SQL
schema associated with the SAP Datasphere space exposing the data (see Create a Database User).
• Request an administrator to add the IP address of your tool to the IP allowlist (see Add IP address to IP
Allowlist).
• Install the SAP HANA CLIENT 2.0 (see Download and Install the SAP HANA Client in the SAP HANA Cloud
documentation).
• Create an ODBC connection to SAP Datasphere using your database user credentials (see Connect to SAP
HANA Cloud via ODBC in the SAP HANA Cloud documentation).
See the blog How to Consume SAP Datasphere in Power BI for more information.
You can connect to the OData API and consume data exposed as views or analytic models in SAP Analytics
Cloud and other clients, tools, and apps that are capable of accessing an OData service and authenticating via
an OAuth client.
You must:
• Be a SAP Datasphere user with any of the standard roles. If you do not need to connect to SAP Datasphere
itself, and only consume data, then an administrator can grant you the DW Consumer role (see Standard
Roles Delivered with SAP Datasphere).
If data access controls have been applied, then the data you can consume will be filtered based on your
user id (see Securing Data with Data Access Controls).
• Be assigned to the SAP Datasphere space exposing the data (see Control User Access to Your Space).
• Obtain the following parameters for an OAuth client defined in your SAP Datasphere tenant:
• Client ID
• Secret
• OAuth2SAML Token URL - To be used in the OAuth 2.0 SAML Bearer Assertion workflow.
• OAuth2SAML Audience - To be used in the OAuth 2.0 SAML Bearer Assertion workflow.
Note
Consuming exposed data in third-party clients, tools, and apps via an OData service requires a three-
legged OAuth2.0 flow with type authorization_code. Users must manually authenticate against
the configured IDP in order to generate the authorization code before continuing with the remaining
OAuth2.0 steps.
https://<tenant_url>.cloud.sap/api/v1/dwc/<request>
or:
https://<tenant_url>.cloud.sap/dwaas-core/odata/v4/<request>
Requests return, by default, the first 10 results and for retrieving more or other pages you should make use of
the $top and $skip parameters.
Use the catalog request to list spaces and assets that are exposed for consumption.
https://<tenant_url>.cloud.sap/api/v1/dwc/catalog/spaces
https://<tenant_url>.cloud.sap/api/v1/dwc/catalog/assets
https://<tenant_url>.cloud.sap/api/v1/dwc/catalog/spaces('<space_id>')/assets
To get access to the description of a particular asset, including links to its metadata and data, enter:
https://<tenant_url>.cloud.sap/api/v1/dwc/catalog/spaces('<space_id>')/
assets('<asset_id>')
Use the relational and analytical requests to retrieve asset data and metadata.
Note
Analytic models support only analytical requests, and it is not possible to consume analytic models that
require the consumer to set one or more variables (see Add a Variable).
https://<tenant_url>.cloud.sap/api/v1/dwc/relational/<space_id>/<asset_id>/
<asset_id>[<params>]
If the asset requires you to set a value for one or more <params>, see Set Values for Input Parameters [page
20].
https://<tenant_url>.cloud.sap/api/v1/dwc/analytical/<space_id>/<asset_id>/
<asset_id>[<params>]
By default the analytical responses always include all model measures and attributes, and so no aggregation
is applied on the measures. In order to aggregate the results, specify the measures and attributes to be in the
result set using $select, ensuring that at least one measure is specified among the selected fields.
Note
Views with a semantic usage of Analytical Dataset support both relational and analytical requests. Views
with all other semantic usages, including Fact, support only relational requests.
https://<tenant_url>.cloud.sap/api/v1/dwc/relational/<space_id>/<asset_id>/
$metadata
Some views exposed for consumption may contain input parameters which allow you to set values to filter or
otherwise modify the data you consume.
Note
It is not possible to consume analytic models that require the consumer to set one or more variables (see
Add a Variable).
To set values for input parameters, append the following syntax directly after your <asset_id>:
(<param>='<val>'[,...])/Set
For example, Sales_View in the SALES space has two input parameters:
https://<tenant_url>.cloud.sap/api/v1/dwc/relational/SALES/Sales_View/
Sales_View(Region='US')/Set
For more information about input parameters, see Create an Input Parameter.
You can use the standard OData parameters $select, $filter, $orderby, $top, and $skip to control the
data you retrieve:
Parameter Description
$select Requests that the service returns only the specified properties (see System Query Option $select
in the OData Version 4.0 Specification).
For example, to retrieve only the columns Partner_ID and Value, append the syntax ?
$select=Partner_ID,Value.
$filter Request the service to restrict returned results according to the provided criteria:
• eq - Equals
• ne - Not equal
• gt - Greater Than
• ge - Greater Than or Equal To
• lt - Less Than
• le - Less Than or Equal To
• and - And
• or - Or
• not - Not
• () - Grouping
For example, to retrieve only records where Partner_ID=100000005, append the syntax ?
$filter=Partner_ID eq 100000005.
$orderby Specifies the order in which items are returned from the service (see System Query Option
$orderby in the OData Version 4.0 Specification).
For example, to order records by descending order of Value, append the syntax ?$orderby=Value
desc.
$top Specifies a value N that limits the number of items returned from a collection (see System Query Option
$top in the OData Version 4.0 Specification).
For example, to retrieve only the top 5 records by descending order of Value, append the syntax ?
$orderby=Value desc&$top=5.
$skip Specifies a value N that excludes the first N items of the selected collection (see System Query Option
$skip in the OData Version 4.0 Specification).
For example, to retrieve only records 6-10 by descending order of Value, append the syntax ?
$orderby=Value desc&$skip=5&$top=5.
Client side pagination can be performed via the usage of the $top and $skip query parameters. Combining
both parameters allow the API consumer to retrieve an specific batch of results from the consuming OData
service.
In some cases, the full response cannot be returned in one page due to the page size query option or the
response size limit enforced by the service.
In this case, a next link annotated by the @odata.nextLink is provided at the end of the response, which
allows you to move to the next page. There will be no next link when client side pagination is applied or at the
final page.
Annotations in the metadata of a specific service might restrict the query options. Some of the CDS data types
are partially or not supported by the SAP Datasphere Consumption API.
Overwritten EDM
Data Type Writable Sortable Filterable Type
cds.hana.ST_GEOME- Edm.String
TRY
cds.hana.ST_POINT Edm.String
cds.Binary -
cds.LargeBinary -
cds.hana.BINARY -
cds.LargeString -
cds.UUID -
Authenticated requests are associated either with the authenticated username, tenant ID or with the OAuth
client ID. Unauthenticated requests are associated with the originating IP address, and not the user.
When the rate limit is exceeded, the client receives the HTTP 429 Too Many Requests response status
code.
Hyperlinks
Some links are classified by an icon and/or a mouseover text. These links provide additional information.
About the icons:
• Links with the icon : You are entering a Web site that is not hosted by SAP. By using such links, you agree (unless expressly stated otherwise in your
agreements with SAP) to this:
• The content of the linked-to site is not SAP documentation. You may not infer any product claims against SAP based on this information.
• SAP does not agree or disagree with the content on the linked-to site, nor does SAP warrant the availability and correctness. SAP shall not be liable for any
damages caused by the use of such content unless damages have been caused by SAP's gross negligence or willful misconduct.
• Links with the icon : You are leaving the documentation for that particular SAP product or service and are entering an SAP-hosted Web site. By using
such links, you agree that (unless expressly stated otherwise in your agreements with SAP) you may not infer any product claims against SAP based on this
information.
Example Code
Any software coding and/or code snippets are examples. They are not for productive use. The example code is only intended to better explain and visualize the syntax
and phrasing rules. SAP does not warrant the correctness and completeness of the example code. SAP shall not be liable for errors or damages caused by the use of
example code unless damages have been caused by SAP's gross negligence or willful misconduct.
Bias-Free Language
SAP supports a culture of diversity and inclusion. Whenever possible, we use unbiased language in our documentation to refer to people of all cultures, ethnicities,
genders, and abilities.
SAP and other SAP products and services mentioned herein as well as
their respective logos are trademarks or registered trademarks of SAP
SE (or an SAP affiliate company) in Germany and other countries. All
other product and service names mentioned are the trademarks of their
respective companies.