Visualize your IoT Data with SAP Analytics Cloud

Introduction

At the upcoming “DSAG (German SAP User Group) Jahreskongress 2016” I have the chance to present how easily you can work in hybrid (cloud-to-on Premise) SAP landscapes.

In this blog i will show you how easily you can visualize your SAP HCP IoT Data with SAP Analytics Cloud (SAC) and formerly known as SAP BusinessObjects Cloud (BOC).

Since the July release the OData adapter was introduced in SAP Analytics Cloud What’s New in SAP Analytics Cloud and SAP Digital Boardroom – July/August 2016

Please check also this nice blogs, which has me inspired to show the possibility to watch your IoT data in SAP Analytics Cloud:

The Easiest Way to Stream your iPhone’s Sensor Data to HANA Cloud Platform

From Wroclaw to Berlin and back: IoT analysis with SAP Lumira via jdbc

From Wroclaw to Berlin and back with SensorPhone and SAP HCP IoT

Additional my previous blogs about SAP HCP IoT in combination with SAP HCP Integration Service (Data Services):

Use SAP HCP IoT Services and HCP Integration Services (HCI-DS) to get your Sensor Data – Part 1

Use SAP HCP IoT Services and HCP Integration Services (HCI-DS) to get your Sensor Data – Part 2

Use SAP HCP IoT Services and HCP Integration Services (HCI-DS) to get your Sensor Data – Part 3

Let´s start:

To fetch your IoT data open the URL from your BOC tenant:

And create a new connection to your SAP HCP data source:

 

Click the + button and add a new “Import Data Connection” and choose OData as type:

Provide/Select the following details:

  • Connection Name: <your connection name>
  • Description: <your description>
  • Data Source Type: <OData Services>
  • URL: https://<host>/com.sap.iotservices.mms/v1/api/http/app.svc
  • User: <your_suser>
  • pw: <suser_pw>

Acquire and Model your HCP IoT Data

Switch in the SAC to the Modeler and define a new model.

Choose “Get data from an app”:

In the next step choose OData Services as source:

 

 

Define your Data Model and create a new query:

 

Enter a name and a description for your query and select your HCP IoT table which you want to use:

 

In the upcoming next screen build your query and select the required fields, in my example i use C_TIMESTAMP, C_LATITUDE and C_LONGITUDE.

Futhermore i define i filter that i only want to get my favorite data.

 

After you start the import, you are able to see your data as selected:

 

 

 

Convert your Data:

For my scenario i need to transform my data, this is required because i want to use the coordinates in a SAC for Geo Map.

 

  1. Duplicate the C_ALTITUDE column because i want to use this later for my location identifier
  2. create the required location based on the C_LATITUDE and C_LONGITUDE:

 

 

 

As result you get a new column from type location:

 

The last step in the SAC modeler is to save the model with a name of your choice and press “Create Model”:

 

In the overview you can now see your created model:

 

Create your Story

 

Now it´s time to visualize your IoT data, for this switch to the Stories perspective in SAC and create a new story (select Add Canvas):

 

In the next upcoming screen choose “Chart” as object:

 

 

Select your previously created data model as source:

 

 

Afterwards you can now create your visualization:

 

 

Add a Geo Map:

 

Now we need to create a new layer:

 

  1. click on the “Add Layer”
  2. select your data source
  3. select you location dimension and optional change the color, the map etc.:

 

As result you can now see your IoT data:

 

 

You can now scroll into your map and get more details for a specific selection.

Fo example here you can see there was a traffic jam: