{"id":6395,"date":"2021-07-16T08:00:12","date_gmt":"2021-07-16T02:30:12","guid":{"rendered":"https:\/\/www.upnxtblog.com\/?p=6395"},"modified":"2021-07-11T08:40:44","modified_gmt":"2021-07-11T03:10:44","slug":"hot-path-analytics-with-cosmosdb-and-azure-functions","status":"publish","type":"post","link":"https:\/\/www.upnxtblog.com\/index.php\/2021\/07\/16\/hot-path-analytics-with-cosmosdb-and-azure-functions\/","title":{"rendered":"Hot Path Analytics with CosmosDB and Azure Functions"},"content":{"rendered":"<div class='booster-block booster-read-block'><\/div><p>The <a href=\"https:\/\/www.upnxtblog.com\/index.php\/2018\/01\/03\/12-open-source-iot-platforms-that-you-should-know\/\">Internet of Things (IoT)<\/a> has opened up a new, virtually inexhaustible source of technical innovations, which are equally valuable for a broad variety of industries. Applying smart connected devices, sensors, and gateways to control each part of the production process, manufacturing, and infrastructure companies are dramatically increasing their operational efficiency. At the same time, the consumer tech market has exploded with an abundance of smart products and spin-off cloud services that they brought to life. In this article, we are going to look at one of the IoT use cases on how to perform Hot Path Analytics with CosmosDB and Azure Functions.<\/p>\n<p>According to lambda architecture, there are two paths for data to flow in the analytics pipeline<\/p>\n<figure style=\"width: 1396px\" class=\"wp-caption alignnone\"><img data-recalc-dims=\"1\" decoding=\"async\" class=\"size-full lazyload\" data-src=\"https:\/\/i0.wp.com\/www.oreilly.com\/library\/view\/mastering-azure-analytics\/9781491956649\/assets\/maza_0102.png?resize=1140%2C415&#038;ssl=1\" width=\"1140\" height=\"415\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1140px; --smush-placeholder-aspect-ratio: 1140\/415;\" \/><figcaption class=\"wp-caption-text\">Image &#8211; lambda architecture describing various flows<\/figcaption><\/figure>\n<ul>\n<li><strong>A \u201chot\u201d path<\/strong> where latency-sensitive data, results need to be ready in seconds or less and it flows for rapid consumption by analytics clients.<\/li>\n<li><strong>A \u201ccold\u201d path<\/strong> where all data goes and is processed in batches that can tolerate greater latencies until results are ready.<\/li>\n<\/ul>\n\n<h2>Why Azure Cosmos DB?<\/h2>\n<p><a href=\"https:\/\/www.upnxtblog.com\/index.php\/2017\/12\/18\/azure-functions-tutorial-on-http-trigger-store-data-in-cosmos-db\/\">Azure Cosmos DB<\/a> is Microsoft&#8217;s globally distributed, multi-model database. With the click of a button, it enables you to elastically and independently scale throughput and storage across any number of Azure&#8217;s geographic regions. It offers throughput, latency, availability, and consistency guarantees with comprehensive service level agreements (SLAs), something no other database service can offer.<\/p>\n<figure style=\"width: 1280px\" class=\"wp-caption alignnone\"><img data-recalc-dims=\"1\" decoding=\"async\" style=\"--smush-placeholder-width: 1140px; --smush-placeholder-aspect-ratio: 1140\/684;font-family: inherit; font-size: 18px; font-style: inherit; font-weight: inherit;\" data-src=\"https:\/\/i0.wp.com\/docs.microsoft.com\/en-us\/azure\/cosmos-db\/media\/introduction\/azure-cosmos-db.png?resize=1140%2C684&#038;ssl=1\" alt=\"Azure Cosmos DB\" width=\"1140\" height=\"684\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" \/><figcaption class=\"wp-caption-text\">Image &#8211; Azure Cosmos DB<\/figcaption><\/figure>\n<p>You can <a href=\"https:\/\/azure.microsoft.com\/try\/cosmosdb\/\" data-linktype=\"external\" target=\"_blank\" rel=\"noopener\">Try Azure Cosmos DB for free<\/a> without an Azure subscription, free of charge and commitments.<\/p>\n<p>As a globally distributed database service, Azure Cosmos DB provides the following capabilities to help you build scalable, highly responsive applications:<\/p>\n<h3>Key Capabilities<\/h3>\n<ul>\n<li><strong>Turnkey global distribution<\/strong> &#8211;\u00a0You can distribute your data to any number of Azure regions, with the click of a button. This enables you to put your data where your users are, ensuring the lowest possible latency to your customers.<\/li>\n<li><strong>Multiple data models and popular APIs for accessing and querying data<\/strong> &#8211;\u00a0APIs for the following data models are supported with SDKs available in multiple languages:\n<ul>\n<li><strong>DocumentDB API:<\/strong> A schema-less JSON database engine with SQL querying capabilities.<\/li>\n<li><strong>MongoDB API:<\/strong> A MongoDB database service built on top of Cosmos DB.<\/li>\n<li><strong>Table API:<\/strong> A key-value database service built to provide premium capabilities for Azure Table storage applications.<\/li>\n<li><strong>Graph (Gremlin) API:<\/strong> A graph database service built following the <a href=\"http:\/\/tinkerpop.apache.org\/\" data-linktype=\"external\" target=\"_blank\" rel=\"noopener\">Apache TinkerPop specification<\/a>.<\/li>\n<li><strong>Cassandra API:<\/strong> A key\/value store built on the <a href=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/05\/11\/portworx-tutorial-demonstrate-ha-cassandra-stateful-application\/\">Apache Cassandra<\/a> implementation.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Elastically scale throughput and storage on demand, worldwide\u00a0<\/strong><\/li>\n<li><strong>Support for highly responsive and mission-critical applications<\/strong><\/li>\n<li><strong>&#8220;always on&#8221; availability<\/strong><\/li>\n<li><strong>No database schema\/index management<\/strong><\/li>\n<\/ul>\n<h2>#1.Create a device<\/h2>\n<p>We will be using the <a href=\"https:\/\/azure.microsoft.com\/en-in\/services\/iot-hub\/\" target=\"_blank\" rel=\"noopener\">Azure IoT Hub<\/a> service to connect the device simulator and start sending data. Azure IoT Hub is a fully managed service that enables reliable and secure bidirectional communications between millions of IoT devices and a solution back end.<\/p>\n<p>With IoT Hub you can:<\/p>\n<ol>\n<li><strong>Establish<\/strong>\u00a0bi-directional communication with billions of IoT devices<\/li>\n<li><strong>Authenticate<\/strong>\u00a0per device for security-enhanced IoT solutions<\/li>\n<li><strong>Register<\/strong>\u00a0devices at scale with IoT Hub Device Provisioning Service<\/li>\n<li><strong>Manage<\/strong>\u00a0your IoT devices at scale with device management<\/li>\n<li><strong>Extend<\/strong>\u00a0the power of the cloud to your edge device<\/li>\n<\/ol>\n<p>To start, click on <strong>Create a resource<\/strong> and click on the\u00a0<strong>Internet of Things.<\/strong><\/p>\n<figure id=\"attachment_4786\" aria-describedby=\"caption-attachment-4786\" style=\"width: 584px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"4786\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/02\/05\/visualize-iot-scale-time-series-data-using-azure-time-series-insights\/iot0\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot0.png?fit=584%2C612&amp;ssl=1\" data-orig-size=\"584,612\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"iot0\" data-image-description=\"&lt;p&gt;Create Resource&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Create Resource&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot0.png?fit=584%2C612&amp;ssl=1\" class=\"size-full wp-image-4786 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot0.png?resize=584%2C612&#038;ssl=1\" alt=\"\" width=\"584\" height=\"612\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot0.png?w=584&amp;ssl=1 584w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot0.png?resize=286%2C300&amp;ssl=1 286w\" data-sizes=\"auto, (max-width: 584px) 100vw, 584px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 584px; --smush-placeholder-aspect-ratio: 584\/612;\" \/><figcaption id=\"caption-attachment-4786\" class=\"wp-caption-text\">Image &#8211; Create Resource<\/figcaption><\/figure>\n<p>Create an IoT Hub to connect your real device or simulator.<\/p>\n<figure id=\"attachment_4785\" aria-describedby=\"caption-attachment-4785\" style=\"width: 902px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"4785\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/02\/05\/visualize-iot-scale-time-series-data-using-azure-time-series-insights\/iot1\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot1.png?fit=902%2C588&amp;ssl=1\" data-orig-size=\"902,588\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"iot1\" data-image-description=\"&lt;p&gt;Create IoT Hub&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Create IoT Hub&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot1.png?fit=902%2C588&amp;ssl=1\" class=\"size-full wp-image-4785 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot1.png?resize=902%2C588&#038;ssl=1\" alt=\"\" width=\"902\" height=\"588\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot1.png?w=902&amp;ssl=1 902w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot1.png?resize=300%2C196&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot1.png?resize=768%2C501&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot1.png?resize=600%2C391&amp;ssl=1 600w\" data-sizes=\"auto, (max-width: 902px) 100vw, 902px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 902px; --smush-placeholder-aspect-ratio: 902\/588;\" \/><figcaption id=\"caption-attachment-4785\" class=\"wp-caption-text\">Image &#8211; Create IoT Hub<\/figcaption><\/figure>\n<p>Use an existing resource group or create a new one. In the Name field, enter a unique name for your IoT hub. The name of your IoT Hub must be <strong>unique<\/strong> across all IoT hubs.<\/p>\n<figure id=\"attachment_4787\" aria-describedby=\"caption-attachment-4787\" style=\"width: 883px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"4787\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/02\/05\/visualize-iot-scale-time-series-data-using-azure-time-series-insights\/iot2\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot2.png?fit=883%2C526&amp;ssl=1\" data-orig-size=\"883,526\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"iot2\" data-image-description=\"&lt;p&gt;Select Tier&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Select Tier&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot2.png?fit=883%2C526&amp;ssl=1\" class=\"size-full wp-image-4787 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot2.png?resize=883%2C526&#038;ssl=1\" alt=\"\" width=\"883\" height=\"526\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot2.png?w=883&amp;ssl=1 883w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot2.png?resize=300%2C179&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot2.png?resize=768%2C457&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot2.png?resize=600%2C357&amp;ssl=1 600w\" data-sizes=\"auto, (max-width: 883px) 100vw, 883px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 883px; --smush-placeholder-aspect-ratio: 883\/526;\" \/><figcaption id=\"caption-attachment-4787\" class=\"wp-caption-text\">Image &#8211; Select Tier<\/figcaption><\/figure>\n<p>In the Tier filed, select\u00a0<strong>S1 tier<\/strong>. You can choose from several tiers depending on how many features you want and how many messages you send per day.<\/p>\n<p>For details about the tier options, check out <a href=\"https:\/\/azure.microsoft.com\/en-us\/pricing\/details\/iot-hub\/\" rel=\"nofollow noopener\" target=\"_blank\">Choosing the right IoT Hub tier<\/a>.<\/p>\n<figure id=\"attachment_4806\" aria-describedby=\"caption-attachment-4806\" style=\"width: 540px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"4806\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/02\/05\/visualize-iot-scale-time-series-data-using-azure-time-series-insights\/iot3\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot3.png?fit=540%2C584&amp;ssl=1\" data-orig-size=\"540,584\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"iot3\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; IoT Hub Summary details &lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot3.png?fit=540%2C584&amp;ssl=1\" class=\"size-full wp-image-4806 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot3.png?resize=540%2C584&#038;ssl=1\" alt=\"\" width=\"540\" height=\"584\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot3.png?w=540&amp;ssl=1 540w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot3.png?resize=277%2C300&amp;ssl=1 277w\" data-sizes=\"auto, (max-width: 540px) 100vw, 540px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 540px; --smush-placeholder-aspect-ratio: 540\/584;\" \/><figcaption id=\"caption-attachment-4806\" class=\"wp-caption-text\">Image &#8211; IoT Hub Summary details<\/figcaption><\/figure>\n<p>Now that IoT Hub is created, we would be connecting Devices in the next steps.<\/p>\n<h2>#2.Connect the simulator to IoT Hub<\/h2>\n<p>Go To your IoT Hub in the portal and click on\u00a0<strong>IoT Devices,<\/strong> Click on<strong>+ Add<\/strong>\u00a0and enter a\u00a0<strong>Device and<\/strong>\u00a0click\u00a0<strong>Save.<\/strong><\/p>\n<figure id=\"attachment_4807\" aria-describedby=\"caption-attachment-4807\" style=\"width: 589px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"4807\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/02\/05\/visualize-iot-scale-time-series-data-using-azure-time-series-insights\/iot4\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot4.png?fit=589%2C546&amp;ssl=1\" data-orig-size=\"589,546\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"iot4\" data-image-description=\"&lt;p&gt;Create Device on the IoT Hub&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Create Device on the IoT Hub&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot4.png?fit=589%2C546&amp;ssl=1\" class=\"size-full wp-image-4807 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot4.png?resize=589%2C546&#038;ssl=1\" alt=\"\" width=\"589\" height=\"546\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot4.png?w=589&amp;ssl=1 589w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot4.png?resize=300%2C278&amp;ssl=1 300w\" data-sizes=\"auto, (max-width: 589px) 100vw, 589px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 589px; --smush-placeholder-aspect-ratio: 589\/546;\" \/><figcaption id=\"caption-attachment-4807\" class=\"wp-caption-text\">Image &#8211; Create Device on the IoT Hub<\/figcaption><\/figure>\n<p>Once the device is created, click on the device and copy the <strong>Primary Connection String<\/strong>.<\/p>\n<figure id=\"attachment_4809\" aria-describedby=\"caption-attachment-4809\" style=\"width: 1170px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" class=\"wp-image-4809 size-full lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot5.png?resize=1140%2C530&#038;ssl=1\" alt=\"\" width=\"1140\" height=\"530\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1140px; --smush-placeholder-aspect-ratio: 1140\/530;\" \/><figcaption id=\"caption-attachment-4809\" class=\"wp-caption-text\">Image &#8211; Copy Primary Connection string<\/figcaption><\/figure>\n<p>Go to <a href=\"https:\/\/azure-samples.github.io\/raspberry-pi-web-simulator\/#GetStarted\" rel=\"nofollow noopener\" target=\"_blank\">PI Simulator <\/a>and replace the connection string with the Primary Connection String copied in the previous step.<\/p>\n<figure id=\"attachment_4813\" aria-describedby=\"caption-attachment-4813\" style=\"width: 1093px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"4813\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/02\/05\/visualize-iot-scale-time-series-data-using-azure-time-series-insights\/iot6\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot6.png?fit=1093%2C577&amp;ssl=1\" data-orig-size=\"1093,577\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"iot6\" data-image-description=\"&lt;p&gt;Replace the connection string with the primary key connection string &lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Replace the connection string with the primary key connection string &lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot6.png?fit=1024%2C541&amp;ssl=1\" class=\"size-full wp-image-4813 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot6.png?resize=1093%2C577&#038;ssl=1\" alt=\"\" width=\"1093\" height=\"577\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot6.png?w=1093&amp;ssl=1 1093w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot6.png?resize=300%2C158&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot6.png?resize=1024%2C541&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot6.png?resize=768%2C405&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot6.png?resize=600%2C317&amp;ssl=1 600w\" data-sizes=\"auto, (max-width: 1093px) 100vw, 1093px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1093px; --smush-placeholder-aspect-ratio: 1093\/577;\" \/><figcaption id=\"caption-attachment-4813\" class=\"wp-caption-text\">Image &#8211; Replace the connection string with the primary key connection string<\/figcaption><\/figure>\n<p>Click <strong>Run<\/strong> and start sending messages. LED will start blinking, Messages will start flowing into IoT Hub that we created in the previous step. The next step is to create Cosmos DB to hold the processed data.<\/p>\n<h2>#3.Create Cosmos DB account<\/h2>\n<p>To start with, click on <strong>Create a resource<\/strong> and click on the\u00a0<strong>Azure Cosmos DB.<\/strong><\/p>\n<figure id=\"attachment_4996\" aria-describedby=\"caption-attachment-4996\" style=\"width: 564px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"4996\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/05\/04\/hot-path-analytics-with-cosmosdb-and-azure-stream-analytics\/cos1\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/cos1.png?fit=564%2C561&amp;ssl=1\" data-orig-size=\"564,561\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"cos1\" data-image-description=\"&lt;p&gt;Create Cosmos DB account&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Create Cosmos DB account&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/cos1.png?fit=564%2C561&amp;ssl=1\" class=\"size-full wp-image-4996 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/cos1.png?resize=564%2C561&#038;ssl=1\" alt=\"\" width=\"564\" height=\"561\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/cos1.png?w=564&amp;ssl=1 564w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/cos1.png?resize=300%2C298&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/cos1.png?resize=150%2C150&amp;ssl=1 150w\" data-sizes=\"auto, (max-width: 564px) 100vw, 564px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 564px; --smush-placeholder-aspect-ratio: 564\/561;\" \/><figcaption id=\"caption-attachment-4996\" class=\"wp-caption-text\">Image &#8211; Create Cosmos DB account<\/figcaption><\/figure>\n<p>Follow the wizard to create a new database, for this tutorial, I have chosen SQL API which is a schema-less JSON database engine with rich SQL querying capabilities. There are also other APIs available that might be suitable for your scenario.<\/p>\n<figure id=\"attachment_4997\" aria-describedby=\"caption-attachment-4997\" style=\"width: 713px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"4997\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/05\/04\/hot-path-analytics-with-cosmosdb-and-azure-stream-analytics\/cos2\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/cos2.png?fit=713%2C546&amp;ssl=1\" data-orig-size=\"713,546\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"cos2\" data-image-description=\"&lt;p&gt;Create Cosmos DB account&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Create Cosmos DB account&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/cos2.png?fit=713%2C546&amp;ssl=1\" class=\"size-full wp-image-4997 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/cos2.png?resize=713%2C546&#038;ssl=1\" alt=\"\" width=\"713\" height=\"546\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/cos2.png?w=713&amp;ssl=1 713w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/cos2.png?resize=300%2C230&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/cos2.png?resize=600%2C459&amp;ssl=1 600w\" data-sizes=\"auto, (max-width: 713px) 100vw, 713px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 713px; --smush-placeholder-aspect-ratio: 713\/546;\" \/><figcaption id=\"caption-attachment-4997\" class=\"wp-caption-text\">Image &#8211; Create Cosmos DB account<\/figcaption><\/figure>\n<p>Now that we have IoT Hub and DB ready, our next step is to create a new function app to process the same.<\/p>\n<h2>#4.Create new Azure Functions app<\/h2>\n<p><a href=\"https:\/\/azure.microsoft.com\/en-in\/services\/functions\/\" target=\"_blank\" rel=\"noopener\">Azure Functions<\/a> is a <a href=\"https:\/\/www.upnxtblog.com\/index.php\/2017\/12\/01\/serverless-comparison-aws-lambda-vs-azure-functions-vs-google-functions\/\">serverless<\/a> computing platform that allows to write less code and manage less infrastructure. Rather than worrying about building and managing server infrastructure, the cloud infrastructure delivers all of the resources necessary to keep the applications running.<\/p>\n<p>From the Azure Portal, click on <strong>Create a resource<\/strong> and on the <strong>Function App.<\/strong><\/p>\n<figure id=\"attachment_6397\" aria-describedby=\"caption-attachment-6397\" style=\"width: 668px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"6397\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2021\/07\/16\/hot-path-analytics-with-cosmosdb-and-azure-functions\/functionapp\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp.png?fit=668%2C505&amp;ssl=1\" data-orig-size=\"668,505\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"FunctionApp\" data-image-description=\"&lt;p&gt;Create Function App&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Create Function App&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp.png?fit=668%2C505&amp;ssl=1\" class=\"size-full wp-image-6397 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp.png?resize=668%2C505&#038;ssl=1\" alt=\"\" width=\"668\" height=\"505\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp.png?w=668&amp;ssl=1 668w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp.png?resize=300%2C227&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp.png?resize=600%2C454&amp;ssl=1 600w\" data-sizes=\"auto, (max-width: 668px) 100vw, 668px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 668px; --smush-placeholder-aspect-ratio: 668\/505;\" \/><figcaption id=\"caption-attachment-6397\" class=\"wp-caption-text\">Image &#8211; Create Function App<\/figcaption><\/figure>\n<p>Choose the subscription, either create a new Resource group or choose the existing one. Under the instance details, enter Function App Name and choose Runtime stack as Node.js and version.<\/p>\n<p>Azure Functions code can be written either in <a href=\"https:\/\/docs.microsoft.com\/en-in\/azure\/azure-functions\/supported-languages\" data-linktype=\"relative-path\" target=\"_blank\" rel=\"noopener\">C#, Java, JavaScript, PowerShell, or Python<\/a>, or use a\u00a0<a href=\"https:\/\/docs.microsoft.com\/en-in\/azure\/azure-functions\/functions-custom-handlers\" data-linktype=\"relative-path\" target=\"_blank\" rel=\"noopener\">custom handler<\/a>\u00a0to use virtually any other language.<\/p>\n<figure id=\"attachment_6398\" aria-describedby=\"caption-attachment-6398\" style=\"width: 825px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"6398\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2021\/07\/16\/hot-path-analytics-with-cosmosdb-and-azure-functions\/functionapp1\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp1.png?fit=825%2C616&amp;ssl=1\" data-orig-size=\"825,616\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"FunctionApp1\" data-image-description=\"&lt;p&gt;Create Function App&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Create Function App&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp1.png?fit=825%2C616&amp;ssl=1\" class=\"size-full wp-image-6398 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp1.png?resize=825%2C616&#038;ssl=1\" alt=\"\" width=\"825\" height=\"616\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp1.png?w=825&amp;ssl=1 825w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp1.png?resize=300%2C224&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp1.png?resize=768%2C573&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp1.png?resize=600%2C448&amp;ssl=1 600w\" data-sizes=\"auto, (max-width: 825px) 100vw, 825px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 825px; --smush-placeholder-aspect-ratio: 825\/616;\" \/><figcaption id=\"caption-attachment-6398\" class=\"wp-caption-text\">Image &#8211; Create Function App<\/figcaption><\/figure>\n<p>Click on <strong>&#8216;Next: Hosting&#8217;<\/strong> to review details on the operating system, storage, consumption plan, and then click on <strong>&#8216;Review + create&#8217; <\/strong>to create the Function App.<\/p>\n<figure id=\"attachment_6399\" aria-describedby=\"caption-attachment-6399\" style=\"width: 759px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"6399\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2021\/07\/16\/hot-path-analytics-with-cosmosdb-and-azure-functions\/functionapp2\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp2.png?fit=759%2C603&amp;ssl=1\" data-orig-size=\"759,603\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"FunctionApp2\" data-image-description=\"&lt;p&gt;Create Function App&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Create Function App&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp2.png?fit=759%2C603&amp;ssl=1\" class=\"size-full wp-image-6399 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp2.png?resize=759%2C603&#038;ssl=1\" alt=\"\" width=\"759\" height=\"603\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp2.png?w=759&amp;ssl=1 759w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp2.png?resize=300%2C238&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp2.png?resize=600%2C477&amp;ssl=1 600w\" data-sizes=\"auto, (max-width: 759px) 100vw, 759px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 759px; --smush-placeholder-aspect-ratio: 759\/603;\" \/><figcaption id=\"caption-attachment-6399\" class=\"wp-caption-text\">Image &#8211; Create Function App<\/figcaption><\/figure>\n<p>Once the Function App is created, from the left pane, click on the &#8216;<strong>Functions<\/strong>&#8216; option to add a new Function.<\/p>\n<figure id=\"attachment_6400\" aria-describedby=\"caption-attachment-6400\" style=\"width: 281px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"6400\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2021\/07\/16\/hot-path-analytics-with-cosmosdb-and-azure-functions\/functionapp4\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp4.png?fit=281%2C616&amp;ssl=1\" data-orig-size=\"281,616\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"FunctionApp4\" data-image-description=\"&lt;p&gt;Create new Function&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Create new Function&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp4.png?fit=281%2C616&amp;ssl=1\" class=\"size-full wp-image-6400 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp4.png?resize=281%2C616&#038;ssl=1\" alt=\"\" width=\"281\" height=\"616\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp4.png?w=281&amp;ssl=1 281w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp4.png?resize=137%2C300&amp;ssl=1 137w\" data-sizes=\"auto, (max-width: 281px) 100vw, 281px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 281px; --smush-placeholder-aspect-ratio: 281\/616;\" \/><figcaption id=\"caption-attachment-6400\" class=\"wp-caption-text\">Image &#8211; Create new Function<\/figcaption><\/figure>\n<p>Once the page is launched, click on <strong>&#8216;+ Add&#8217;<\/strong> to create a new function. Choose <strong>IoT Hub (Event Hub)<\/strong> as the template.<\/p>\n<figure id=\"attachment_6403\" aria-describedby=\"caption-attachment-6403\" style=\"width: 1346px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"6403\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2021\/07\/16\/hot-path-analytics-with-cosmosdb-and-azure-functions\/functionapp5\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp5.png?fit=1346%2C589&amp;ssl=1\" data-orig-size=\"1346,589\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"FunctionApp5\" data-image-description=\"&lt;p&gt;Create new function&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Create new function&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp5.png?fit=1024%2C448&amp;ssl=1\" class=\"size-full wp-image-6403 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp5.png?resize=1140%2C499&#038;ssl=1\" alt=\"\" width=\"1140\" height=\"499\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp5.png?w=1346&amp;ssl=1 1346w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp5.png?resize=300%2C131&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp5.png?resize=1024%2C448&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp5.png?resize=768%2C336&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp5.png?resize=600%2C263&amp;ssl=1 600w\" data-sizes=\"auto, (max-width: 1140px) 100vw, 1140px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1140px; --smush-placeholder-aspect-ratio: 1140\/499;\" \/><figcaption id=\"caption-attachment-6403\" class=\"wp-caption-text\">Image &#8211; Create a new function<\/figcaption><\/figure>\n<p>Add the below code in the <strong>&#8216;Code + Test&#8217;<\/strong> tab to store each IoT Hub message onto <code>messageToStore<\/code> variable and then <code>outputDocument<\/code> is bound to <code>payload<\/code> variable,\u00a0 gets stored in Cosmos DB.<\/p>\n<div>\n<div><code>module.exports = function (context, IoTHubMessages) {<\/code><\/div>\n<div><code>context.log(`JavaScript eventhub trigger function called for message array: ${IoTHubMessages}`);<\/code><\/div>\n<div><\/div>\n<div><code>var payload = [];<\/code><\/div>\n<div><\/div>\n<div><code>IoTHubMessages.forEach(message =&gt; {<\/code><\/div>\n<div><code>context.log(`Processed message: ${message}`);<\/code><\/div>\n<div><code>var messageToStore = { id: message.id,source: message.source,specversion: message.specversion,type: message.type,time: message.time, privacyrelevant: message.privacyrelevant,datacontenttype: message.datacontenttype,dataschema: message.dataschema,subject: message.subject,timeRunStarted: message.data.timeRunStarted,timeRunCompleted: message.data.timeRunCompleted,timeRunCancelled: message.data.timeRunCancelled,timeRunAborted: message.data.timeRunAborted,instrumentName: message.data.instrumentName,instrumentFamily: message.data.instrumentFamily,runId : message.data.runId,status : message.data.status,reason : message.data.reason,createdBy : message.data.createdBy,location : message.data.location };<\/code><\/div>\n<div><code>payload.push(messageToStore);<\/code><\/div>\n<div><code>context.log(`Payload ${payload}`);<\/code><\/div>\n<div><code>});<\/code><\/div>\n<div><\/div>\n<div><code>context.bindings.outputDocument = payload;<\/code><\/div>\n<div><code>context.done();<\/code><\/div>\n<div><code>};<\/code><\/div>\n<\/div>\n<figure id=\"attachment_6404\" aria-describedby=\"caption-attachment-6404\" style=\"width: 1352px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"6404\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2021\/07\/16\/hot-path-analytics-with-cosmosdb-and-azure-functions\/functionapp6\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp6.png?fit=1352%2C570&amp;ssl=1\" data-orig-size=\"1352,570\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"FunctionApp6\" data-image-description=\"&lt;p&gt;Add code to store the data&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Add code to store the data&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp6.png?fit=1024%2C432&amp;ssl=1\" class=\"size-full wp-image-6404 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp6.png?resize=1140%2C481&#038;ssl=1\" alt=\"\" width=\"1140\" height=\"481\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp6.png?w=1352&amp;ssl=1 1352w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp6.png?resize=300%2C126&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp6.png?resize=1024%2C432&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp6.png?resize=768%2C324&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp6.png?resize=600%2C253&amp;ssl=1 600w\" data-sizes=\"auto, (max-width: 1140px) 100vw, 1140px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1140px; --smush-placeholder-aspect-ratio: 1140\/481;\" \/><figcaption id=\"caption-attachment-6404\" class=\"wp-caption-text\">Image &#8211; Add code to store the data<\/figcaption><\/figure>\n<p>From the left pane, click on <strong>&#8216;Integration&#8217;<\/strong> and then add output to store the messages in Cosmos DB. Choose the <strong>Database name, Collection name<\/strong> that was created in the earlier step.<\/p>\n<figure id=\"attachment_6406\" aria-describedby=\"caption-attachment-6406\" style=\"width: 1349px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"6406\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2021\/07\/16\/hot-path-analytics-with-cosmosdb-and-azure-functions\/functionapp8\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp8.png?fit=1349%2C561&amp;ssl=1\" data-orig-size=\"1349,561\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"FunctionApp8\" data-image-description=\"&lt;p&gt;Add output to the Function&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Add output to the Function&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp8.png?fit=1024%2C426&amp;ssl=1\" class=\"size-full wp-image-6406 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp8.png?resize=1140%2C474&#038;ssl=1\" alt=\"\" width=\"1140\" height=\"474\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp8.png?w=1349&amp;ssl=1 1349w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp8.png?resize=300%2C125&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp8.png?resize=1024%2C426&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp8.png?resize=768%2C319&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp8.png?resize=600%2C250&amp;ssl=1 600w\" data-sizes=\"auto, (max-width: 1140px) 100vw, 1140px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1140px; --smush-placeholder-aspect-ratio: 1140\/474;\" \/><figcaption id=\"caption-attachment-6406\" class=\"wp-caption-text\">Image &#8211; Add output to the Function<\/figcaption><\/figure>\n<p>Finally, the integration will look like the below :<\/p>\n<figure id=\"attachment_6408\" aria-describedby=\"caption-attachment-6408\" style=\"width: 1282px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"6408\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2021\/07\/16\/hot-path-analytics-with-cosmosdb-and-azure-functions\/functionapp7\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp7.png?fit=1282%2C567&amp;ssl=1\" data-orig-size=\"1282,567\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"FunctionApp7\" data-image-description=\"&lt;p&gt;Function Integration&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Function Integration&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp7.png?fit=1024%2C453&amp;ssl=1\" class=\"size-full wp-image-6408 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp7.png?resize=1140%2C504&#038;ssl=1\" alt=\"\" width=\"1140\" height=\"504\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp7.png?w=1282&amp;ssl=1 1282w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp7.png?resize=300%2C133&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp7.png?resize=1024%2C453&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp7.png?resize=768%2C340&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp7.png?resize=600%2C265&amp;ssl=1 600w\" data-sizes=\"auto, (max-width: 1140px) 100vw, 1140px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1140px; --smush-placeholder-aspect-ratio: 1140\/504;\" \/><figcaption id=\"caption-attachment-6408\" class=\"wp-caption-text\">Image &#8211; Function Integration<\/figcaption><\/figure>\n<p>That is it..everything is ready, once the messages arrive at the IoT Hub, they would be picked up by Functions and then processed, stored in Cosmos DB.<\/p>\n<h2>#5.Explore Processed Data<\/h2>\n<p>We can use <em>Cosmos DB data explorer<\/em> <em>utility<\/em> to view data that are being processed.<\/p>\n<figure id=\"attachment_5004\" aria-describedby=\"caption-attachment-5004\" style=\"width: 1341px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"5004\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/05\/04\/hot-path-analytics-with-cosmosdb-and-azure-stream-analytics\/cos8\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/cos8.png?fit=1341%2C583&amp;ssl=1\" data-orig-size=\"1341,583\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"cos8\" data-image-description=\"&lt;p&gt;Cosmos DB data explorer to view data&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Cosmos DB data explorer to view data&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/cos8.png?fit=1024%2C445&amp;ssl=1\" class=\"size-full wp-image-5004 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/cos8.png?resize=1140%2C496&#038;ssl=1\" alt=\"\" width=\"1140\" height=\"496\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/cos8.png?w=1341&amp;ssl=1 1341w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/cos8.png?resize=300%2C130&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/cos8.png?resize=1024%2C445&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/cos8.png?resize=768%2C334&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/cos8.png?resize=600%2C261&amp;ssl=1 600w\" data-sizes=\"auto, (max-width: 1140px) 100vw, 1140px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1140px; --smush-placeholder-aspect-ratio: 1140\/496;\" \/><figcaption id=\"caption-attachment-5004\" class=\"wp-caption-text\">Image &#8211; Cosmos DB data explorer to view data<\/figcaption><\/figure>\n<p>From here it flows for rapid consumption by any of the analytics clients.<\/p>\n<p><em>Congrats! In this article, we have learned how to how to perform Hot Path Analytics with CosmosDB and Azure Functions.<\/em><\/p>\n<p><em><strong>Like this post? Don\u2019t forget to share it!<\/strong><\/em><\/p>\n<h3>Additional Resources :<\/h3>\n<ul>\n<li><a href=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/05\/04\/hot-path-analytics-with-cosmosdb-and-azure-stream-analytics\/\">Hot Path Analytics with CosmosDB and Azure Stream Analytics<\/a><\/li>\n<li><a href=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/02\/05\/visualize-iot-scale-time-series-data-using-azure-time-series-insights\/\">Visualize IoT-scale time-series data using Azure Time Series Insights<\/a><\/li>\n<li><a href=\"https:\/\/www.upnxtblog.com\/index.php\/2018\/01\/10\/build-real-time-twitter-dashboard-using-azure-logicapps-power-bi\/\">Build real-time Twitter dashboard using Azure LogicApps + Power BI<\/a><\/li>\n<li><a href=\"https:\/\/www.upnxtblog.com\/index.php\/2017\/12\/13\/invoke-azure-functions-using-http-trigger\/\">Serverless tutorial \u2013 On HTTP trigger store data in Azure Cosmos DB<\/a><\/li>\n<\/ul>\n<div class=\"mceTemp\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The Internet of Things (IoT) has opened up a new, virtually inexhaustible source of technical innovations, which are equally valuable for a broad variety of industries. Applying smart connected devices, sensors, and gateways to control each part of the production process, manufacturing, and infrastructure companies are dramatically increasing their operational efficiency. At the same time, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":6408,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[317],"tags":[191,197,141],"class_list":["post-6395","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-iot","tag-azure-functions","tag-cosmosdb","tag-iot"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2021\/07\/FunctionApp7.png?fit=1282%2C567&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9fbQS-1F9","jetpack-related-posts":[{"id":4993,"url":"https:\/\/www.upnxtblog.com\/index.php\/2020\/05\/04\/hot-path-analytics-with-cosmosdb-and-azure-stream-analytics\/","url_meta":{"origin":6395,"position":0},"title":"Hot Path Analytics with CosmosDB and Azure Stream Analytics","author":"Karthik","date":"May 4, 2020","format":false,"excerpt":"The Internet of Things (IoT) has opened up a new, virtually inexhaustible source of technical innovations, which are equally valuable for a broad variety of industries. Applying smart connected devices, sensors, and gateways to control each part of the production process, manufacturing, and infrastructure companies are dramatically increasing their operational\u2026","rel":"","context":"In &quot;IOT&quot;","block_context":{"text":"IOT","link":"https:\/\/www.upnxtblog.com\/index.php\/category\/iot\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot6.png?fit=1093%2C577&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot6.png?fit=1093%2C577&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot6.png?fit=1093%2C577&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot6.png?fit=1093%2C577&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot6.png?fit=1093%2C577&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":4776,"url":"https:\/\/www.upnxtblog.com\/index.php\/2020\/02\/05\/visualize-iot-scale-time-series-data-using-azure-time-series-insights\/","url_meta":{"origin":6395,"position":1},"title":"Visualize IoT-scale time-series data using Azure Time Series Insights","author":"Karthik","date":"February 5, 2020","format":false,"excerpt":"The Internet of Things (IoT) has opened up a new, virtually inexhaustible source of technical innovations, which are equally valuable for a broad variety of industries. Applying smart connected devices, sensors, and gateways to control each part of the production process, manufacturing, and infrastructure companies are dramatically increasing their operational\u2026","rel":"","context":"In &quot;IOT&quot;","block_context":{"text":"IOT","link":"https:\/\/www.upnxtblog.com\/index.php\/category\/iot\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot10.png?fit=1200%2C576&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot10.png?fit=1200%2C576&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot10.png?fit=1200%2C576&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot10.png?fit=1200%2C576&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/01\/iot10.png?fit=1200%2C576&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":1525,"url":"https:\/\/www.upnxtblog.com\/index.php\/2017\/12\/18\/azure-functions-tutorial-on-http-trigger-store-data-in-cosmos-db\/","url_meta":{"origin":6395,"position":2},"title":"Serverless tutorial &#8211; On HTTP trigger store data in Azure Cosmos DB","author":"Karthik","date":"December 18, 2017","format":false,"excerpt":"In the last tutorial, we have created a new hello world function from the Azure portal. Azure Functions lets you execute your code in a serverless environment without having to first create a VM or publish a web application. In Azure Functions, input and output bindings provide a declarative way\u2026","rel":"","context":"In &quot;Cloud Computing&quot;","block_context":{"text":"Cloud Computing","link":"https:\/\/www.upnxtblog.com\/index.php\/category\/cloud\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2017\/12\/azure-function-logo.jpg?fit=600%2C350&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2017\/12\/azure-function-logo.jpg?fit=600%2C350&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2017\/12\/azure-function-logo.jpg?fit=600%2C350&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":2749,"url":"https:\/\/www.upnxtblog.com\/index.php\/2018\/07\/26\/1st-year-of-blogging-top-10-best-and-the-most-popular-reads\/","url_meta":{"origin":6395,"position":3},"title":"1st Year of Blogging : TOP 10 best and the most popular reads","author":"Karthik","date":"July 26, 2018","format":false,"excerpt":"This is my 1st Year of Blogging,here are 10 best and the most popular reads for this year.These posts have clocked more 500+ reads this year.I hope you enjoy reading and treasure them. #1.TOP 6 GUI tools for managing Docker environments In this article,let us check\u00a0TOP 6 GUI tools for\u2026","rel":"","context":"In &quot;Trending&quot;","block_context":{"text":"Trending","link":"https:\/\/www.upnxtblog.com\/index.php\/category\/trending\/"},"img":{"alt_text":"jogging","src":"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2018\/07\/jogging-2343558_1920.jpg?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2018\/07\/jogging-2343558_1920.jpg?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2018\/07\/jogging-2343558_1920.jpg?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2018\/07\/jogging-2343558_1920.jpg?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2018\/07\/jogging-2343558_1920.jpg?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":2833,"url":"https:\/\/www.upnxtblog.com\/index.php\/2018\/08\/15\/10-best-and-the-most-popular-all-time-reads\/","url_meta":{"origin":6395,"position":4},"title":"10 best and the most popular all time reads","author":"Karthik","date":"August 15, 2018","format":false,"excerpt":"Here's best compilation of 10 best and the most popular all time reads,I hope you enjoy reading and treasure them. #1.TOP 6 GUI tools for managing Docker environments In this article,let us check\u00a0TOP 6 GUI tools for managing Docker environments.Docker\u00a0as we know,is an open platform for developers and sysadmins to\u2026","rel":"","context":"In &quot;Trending&quot;","block_context":{"text":"Trending","link":"https:\/\/www.upnxtblog.com\/index.php\/category\/trending\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2767,"url":"https:\/\/www.upnxtblog.com\/index.php\/2018\/07\/23\/1st-year-of-blogging-upnxtblog-statistics\/","url_meta":{"origin":6395,"position":5},"title":"1st Year of Blogging : Upnxtblog statistics","author":"Karthik","date":"July 23, 2018","format":false,"excerpt":"Completed an important milestone,YES this blog has completed 1 year today.I have never thought I would be able to continue blogging alongside my full time work but this has been very good experience and velocity keep going because of your support & motivation. Thank you for all your support,likes,comment &\u2026","rel":"","context":"In &quot;Trending&quot;","block_context":{"text":"Trending","link":"https:\/\/www.upnxtblog.com\/index.php\/category\/trending\/"},"img":{"alt_text":"jogging","src":"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2018\/07\/jogging-2343558_1920.jpg?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2018\/07\/jogging-2343558_1920.jpg?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2018\/07\/jogging-2343558_1920.jpg?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2018\/07\/jogging-2343558_1920.jpg?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2018\/07\/jogging-2343558_1920.jpg?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.upnxtblog.com\/index.php\/wp-json\/wp\/v2\/posts\/6395","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.upnxtblog.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.upnxtblog.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.upnxtblog.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.upnxtblog.com\/index.php\/wp-json\/wp\/v2\/comments?post=6395"}],"version-history":[{"count":9,"href":"https:\/\/www.upnxtblog.com\/index.php\/wp-json\/wp\/v2\/posts\/6395\/revisions"}],"predecessor-version":[{"id":6413,"href":"https:\/\/www.upnxtblog.com\/index.php\/wp-json\/wp\/v2\/posts\/6395\/revisions\/6413"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.upnxtblog.com\/index.php\/wp-json\/wp\/v2\/media\/6408"}],"wp:attachment":[{"href":"https:\/\/www.upnxtblog.com\/index.php\/wp-json\/wp\/v2\/media?parent=6395"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.upnxtblog.com\/index.php\/wp-json\/wp\/v2\/categories?post=6395"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.upnxtblog.com\/index.php\/wp-json\/wp\/v2\/tags?post=6395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}