Skip to Content
Author's profile photo Murali Shanmugham

Use Cloud for Analytics to get Real-Time Insights from IoT Devices

The Internet of Things (IoT) is revolutionizing business, generating revenue and improving customer experiences by creating a connected world. SAP HANA Cloud Platform IoT services makes it easier to connect any sensor or device with any app or business process in a company/business network and perform real-time predictive analysis to improve intelligence and decision-making. According to Gartner, the widespread adoption of the Internet of Things (IoT) is driving the utilization of the PaaS.

Provide the Database ID as “hcpta” and select the database system type as HANA MDC. It will take few seconds to create the database.

Once your HANA DB is ready and started, click on the below link to navigate to the HANA Cockpit with the system user and explore the system information. You may create user accounts and assign proper privileges which can be used later for other activities.

Update the bindings for the IoT service

In the start-up blogs referenced above, you would have deployed your MMS. The Message Management Service (MMS) is the component that is responsible for receiving data from devices and sending messages to devices.

Navigate to the Java application and click on “iotmms”

Under “Data source binding” you will see a HANA <shared> schema assigned. This shared schema will be used to store all the data which the MMS receives. This is not a full blown HANA instance as it doesn’t provide us the capability to develop XS applications on top of it.

Delete the binding. Note, all the tables used earlier will no longer be accessible from the IoT services. You will have a fresh DB assigned to your IoT service. Assign the new HANA MDC database as shown below

Now you have a full-fledged HANA DB assigned to your IoT service. You can now go ahead and start building your HANA XS applications on top of it.

Model your HANA Views from heterogeneous sources

Quite often we see requirements where the data captured in IoT tables is not of much value unless you augment it with other business data which is available in your system of records. This is where the HANA Cloud Platform comes into play by providing additional services which enables customers to bring their data from on-premise or cloud solutions to the HANA Cloud Platform and create mashups.

The HANA Cloud Connector is an important piece when it comes to connecting the on-premise SAP backend system with HCP. The Cloud connector runs as on-premise agent in a secured network and acts as a reverse invoke proxy between the on-premise network and SAP HANA Cloud Platform. Customers could use HCI-DS (HANA Cloud Integration – Data Services) or SDI (Smart Data Integration) to provision the HANA tables which are needed for reporting purposes. This could be master data or other transactional data which are required for your reporting purposes.

In next step, I am going to show how you can access these IoT tables (available on HCP) using Eclipse/HANA Studio. I am using Eclipse Luna and have installed all the relevant HANA Plugins.

Add a new Cloud system as shown below

Provide the Account name, User name and your password

The next screen will request you to select a Schema or Database. Select the database you created earlier as show below and provide the SYSTEM credentials

You will be able to see all the Schemas available in the new database.

After you have setup and configured the IoT service, you will be able to stream data to HCP IoT service. You will be able to see the data stored in individual tables in the MMS service as shown below

You can now view the same tables within Eclipse too. If your IoT Tables are growing larger, you can use the SQL Commands here to delete the contents 🙂

In the below image, I have shown an example where there is another schema called  “ERP” which holds tables related to the trucks which are used for Fish Import/Export business (based on the scenario described by Rui in his blog posts).  As mentioned earlier, we could use replication techniques like HDI-DS or SDI to replicate the required data to these tables from the backend system. We can then build views on top of these tables (both from IoT and backend ERP) which can be used for reporting purposes.

There is another blog posted by Nash Gajic where he explains how to create HANA tables and views and consume it in Cloud for Analytics.

Create Mashups using Cloud for Analytics

I am going to take Rui’s Fish Export/Import business and show how we can create visualizations for the IoT data. Staff at the head office need to be able to monitor the temperature of the fish boxes in each truck constantly. The earlier they detect something, they chances that they could still use the fish are high. Below is a report which shows where each of their trucks are and also has a color coding to instantly tell which trucks are having a problem. According to the below report we have two trucks which seem to have a problem – one in the state of Victoria and the other in the Queensland.

The staff could then drill down to view more details of the particular truck which is reported to have a problem. This is where data gets mashed up with ERP system to give more information as to who the truck driver is today and what is the load of the truck. The graph below shows the temperature of the fish box in the last five hours and also has details on the outside temperature. In this case, the Staff would be able to see that the temperature of the fish box dropped from -15 degree to 2 degree in the last two hours.

They also can access all the required information to contact the truck driver and fix the problem instantly

They can also view reports to show the overall operating cost involved with the refrigeration systems which is having a problem. If the costs of repair and maintenance are too high, it is time to replace it.

With the complete maintenance data for the truck and refrigeration system in the backend ERP system, it is now possible to build reports on Cloud for Analytics which can be used to predict failures.  By now you should have a good understanding about how you can use SAP HANA Cloud Platform’s IoT services and Cloud for Analytics to create great and meaningful visualizations.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Moya Watson
      Moya Watson

      Beautiful! Thanks for putting together this really great blog, Murali!

      Author's profile photo Former Member
      Former Member

      Hi Murali,

      This is awesome!

      I have tried same steps few days back by creating MDC database instead of HANA XS instance and then configuring IoT setup/data all again and it worked for me as well. But yes, your great idea of mashing it up with ERP data using relevant connectors is terrific to build advanced analytics and make predictions. I am going to try this now. Thanks for sharing such a great post.



      Author's profile photo Murali Shanmugham
      Murali Shanmugham
      Blog Post Author

      Thanks Megha

      Author's profile photo ASHUTOSH SHRIVASTAVA

      Hi Murli,

      I have created IoT tables which are created in SAP HCP . Now i can see my those tables in Eclipse.

      but these are row based column except "T_IoT_ACKSTORE". Even in your this blog , the selected table is which you are showing is "Row store"

      My question is - how are able to show raw data for "Row store" table. i am not able to change to "column store " by edit option.



      Author's profile photo Anton Levin
      Anton Levin


      Author's profile photo ASHUTOSH SHRIVASTAVA

      Hi Anton,

      Its working now . also assigned object privilege to  SYSTEM.

      could you please share your thought on below things---


      How these two system "SAP HCP" and "SAP HANA Administration console - Eclipse" communicate each other.

      I understand there is no RFC kind of connection exist here.. i think SDK play a role to communicate.

      2> i want to create views on IoT tables which is available in my Schema - system under "SAP HANA Modeler- Eclipse " and populate these views on SAP Business object Design studio.

      What would be right approach--

      configure SAP HANA Modeler- Eclipse to SAP Business object Design studio.


      configure SAP HCP to SAP Business object Design studio.

      Completely clueless, Please suggest, need to clear my concept.



      Author's profile photo Anton Levin
      Anton Levin

      Please, unless you are asking for clarification/correction of some part of the Blog or Document, please create a new Discussion marked as a Question. The Comments section of a Blog (or Document) is not the right vehicle for asking questions as the results are not easily searchable. Once your issue is solved, a Discussion with the solution (and marked with Correct Answer) makes the results visible to others experiencing a similar problem. If a Blog or Document is related, put in a link to it in the Discussion. Read the Getting Started documents (link at the top right of each SCN page) including The SCN Rules of Engagement.

      Also, refer to #9 in SCN Rules of Engagement - Don't cross-post (create multiple copies of the same content) You have already asked above question in How SAP HCP communicate to SAP HANA Administration console - Eclipse

      Author's profile photo ASHUTOSH SHRIVASTAVA


      Sorry for crossing the post.

      If possible could you please reply on newly created discussion

      "How SAP HCP communicate to SAP HANA Administration console-- Eclipse"