{"id":6122,"date":"2017-10-12T05:50:42","date_gmt":"2017-10-12T05:50:42","guid":{"rendered":"https:\/\/blog.cloudthat.com\/?p=6122"},"modified":"2024-06-25T11:11:37","modified_gmt":"2024-06-25T11:11:37","slug":"how-to-process-and-present-iot-data-on-microsoft-azure","status":"publish","type":"blog","link":"https:\/\/www.cloudthat.com\/resources\/blog\/how-to-process-and-present-iot-data-on-microsoft-azure","title":{"rendered":"How to Process and Present IoT Data on Microsoft Azure?"},"content":{"rendered":"<p>In my previous article on \u201c<a href=\"https:\/\/blog.cloudthat.com\/the-revolution-chip-esp8266\/?utm_source=blog-website&amp;utm-medium=text-link&amp;utm_content=esp8266-connectivity-with-azure-iot-hub&amp;utm_campaign=how-to-process-and-present-iot-data-on-microsoft-azure?\">ESP8266 Connectivity with Azure IoT Hub<\/a>\u201d we have seen, how to connect IoT device with Azure IoT Hub. We also discussed about how to configure and connect ESP8266 with Azure IoT Hub for hyper-scale messaging in a secured way.<\/p>\n<p>We have data from different IoT devices on Cloud, but it is futile unless we can process that data and present it in some way. When we have tremendous number of IoT devices generating massive unstructured data every second, then you will eventually end up having pile of data with no meaning. Therefore, it is important to process that data and generate some meaningful information from it. As we are in Cloud Computing era, we have some superb services to help us process and present that data. There are many such services out there, but if we talk specifically about Microsoft Services, then we can use Azure Stream Analytics for processing and Microsoft Power BI for presenting data.<\/p>\n<p>So, what are these services?<\/p>\n<p>Azure Stream Analytics helps in streaming millions of events per second in real time and allow us to do processing over that data with great reliability and performance. To know more about Azure Stream Analytics, you can refer the article on \u2018<a href=\"https:\/\/blog.cloudthat.com\/quick-guide-for-processing-gps-data-with-azure-stream-analytics-geo-spatial-functions\/?utm_source=blog-website&amp;utm-medium=text-link&amp;utm_content=azure-stream-analytics&amp;utm_campaign=how-to-process-and-present-iot-data-on-microsoft-azure?\">Azure Stream Analytics<\/a>\u2019 written by Arzan Amaria.<\/p>\n<p>Microsoft Power BI which we are going to use for presenting the processed data is a SaaS Tool and is a collection of services and features to visualize, share and collaborate data.<\/p>\n<p>Now that we know about Azure Stream Analytics and Microsoft Power BI, let\u2019s see how to create connection between IoT Hub which will receive data from different IoT devices, then fetch and process that data using Stream Analytics and finally visualize &amp; present data using Power BI.<\/p>\n<p>Following are the steps to do the same:<\/p>\n<h2><\/h2>\n<h2><strong>Configuring Stream Analytics<\/strong><\/h2>\n<ol>\n<li>\n<h3><strong>Create Stream Analytics Job<\/strong><\/h3>\n<ul>\n<li>Navigate to Microsoft Azure Portal <a href=\"http:\/\/portal.azure.com\/\">http:\/\/portal.azure.com\/<\/a> and login. Click on <strong>NEW<\/strong> icon at top right corner.<\/li>\n<li>Select <strong>Data + Analytics<\/strong> &gt; <strong><strong>Stream Analytics Job<br \/>\n<\/strong><\/strong><a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/azure-stream-analytics.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-6128 size-full\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/azure-stream-analytics.png\" alt=\"Azure Stream Analytics\" width=\"700\" height=\"544\" \/><br \/>\n<\/a><\/li>\n<li>In the next blade, fill up the form with following details\n<ol>\n<li>Job Name: You can use any name that you can identify easily later<\/li>\n<li>Resource Group: Select Create New and enter name for new Resource Group<\/li>\n<li>Location: You can leave as default<\/li>\n<\/ol>\n<\/li>\n<li>Click on <strong>Create<\/strong>. It may take some time for job to get provisioned and become available<\/li>\n<\/ul>\n<\/li>\n<li>\n<h3><strong>Define the Input Data Stream<br \/>\n<\/strong><\/h3>\n<p>Data will come as Data Stream from IoT Hub<\/p>\n<ul>\n<li>Select <strong>Inputs<\/strong> from Overview in your Stream Analytics Job<a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/azure-stream-analytics-1.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-6129 size-full\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/azure-stream-analytics-1.png\" alt=\"Azure Stream Analytics Input\" width=\"700\" height=\"485\" \/><br \/>\n<\/a><\/li>\n<li>Click on <strong>ADD <\/strong>in the new blade<\/li>\n<li>In the next blade, fill up the form with following details\n<ol>\n<li><strong>Input Alias<\/strong>: Name for Input of Stream Analytics<\/li>\n<li><strong>Source<\/strong>: IoT Hub<\/li>\n<li><strong>IoT Hub<\/strong>: Choose the IoT which you created previously<\/li>\n<li>Leave other settings as default<\/li>\n<\/ol>\n<\/li>\n<li>Click on <strong>Create<\/strong><\/li>\n<li>On the <strong>Serialization<\/strong> settings form, leave things as is<\/li>\n<li>Click on check mark at the right bottom corner (after some time a new input will be listed)<\/li>\n<\/ul>\n<\/li>\n<li>\n<h3><strong>Define the Output Data Stream<\/strong><\/h3>\n<ul>\n<li>Select <strong>Inputs<\/strong> from Overview in Stream Analytics Job<a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/azure-stream-analytics-2.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-6130 size-full\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/azure-stream-analytics-2.png\" alt=\"Azure Stream Analytics Output\" width=\"700\" height=\"485\" \/><br \/>\n<\/a><\/li>\n<li>Click on <strong>Add <\/strong>in the new blade<\/li>\n<li>In the next blade, fill up the form with following details\n<ol>\n<li>Output Alias: DeviceBI<\/li>\n<li>Sink: Select Power BI<\/li>\n<li>Authorize Connection: Click on Authorize Button and enter credentials of Power BI<\/li>\n<li>Dataset Name: IoTDatasetSet<\/li>\n<li>Table Name: IoTDataTable<\/li>\n<\/ol>\n<\/li>\n<li>Click on <strong>Create<\/strong> to Proceed<\/li>\n<\/ul>\n<\/li>\n<li>\n<h3>Select <strong>Query<\/strong> from Input in Stream Analytics Job<\/h3>\n<ul>\n<li>Write the query according to your need, below is an example\n<pre class=\"lang:default decode:true \">SELECT\r\n   \tId, Celsius, Humidity, hPa, System.Timestamp AS Timestamp\r\nINTO\r\n    \t[DeviceBI]\r\nFROM\r\n    \t[DeviceInputStream]<\/pre>\n<\/li>\n<li>Click on Save<\/li>\n<li>After the query is saved, click on <strong>Start<\/strong> to start Stream Analytics job<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h2><strong>Build Report in Power BI<\/strong><\/h2>\n<ol>\n<li>Go to <strong>Datasets<\/strong> on left navigation panel, <strong>IoTDataSet<\/strong> should appear there within few minutes once Stream Analytics gets started<\/li>\n<li>Click on IoTDataSet Dataset to open the Report Designer<\/li>\n<li>Select <strong>Line Chart<\/strong> from Visualization Toolbox<\/li>\n<li>From Field Toolbar on right navigation panel select the desired fields to be shown in graph (Celsius, hpa, humidity, etc.)<\/li>\n<li>Drag and drop timestamp from fields to the Axis option in Visualization Toolbar<a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/report-powerBI.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-6131 size-full\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/report-powerBI.jpg\" alt=\"Microsoft Power BI\" width=\"700\" height=\"393\" \/><br \/>\n<\/a><\/li>\n<\/ol>\n<p>There are many other things which you can do using Stream Analytics and Power BI by processing the data in different ways and creating different type of graphs.<\/p>\n<p>Interested to learn more about IoT? We conduct following BootCamps for IoT:<\/p>\n<ol>\n<li><a href=\"https:\/\/cloudthat.in\/course\/fundamentals-of-iot-level-1\/?utm_source=blog-website&amp;utm-medium=text-link&amp;utm_content=fundamentals-of-iot-level-1&amp;utm_campaign=how-to-process-and-present-iot-data-on-microsoft-azure?\" target=\"_blank\" rel=\"noopener\">Fundamentals of IoT \u2013 Level 1<\/a><\/li>\n<li><a href=\"https:\/\/cloudthat.in\/course\/working-with-electronics-in-iot-level-2\/?utm_source=blog-website&amp;utm-medium=text-link&amp;utm_content=working-with-electronics-in-iot-level-2&amp;utm_campaign=how-to-process-and-present-iot-data-on-microsoft-azure?\" target=\"_blank\" rel=\"noopener\">Working with Electronics in IoT \u2013 Level 2<\/a><\/li>\n<li><a href=\"https:\/\/cloudthat.in\/course\/cloud-robotics-and-advanced-iot-architecture-level-3\/?utm_source=blog-website&amp;utm-medium=text-link&amp;utm_content=cloud-robotics-and-advanced-iot-architecture-level-3&amp;utm_campaign=how-to-process-and-present-iot-data-on-microsoft-azure?\" target=\"_blank\" rel=\"noopener\">Cloud Robotics and Advanced IoT Architecture \u2013 Level 3<\/a><\/li>\n<li><a href=\"https:\/\/cloudthat.in\/course\/designing-and-implementing-iot-solutions-level-4\/?utm_source=blog-website&amp;utm-medium=text-link&amp;utm_content=designing-and-implementation-iot-solutions-level-4&amp;utm_campaign=how-to-process-and-present-iot-data-on-microsoft-azure?\" target=\"_blank\" rel=\"noopener\">Designing and Implementing IoT Solutions \u2013 Level 4<\/a><\/li>\n<\/ol>\n<p>Feel free to ask questions or provide your valuable suggestions as comments below. Please share if you like the article.<\/p>\n","protected":false},"author":219,"featured_media":6141,"parent":0,"comment_status":"open","ping_status":"open","template":"","blog_category":[3746,3607,3640,3832],"user_email":"prarthitm@cloudthat.com","published_by":"324","primary-authors":"","secondary-authors":"","acf":[],"_links":{"self":[{"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/blog\/6122"}],"collection":[{"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/users\/219"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/comments?post=6122"}],"version-history":[{"count":1,"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/blog\/6122\/revisions"}],"predecessor-version":[{"id":45923,"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/blog\/6122\/revisions\/45923"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/media?parent=6122"}],"wp:term":[{"taxonomy":"blog_category","embeddable":true,"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/blog_category?post=6122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}