Bus Transport visualizations developed using SAP Hana Cloud Platform and SAP Lumira
Introduction
This document will brief us on how we connect SAP Lumira Desktop with SAP HANA cloud platform and develop bus transport visualizations on the bus data put into SAP HANA Cloud.
Steps:
- Connect to SAP HANA Cloud Platform from Eclipse IDE.
- Create a Calculation View on the data of SAP HANA Cloud Platform using SAP HANA Modeler
- Create a DB Tunnel and Connect SAP Lumira Desktop to SAP HANA Cloud platform using the DB tunnel credentials.
- Once SAP Lumira is connected to SAP HANA Cloud, analyze the data of HANA Cloud Platform by making visualizations.
Firstly, we need to install Eclipse IDE version Mars or Luna. We need to install SAP HANA tools for Eclipse.
Also, we have to register and login to SAP HANA Cloud Cockpit using the given link. https://account.hanatrial.ondemand.com/cockpit
We need to select “Database and Schemas” to create a New trial XS instance of SAP HANA database.
Reading csv file in SAP HANA Cloud Platform
Create a Package and right Click on Package and go to File->Import. Import the CSV file. e.g. bus.csv
Create a new file with the name bus.hdbti and write the following code in it
import = [
{
table = “s0009779955trial.hana::mymodel.bus”;
schema = “_SYS_BIC”;
file = “s0009779955trial.hana:bus.csv”;
header = false;
}];
Create one more file with the name mymodel.hdbdd and write the following code in it.
namespace s0009779955trial.hana;
@Schema: ‘_SYS_BIC’
context mymodel {
type SString: String(60);
@Catalog.tableType: #COLUMN
@nokey Entity busfinal {
busno: Integer;
source: SString;
destination: SString;
arrival: SString;
departure: SString;
distance : Integer;
};
}
Note: Column name in the code above should be same as used in CSV file. Use Quick fix to change the encoding of individual files to UTF-8.
Create Calculation View
1. In the Repository Package in Eclipse IDE, a calculation view of type “Graphical” is created.
2. In the Scenario Editor, we need to link the join node with the aggregation node.
3. Select the aggregation node and add all the columns to output.
4. Semantics node should be selected and the enable analytic privilege checkbox in the Details pane should be deselected
5. View should be Saved and Activated.
The user needs to be granted select privileges. This is done by calling a procedure through the following in SQL Console.
CALL “HCP”.”HCP_GRANT_SELECT_ON_ACTIVATED_OBJECTS”
Catalog Folder is refreshed and generated calculation view can be seen in _SYS_BIC schema.
We can connect “SAP Lumira Desktop” with SAP HANA Cloud Platform by creating a DB tunnel.
We need to run the following command at command prompt.
neo open-db-tunnel -a <account_name> -h <landscape_host> -u <user> -i <schema_ID>
<landscape_host> = hanatrial.ondemand.com
This cmd will give us the password to connect to SAP HANA Cloud Platform.
Once SAP lumira is started, we can connect to SAP HANA Cloud Platform using the credentials of DB tunnel and see the calculation view created in SAP HANA Cloud.
I have made following visualizations in SAP Lumira by making use of SAP HANA cloud platform data.
These visualizations could be helpful for Transport Manager of Bus Service.
The below visualization gives an idea what is the distance between source and destination and which bus no is going on that route.
The below visualization we made use of donut charts. This will tell the distance between two stations and bus number.
This visualization depicts the network chart of all the buses on routes. This shows which all buses are going from source to destination.
This visualization made use of stacked column chart of sap lumira. This shows the bus no and the buses departure time from source station
This visualization also made use of stacked column chart of sap lumira. This shows the bus no and the buses arrival time on destination station.
Hope you like reading my blog.
Please do not forget to provide your valuable feedback and responses.
Thanks & Regards,
Saurabh Raheja
Hi Saurabh ,
Thank you for nice blog.
Which Lumira Desktop version and Drivers you are using to connect HANA?
Hi Sateesh,
Thank you for reading my blog. I worked on Lumira Desktop v 1.27. I think as long as lumira supports connection to sap hana, it will work. I used DB tunnel
To connect lumira to hana cloud platform.
from 1.29 connecting to cloud is removed .
Could you please share any documented evidence of the same ?
Saurabh , I could find supporting doc. Can you create this workflow in lum 1.29 ?
I have not tried for lumira 1.29 .