SAP DataSphere Tutorial
SAP DataSphere Tutorial
Beginner Tutorial
Table of Contents
1 Foreword ........................................................................ 3
2 Prerequisites................................................................... 3
3 Business Case................................................................. 4
4 Step-by-step Solution ...................................................... 5
4.1 Create a Space in DataSphere ..................................................................... 5
4.2 Create Scoped Roles .................................................................................. 6
4.3 Assign Users .............................................................................................. 9
1 Foreword
This document is an update to the original SAP Datasphere Content Tutorial which will
be updated if new features will be available. You can find the original SAP Tutorial here:
datasphere-
content/Sample_Bikes_Sales_content/SAP_Datasphere_Content_Tutorial.pdf at main ·
SAP-samples/datasphere-content (github.com)
2 Prerequisites
The best way for accessing the CSV files used for this demo, is to have your own GitHub
account. If you are not already registered, register please. See links to GitHub and Visual
Studio Code Installation. Install both of them on your local PC. Use installation
documents for
It is important that you set a GIT directory as starting point for all GIT Repositories
preferable in one of your user subfolders. If Github and VS Code are installed, please
open VS Code. Now press <Ctrl>-<Shift>-Ö and open a new terminal window.
Alternatively you can open it as VS Code command entering <CTRL>-<SHIFT>-P and
selecting “Create Terminal” from the command palette.
Check, if SAP DataSphere is connected to SAP Analytics Cloud in the settings. If not sure
ask your system administrator.
Note your local folder for Sample Bike Sales content in datasphere-
content/Sample_Bikes_Sales_content at main · SAP-samples/datasphere-content
(github.com)\CSV. You need this folder later to upload CSV files to DSP.
page 4 of 38
In Datasphere you need sufficient privileges to create new models, please check that
you have DW Modeler role assigned.
3 Business Case
The well-known company “Best run bikes” wants to have a sales-by-region report. Due
to an increase in the number of sales, the company wants to understand how the
different regions, represented by Sales organization, are performing in each period of
current fiscal year 2019. As measurement for performance the gross amount should be
taken into consideration. A simple diagram is sufficient in this early evaluation. The
solution will be developed with SAP Datasphere (DSP) and SAP Analytics Cloud (SAC).
page 5 of 38
4 Step-by-step Solution
4.1 Create a Space in DataSphere
Please log on to your SAP DataSphere now. First of all you need an appropriate space in
DSP where you can upload the CSV data.
In the next Screen you can enter further details for your space, but we just use it as
proposed in standard.
page 6 of 38
Press in the menu Security -> Roles. You see all available roles, scoll down the Screen to
the bottom:
Press Create a new scoped role and add it to your DataSphere environment.
Now you have to assign a role template. Choose DW Modeler from the list and press OK:
The role is created and displays all privileges are assigned to this role. Now we need to
assign the Space(s) to this role. In this context a space is a scope. So choose “Scopes”
from the menu.
page 8 of 38
A warning pop-up appears that the role has not yet been saved. Please Save the role and
continue:
Choose “Scope” again. In the next Pop-up window choose “Bike Tutorial” Space as
scope and press “Save”:
But you can also switch back to Tutorial Space. Choose Space Management and select
Tutorial space and press “Edit”:
As a result you should see a list with all users assigned to this space. “Deploy” space
again.
page 11 of 38
5 Prepare model and data
Space is created, users with scoped roles have been assigned. Now we can go create
our data model and import data from CSV files into our Tutorial Space. Go to “Data
Builder” in the menu.
You should be able to see Bike Tutorial Space. If it is not available wait a few seconds, as
deployment may not yet completed. If Bike Tutorial is available, just click on it and you
get into the data builder GUI.
Here you see a list of all objects you can create and use to store data and execute tasks.
We will start with the Entity-Relationship-Model (ERM). That is the preferred starting
point for a new project. You can define the ERM from a JSON-File. In the ERM you define
all tables / views and their dependencies. The content tutorial provides a JSON-ERM file.
page 12 of 38
You can directly create a entity-relationship model from JSON file just by uploading it:
Choose “Import objects from CSN/JSON File”. In the next pop-up choose JSON-File
from your sales content folder and press “Next”:
page 13 of 38
You will get a message that import was successful. The ERM should look like this:
You find yellow numbers about the tables, telling you something is not ok. If you press on
a number you will get a more detailed information:
page 14 of 38
This warning actually prevents you to deploy the ERM and is rather an error. It tells you in
some columns are missing text/associations but text/association is setup for the model.
Choose table “SalesOrders” and expand it to Full screen you should see the details:
As you can see for no column a text / association is defined for the any of the three
defined associations. Please enter following associations:
Save the model. Saving every few minutes is recommended to prevent time out. Ignore
the warnings of missing associations and save in spite of warnings, press “Save”:
page 16 of 38
Now you are ready to deploy your ERM. During deployment all tables will be generated.
page 18 of 38
Click on the Link in Business name fpr ProductCategories. You will get to detailed table
information in a new screen:
page 19 of 38
With the Up-Arrow Button you can upload data from CSV to your table. Press up-arrow
button. In the following pop-up choose “ProductCategories.csv” from your GIT sales
content folder:
You will a data preview. If it is ok, you can press “Import”. Next you will see a progress
window for your upload and get a notification if upload has finished.
The view will be prepared and you can see the result:
Please upload all other CSV files from the ERM model in the same way. Now you’re ready
and have set up your data.
page 21 of 38
Now drag and drop table SalesOrder to the canvas from left to right. The result should
look like this:
page 22 of 38
If you start dragging a table from left to right there will be created an object “View_1”
which is the output of your graphical View. Now drag table SalesOrderItems and drop it
on SalesOrders. It is important that it will really be dropped on the table SalesOrder. The
result should be like this. Datasphere creates a join automatically:
If you move “SalesOrderItems” about “SalesORders” then you see available options,
how to join them:
page 23 of 38
Standard is Join if you just drop it. IF you want a “Union” you choose it here. The third
option is to replace the old table by the new one.
If you don’t want the action, just press “ESC” and no additional join will be created.
If you select one column you will see on the canvas from which base table it is:
page 26 of 38
As you can see, column “SalesOrderID” is taken from SalesOrders. Duplicate Columns
are disabled. You can recognize them as they are greyed-out. You can rename and
restore columns, if you want to see for example gross amount on header and item level.
Let’s rename gross amount from sales order items and restore it:
Now you have added gross amount on item level to your output:
page 27 of 38
If you choose “Fact” as Semantic Usage” you have the option to create an Analytic
Model which is the preferred object to be exposed to SAC from DataSphere. For use as
Analytic Model we have to make sure that measurements and dimensions are set up
correctly. Highlight all potential measurements in the attributes list. First order all
potential measurements in the list under beneath:
page 29 of 38
Finally move them with drag and drop to the measurements. Measures should now look
like that:
page 30 of 38
And dimensions:
page 32 of 38
We switch to Datasphere:
page 36 of 38
We see all Spaces where we are granted access rights and offer at least one analytic
model. We choose our SPTUTORIAL space.
Here we find our “AMSalesOrderDetails” analytic model. We choose it and add it as data
source to our diagram. We need to define at least one measurement and add one
dimension for our requirement.
page 37 of 38
I hope you enjoyed this tutorial with DataSphere and SAC. More to come soon.