Skip to Content

Visualize the Prediction and Flag Periods Indicating the Heat Death of the Universe

test
0 %
Visualize the Prediction and Flag Periods Indicating the Heat Death of the Universe
Details
// Explore More Tutorials

Visualize the Prediction and Flag Periods Indicating the Heat Death of the Universe

09/20/2018

Configure the HDI container to access the data from the predictive model and create a calculation view to compare the prediction with actual measurements.

You will learn

  • How to access plain schema from an HDI Container
  • How to create database objects using design-time artifacts
  • How to create a calculation view of type cube

THIS TUTORIAL SERIES CAN ONLY BE EXECUTED AT TECHED as it is. Please find us at the Google booth in the AppSpace and we will provide everything you will need.


Step 1: Add the user-provided service to your multi-target application

Go into the coding tools in SAP Web IDE for SAP HANA. Right-click on the database module and choose Modeling actions -> Add External SAP HANA Service.

Add service

Mark Existing User Provided Service and use the name CROSS_SCHEMA_BIG.

Add service

Click Finish.

Log on to answer question
Step 2: Import tables and data

To make the most of your time, you will import some pre-created tables and data to compare the current temperature measurements to the predictions.

Right-click on the project and use Import -> File or Project.

Import

Choose the file db.zip in the Desktop of your computer

Import

Leave the default values and click OK

Import

Confirm overwriting the existing files

Import

Once imported, expand the db module and Build the two inner folders

Import
Log on to answer question
Step 3: Create a calculation view

The import has created two tables and filled them with data. Those tables include a mapping for the periods to interpret the output of the predictive algorithm and some fake current measurements.

The objective of the calculation view you will create is to compare the predicted temperatures to current (fake) measurements.

You will find an empty folder called models. Right-click on it and choose New -> Calculation View.

New CV

Call it HEAT_DEATH and click OK

New CV

Start by clicking on the join node and then clicking on the canvas to drop it

New CV

Click on the + sign to add a data source.

Check the CROSS_SCHEMA_BIG service and search for OUT. Choose the OUTPUT_RESULTS table and click Finish.

New CV

Click the + again to add another source. Choose PERIODS.

New CV

Double-click on the Join node

New CV

And drag the ID column from the left to the ID column on the right to connect them

New CV

Set the join to inner, set the cardinality to 1..1 and click Mapping.

New CV

Double-click or drag the columns PERIOD, FORECAST and HI95 to the output

New CV
Log on to answer question
Step 4: Join data from current temperature

Drop a new join node into the canvas. Join the existing node with a new one using the connecting arrow on Join_1.

New CV

Use the + sign to add another data source

New CV

Add CURRENT_TEMP, which was imported from the local db.zip file

New CV

Join them by PERIOD

New CV

Add AVG_TEMP, PERIOD, FORECAST AND HI95 to the mapping

New CV

Connect the second join to the Aggregation node

New CV

Add all of the columns to the output

New CV

Click on Calculated Columns and add a calculated column

New CV

Open the editor for calculated columns

New CV

Call the column FLAG_HEAT_DEATH, set it to Column engine and add the following formula:

IF("AVG_TEMP">"HI95",'Y','N')
New CV
Log on to answer question
Step 5: Save, build and preview

Save and Build the view

New CV

Once the build is complete, right-click on the view and use Data Preview to view the results

New CV

You can drag the PERIOD into the Label Axis and the AVG_TEMP and FORECAST into the Value Axis. A line chart will be enough to visualize this

New CV

Click on Raw Data to complete the validation below.

Which of the following months are NOT flagged to indicate the Heat Death of the Universe?
×

Next Steps

Back to top