Creating live models with HANA data

Objectives
After completing this lesson, you will be able to:

After completing this lesson, you will be able to:

  • Create a live model with with HANA data

SAP HANA integration

SAP HANA and SAP HANA Cloud

SAP Analytics Cloud is integrated with SAP HANA (on premise) and SAP HANA Cloud as follows:

  • Live connections:
    • Available for SAP HANA
    • Available for SAP HANA Cloud
  • Import connections:
    • Available for SAP HANA

In SAP Analytics Cloud, you can create live data connections to SAP HANA Cloud using a live connection with connection type SAP HANA Cloud.

SAP Analytics Cloud can delegate model management to SAP HANA Cloud by building SAP Analytics Cloud models using HANA calculation views as a data source. Calculation views allow users to define more advanced slices on the data available in the SAP HANA database. As a live data connection, no data will be stored on the cloud.

SAP HANA Multi-Dimensional Services (MDS) is used to process multidimensional queries including aggregation, transformation and calculations in SAP Analytics Cloud, SAP HANA Cloud, and SAP HANA on premise.

SAP Analytics Cloud models based on HANA calculation view can improve stories performance by delegating and moving data intensive calculations to SAP HANA Cloud. Pushing down data intensive calculations to the SAP HANA Cloud and only returning the result, optimizes the performance of the SAP Analytics Cloud tenant.

Identify data for SAP HANA models

When working with live models for SAP HANA, you can:

  1. Declare a time dimension, allowing for the use of automatic time determination features in stories.
  2. In the measures tab, the aggregation settings can be adjusted in the live model.
  3. In the dimension tab, dimensions can be renamed, grouped, or hidden.
Model showing both the measures and dimensions tabs for an SAP HANA live model. The set time determination icon is highlighted with a 1, aggregation settings highlighted with a 2, and the dimensions tab with a 3.

Live models in SAP HANA:Below, you can see a story table with time determination options for an SAP HANA live model. It allows for automatic time determination in stories.

Story table with time determination options for an SAP HANA live model. Automatic time options can be accessed fro the input control. Add Time Filters provide options to add Current, Previous, Next, Previous & Current, Current & Next.

To access live SAP HANA Cloud data

Note
This procedure is only for the instructor (SSG setup instructions required prior to demonstration).

You need to access live data from SAP HANA Cloud using a Calculation View.

Steps

  1. Start the SACDEMO instance in HANA Cloud Central.

    1. Open Google Chrome and enter the HANA Cloud Central URL: https://hana-cockpit.cfapps.eu11.hana.ondemand.com/hcs/sap/hana/cloud/index.html#/org/3e841fc3-64b2-4651-b26f-d505a5ab9d19/space/1b1f3f94-1547-4be4-be3c-6c86d0a426e3/databases?databaseguid=32c217f9-64c8-4417-815d-527939a69c61

    2. Sign in to the default identity provider with the User and Password as specified in the SSG.

    3. The SACDEMO should be running. If not, choose ...Actions → Choose Start.

  2. Access the Business Application Studio.

    1. Open a new Google Chrome window, enter URL: https://hana4sac.eu11cf.applicationstudio.cloud.sap/index.html

    2. Next to SACMS1_DEV, choose Start → Wait a few seconds until it is RUNNING.

  3. Click on the SACMS1_DEV space.

  4. From the WORKSPACE on the left, navigate: db → scr → Calculation View.

  5. Double-click CV_inventory_analysis.hdbcalculationview.

  6. Right-click the Aggregation node → select Data Preview.

    Result

    Note
    If you see an error in the Business Application Studio: Failed to get Cloud Foundry token. Please log back in to re-authenticate and reopen the editor. On the lower right, choose the hyperlink: Log in to Cloud Foundry. The link https://api.cr.eu11.hana.ondemand.com appears. Press Enter. Enter user and password provided in the SSG. Select the default organization KTE_HANA_hana4sac and space SACDC. Re-open the Business Application Studio editor. Re-open the Business Application Studio editor.
  7. Now it is time to create an SAC Model to access this data. Go to the SAC browser with the A00 user and password provided in the SSG.

  8. On the upper left, choose the Expand Navigation Bar icon.

  9. Create a model from a live data source.

    1. From the Navigation Bar choose the Modeler icon.

    2. Choose Live Data Model.

  10. Select the live data connection and inventory calculation view.

    1. Select System Type SAP HANA → Select Connection HANACLOUD.

    2. Select Data Source: CV_inventory_analysis.

    Result

    Note
    If the underlying calculation view contains a time field, the time dimension in SAC can be configured and thereby allow automatic time determination in stories. If the underlying calculation view contains a latitude and longitude field, the location dimension in SAC can be configured and thereby allow geo mapping.
  11. Save the model as U##M_SHC_Inventory_Analysis.

  12. Create a story with a table to view the data.

    1. Go to Actions → Story → Canvas.

    2. Choose Table.

    3. Add Product to the rows.

    Result

  13. Close the extra tabs for SAP HANA Cloud.

Create a live model using SAP HANA on premise data

Task 1:

Business example

You need to create a story and to do so, you need to access live data from SAP HANA on premise using a calculation view.

Task flow

In this practice exercise, you will perform the following tasks:

  • Create a live model
  • Use the live model in a new story
  • Use automatic time determination

Save progress to your learning plan by logging in or creating an account

Login or Register