Skip to Content

Introduction

If you are a data analyst for sure you will need to load the timeseries history data for sensor reading or other kind of IoT AE related data into your own tools.

Because you will not have a link to the direct source of data then you’ll need to connect the OData services provided by IoT AE.

IoT AE services security is handled by SAML auth provider and it’s not compatible yet to be consumed by Sap Analytics Cloud. There is an workaround to use a OData “proxy” custom app that is secured with Basic Auth and handles the IoT SAML auth flow inside of it.

This blog post helps you jump start the connection and it’s covering the 2 steps for doing that :

  • Clone and deploy an OData “proxy” secured with Basic Auth on the SCP CF landscape (the data “proxy” is a workaround, the authentication will be probably address in the future by SAP Analytics Cloud)
  • Connect the data to Sap Analytics Cloud

Pre-Required Landscapes and Tools

  • Sap Cloud Platform CF lanscape available
  • CF CLI installed
  • Node.js installed on machine
  • Git CLI or Git GUI with CLI command tools installed
  • Nice IDE or text editor for Node.js
  • IoT AE landscape configured with SCP IoT configured

For downloading tools see resources at the end.

For help with the landscape see blog post :

https://blogs.sap.com/2017/08/24/how-to-create-a-iot-device-and-push-data-via-rest-with-sap-cloud-platform-internet-of-things-service-and-sap-iot-application-enablement/

Get the data from SAP IoT Application Enablement – custom OData Service

 

Clone and configure the OData secure proxy

Internal Repository : https://github.wdf.sap.corp/I335557/AE_Analytics_Cloud

Read the Readme.md file for configuration of your CF env using the file ‘.env’ (dotenv npmjs package is used)

Deploy your OData proxy to SCP CF landscape aftrer configuring it using the manifest.yml file.

 

Test your OData proxy

Open SCP CF cockpit, navigate to your application (account -> subaccount -> org -> space) and find it’s public route.

Open Postman and generate a GET request signed with Basic Auth (user and password you have defined in the “.env” file before deploying app to SCP CF.

Example endpoint used is:

https://APP_NAME.cfapps.eu10.hana.ondemand.com/server.svc/PACKAGE:THING_TYPE/PROPERTY_SET

You should receive data from your IoT AE landscape

 

Connect Data to SAP Analytics Cloud and analyse/display it

  1. Get an SAP Analytics Cloud Tenant (SAC)
  2. Login in to you SAC tenant
  3. Go to Main Menu -> Connections and Create a new connection for OData Service (use and odata version 2.0 service)
  4. Go to Main Menu -> Create -> Model and select “Get data from an app”. After that select “OData Services” as for “Connection Type”, your OData connection from “Connection Name” dropdown and “Create a new query” and click “OK” button
  5. Select and Filter data from your model to be imported in SAC Model
  6. Adjust your SAC Model, name it and after that click the “Create” button (down to the right)
  7. Go to Main Menu -> Create -> Story to create a new dashboard, report or presentation
    1. Start with “Add a canvas page” (you have defined your data model already) and select “Add Data” from the left side menu options. Of course “Existing model” will be present in the dropdown and please select it before pressing “OK” button
    2. Add objects on the canvas (chart or static objects)
  8. More info about defining a data model from OData Service here
  9. More info about creating a story here

 

IoT Application Enablement – Analytics Thing Service Specific

  • Aggregates

Double-Check and make sure you have the proper filtering when creating a new model with a query (more info)

  • Measurements

Double-Check and make sure to have the proper filtering when creating a new model with a query (more info)

 

Conclusions

IoT AE data consumption in other analytics tools is easy and configurable even though you are not provided with SQL access on the backend.

 

Resources

https://www.sap.com/products/cloud-analytics.html

https://www.sapanalytics.cloud/

https://eaexplorer.hana.ondemand.com/_item.html?id=12351#!/overview

https://www.sap.com/developer/topics/iot-application-enablement.html

https://nodejs.org/en/

https://github.com/cloudfoundry/cli

https://git-scm.com/downloads

 

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply