Section Goal: Load all required data & models that are the base line for the following exercises.
We have prepared a simple data model to analyze product sales for a prototypical company. For this exercise we will simply load some basic sales tables and their data via replication from SAP HANA Cloud and add a minimal data model by importing a data model file (aka: "CSN import"). This brings us quickly to the starting line of all subsequent exercises.
For better overview of the imported objects and their relationships & details, you'll also create an entity-relationship model and inspect the objects in the impact & lineage analysis.
If your system is an SAP Academy system (URL contains "academy") or an SAP Guided Experience system (URL contains "guided-experience-datasphere") the following steps are for you
-
Select the menu option Data Builder on the left-hand side
-
Select the option New Replication Flow
-
Create a new replication flow to import all relevant tables from source connection HANA_CLOUD and container DSP1_OPENSAP into target connection SAP Datasphere:
-
Select the following 16 source objects:
- Addresses
- BusinessPartners - Business Partners
- Countries
- Employees
- HierarchyDirectory - Hierarchy Directory
- HierarchyDirectoryTexts - Hierarchy Directory Texts
- ProductCategories - Product Categories
- ProductCategoryTexts
- ProductHierarchy - ProductHierarchy
- ProductHierarchyNodes - Product Hierarchy Nodes
- ProductHierarchyNodesTexts - Product Hierarchy Nodes
- Products - Products
- ProductTexts
- Regions
- SalesOrderItems
- SalesOrder - Sales Orders
- Confirm the next dialog
- Your screen should now look like this
-
Now choose Deploy button (top-left of screen) to save and render your replication flow ready to use. Save the flow as RF_Initial_Load
-
Once your RF is deployed, click the Run button (top-left of screen). This allows your local repository to house the source tables you imported from HANA Cloud. Once the run is finished, your final screen will look like this:
If you are doing this exercise outside of SAP TechEd 2023 on an SAP Guided Experience system (i.e. the URL contains "guided-experience-datasphere"), you need to do the following steps
- Launch Space Management
- Go to section Time Data and click Create Time Tables & Dimensions
- In the resulting popup, click Create
- Wait till the confirmation message "Time data created" appears
- Leave Space Management and open Data Builder
- Once replication flow’s run has completed, download the object model description (aka "CSN file") from Github [link]
- Go back to the main screen of Data Builder and import the object model file via + > Import Objects from CSN/JSON file
- You will be prompted to select the objects you want to import. Select the objects with the status of “Ready to Import” and click Import CSN File.
- When prompted, if you want to reimport existing objects, choose to not reimport them, i.e. Click No
- Once those objects are imported, you’ll need to deploy them. Select all object that are not yet deployed and deploy them together
Now you have all the tables, their data and a minimal data model ready in the system. You should now start crafting your entity-relationship model.
-
On the Data Builder screen, select on the E/R Models tab, and click on the New Entity – Relationship Model
-
Within the Repository section (left panel), under Views, you will find the entities necessary to create your initial ER model.
-
Drag the 4VF_SalesOrderItems entity onto the canvas
-
To add related entities, click on the entity and select the “+” sign. In the subsequent dialog choose to add all related entities and confirm.
-
Select all the related entities for 4VF_SalesOrderItems; you will add the additional related entities using the same method until your ER looks like this
-
Deploy your model and name it 4EM_Overview_Simple
-
To inspect all entities, select each one and inspect the View Properties panel on the right side of the screen. This gives details on their properties like semantic usage, columns, measures & attributes (only for 4VF_SalesOrderItems), semantic types as well as associations (also visible in the ER model itself).
-
You can also preview the data of an entity by clicking on the entity and clicking on the Preview Data button on the top left after you selected a node on the canvas.
-
You can also view the impact & lineage graph of an entity by clicking on the Impact and Lineage Analysis button that exists on every node. Note that the subsequent popup makes a differentiation between data lineage and dependency lineage (cp. SAP Help Documentation).
If your system is NOT an SAP academy system or an SAP Guided Experience system, you can still run all exercises as long as you have another SAP Datasphere system at your disposal. There are no requirements with regards to connected backends.
Since the required HANA backend is not available to bring the respective data for our exercises, you'd need to load all data manually via CSV. Mid-term, we'll allow loading the data from SAP Data Marketplace.
In this step, we generate a helper dimension containing time data and its properties.
- Launch Space Management
- Go to section Time Data and click Create Time Tables & Dimensions
- In the resulting popup, click Create
- Wait till the confirmation message "Time data created" appears
- Leave Space Management and open Data Builder
- Once replication flow’s run has completed, download the object model description (aka "CSN file") from Github [link]
- Go back to the main screen of Data Builder and import the object model file via + > Import Objects from CSN/JSON file
- You will be prompted to select which objects you want to import. Select all objects with the status of “Ready to Import” and click Import CSN File.
- When prompted, if you want to reimport existing objects, choose to not reimport them, i.e. Click No
- Once those objects are imported, you’ll need to deploy them. Select all object that are not yet deployed and deploy them together
You'll need to upload data into all tables from CSV files. For SAP TechEd & Guided Experience, the respective data could be loaded from a connected SAP HANA Cloud system, but since your space has no connection to it, you'll need to provide the data manually
- Download the zip file containing all CSVs from Github
- Extract the zip file into some folder on your hard drive
- In Data Builder, choose tab Tables. This will filter the objet list on the tables only
- For each and every table in the list (puh, yes, this is painful 😦), do the following steps
- Open table by clicking on its name in Data Builder
- Choose button Upload CSV in the menu bar
- In the prompt to "Import CSV File", find the file that has the same name as the table at hand
- In the resulting dialog, all columns should automatically be matched and all you need to do is confirm with "Import". If for any reason you need to repeat the step and upload again, ensure to check "Delete Existing Data Before Upload" to avoid duplicate key errors
- Ensure that you have indeed upload data for all tables. If yes, the fun can now start 🎉
Now you have all the tables, their data and a minimal data model ready in the system. You should now start crafting your entity-relationship model.
-
On the Data Builder screen, select on the E/R Models tab, and click on the New Entity – Relationship Model
-
Within the Repository section (left panel), under Views, you will find the entities necessary to create your initial ER model.
-
Drag the 4VF_SalesOrderItems entity onto the canvas
-
To add related entities, click on the entity and select the “+” sign. In the subsequent dialog choose to add all related entities and confirm.
-
Select all the related entities for 4VF_SalesOrderItems; you will add the additional related entities using the same method until your ER looks like this
-
Deploy your model and name it 4EM_Overview_Simple
-
To inspect all entities, select each one and inspect the View Properties panel on the right side of the screen. This gives details on their properties like semantic usage, columns, measures & attributes (only for 4VF_SalesOrderItems), semantic types as well as associations (also visible in the ER model itself).
-
You can also preview the data of an entity by clicking on the entity and clicking on the Preview Data button on the top left after you selected a node on the canvas.
-
You can also view the impact & lineage graph of an entity by clicking on the Impact and Lineage Analysis button that exists on every node. Note that the subsequent popup makes a differentiation between data lineage and dependency lineage (cp. SAP Help Documentation).
Now that you have your data and data model uploaded, we can continue with the core of session's exercises.
Continue to - Exercise 1 - Create Analytic Model