<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Sudhir's Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/biblog/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/biblog/feed.xml</link>
    <description>This site contains information about Microsoft Data Services</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:17:38 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Azure CosmosDB in Banking Sector</title>
      <link>https://docs.microsoft.com/archive/blogs/biblog/azure-cosmosdb-in-banking-sector</link>
      <pubDate>Tue, 02 Jan 2018 16:57:00 GMT</pubDate>
      <dc:creator><![CDATA[sudhirblog]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/biblog/?p=1935</guid>
      <description><![CDATA[Happy New Year 2018 !!! 

Other day I was reading about change feed feature of Azure CosmosDB and...]]></description>
      <content:encoded><![CDATA[<p align="justify"><span style="font-size: medium">Happy New Year 2018 !!! </span></p>
<p align="justify"><span style="font-size: medium"></span></p>
<p align="justify"><span style="font-size: medium">Other day I was reading about change feed feature of Azure CosmosDB and thought of possibilities can be driven from it. That triggered me to test a scenario which we deal with in our day to day life which is getting notification of any activity happened on Bank account.</span></p>
<p align="justify"><span style="font-size: medium"><b><u>Use case</u></b> </span></p>
<p align="justify"><span style="font-size: medium">Typically, in a banking sector, Any bank keep account holders information stored in their database and provides various methods to spend (through debit card), withdraw (through ATM), money transfer (Online or mobile app) and deposit (any channel). The balance will get adjusted based on the transaction type. At the end of successful transaction, as a bank customer we get SMS/email regarding the transaction took place in our account. This will make sure customer is updated of any transaction happening on their account and also if there any fraudulent transaction takes place they will act. </span></p>
<p align="justify"><span style="font-size: medium">With that thought, I am going to write about how to build the solution using Azure and give information about the services. </span></p>
<p align="justify"><span style="font-size: medium"><b><u></u></b></span></p>
<p align="justify"><span style="font-size: medium"><b><u>Technologies Involved</u></b> </span></p>
<p align="justify"><span style="font-size: medium"><b></b></span></p>
<p align="justify"><span style="font-size: medium"><b>Azure CosmosDB</b>:- This is heart of this solution. Azure CosmosDB is a multi-model geo replicated database. It provides various APIs like SQL, MongoDB, Cassandra, Graph and make sure core features like </span><a href="https://docs.microsoft.com/en-us/azure/cosmos-db/database-security"><span style="font-size: medium">security</span></a><span style="font-size: medium">, multi-region </span><a href="https://docs.microsoft.com/en-us/azure/cosmos-db/distribute-data-globally"><span style="font-size: medium">replication</span></a><span style="font-size: medium">, </span><a href="https://docs.microsoft.com/en-us/azure/cosmos-db/consistency-levels"><span style="font-size: medium">consistency</span></a><span style="font-size: medium">, </span><a href="https://docs.microsoft.com/en-us/azure/cosmos-db/partition-data"><span style="font-size: medium">partition, scalability</span></a><span style="font-size: medium">, </span><a href="https://docs.microsoft.com/en-us/azure/cosmos-db/indexing-policies"><span style="font-size: medium">indexing</span></a><span style="font-size: medium"> and </span><a href="https://docs.microsoft.com/en-us/azure/cosmos-db/logging"><span style="font-size: medium">log monitoring</span></a><span style="font-size: medium"> applies to all. Azure CosmosDB doesn’t enforce the learning of new tools but provides an ability to developer to continue using existing tools for example if a developer is working on GrpahDB, he/she canstill use gremlin console to interact with it. </span></p>
<p align="justify"><span style="font-size: medium"><b></b></span></p>
<p align="justify"><span style="font-size: medium"><b>Change Feed</b>: - This feature once enabled, creates a lease collection. This collection keeps track of changes happening. It stores changes the way they happen on the collection. All the inserts and updates get captured however for deletes, it requires workaround like adding additional property to decide delete. Change feed can be accessed by Azure function (we’ll cover in this blog), </span><a href="https://docs.microsoft.com/en-us/azure/cosmos-db/change-feed#rest-apis"><span style="font-size: medium">Azure Cosmos DB SDK</span></a><span style="font-size: medium"> and </span><a href="https://docs.microsoft.com/en-us/azure/cosmos-db/change-feed#change-feed-processor"><span style="font-size: medium">Azure Cosmos DB Change Feed Processor library</span></a><span style="font-size: medium">. Below is the example of document stored in lease collection. </span></p>
<p align="justify"><span style="font-size: medium"></span></p>
<a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image002.png"><img width="584" height="236" title="clip_image002" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="clip_image002" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image002_thumb.png" border="0" /></a>

<span style="font-size: medium">For more information about Change Feed feature please check </span><a href="https://docs.microsoft.com/en-us/azure/cosmos-db/change-feed#change-feed-processor"><span style="font-size: medium">here</span></a><span style="font-size: medium">. </span>

<b><span style="font-size: medium"></span></b>
<p align="justify"><span style="font-size: medium"><b>Azure Functions</b>: - Based on serverless architecture, Azure Functions provide ease of running micro code without worrying about setting up infrastructure, scheduling job, security, multitasking etc. One can quickly build a function and run it on any scale required. This architecture can be used in various domains like IoT, retail, finance etc. For more features and capabilities of Azure functions please refer </span><a href="https://docs.microsoft.com/en-us/azure/azure-functions/functions-overview"><span style="font-size: medium">here</span></a><span style="font-size: medium">. Before production deployment please refer </span><a href="https://docs.microsoft.com/en-us/azure/azure-functions/supported-languages"><span style="font-size: medium">here</span></a><span style="font-size: medium"> to make sure the programming language that you are planning to use (.Net, JS, Java etc.) is in GA and not in experimental. <b><u></u></b></span></p>
<p align="justify"><span style="font-size: medium"><b></b></span></p>
<p align="justify"><span style="font-size: medium"><b>PowerBI</b>: - PowerBI is the representation layer. It gives a a visualization capacity for users to make sense of different datasets and computations done on them. A dashboard shows the story of data it’s presenting. Microsoft PowerBI has evolved a lot since the time I started working with it. It captures all the different verticals and audiences. The ability to develop once and render it on any device makes it more powerful. For more information please refer </span><a href="https://powerbi.microsoft.com/en-us/"><span style="font-size: medium">here</span></a><span style="font-size: medium">. <b><u></u></b></span></p>
<p align="justify"><b><u><span style="font-size: medium"></span></u></b></p>
<p align="justify"><b><u><span style="font-size: medium">Architecture </span></u></b></p>
<a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image004.png"><img width="583" height="354" title="clip_image004" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="clip_image004" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image004_thumb.png" border="0" /></a>

<b><u><span style="font-size: medium"></span></u></b>

<b><u><span style="font-size: medium">Prerequisites </span></u></b>
<ul>
 	<li><span style="font-size: medium">Active Azure Subscription </span></li>
 	<li><span style="font-size: medium">Visual Studio 2017 </span></li>
</ul>
<b><u><span style="font-size: medium"></span></u></b>

<span style="font-size: medium"><b><u>Setting up Azure CosmosDB account</u></b> </span>
<ul>
 	<li><span style="font-size: medium">Go to </span><a href="https://www.portal.azure.com"><span style="font-size: medium">www.portal.azure.com</span></a><span style="font-size: medium"> <b><u></u></b></span></li>
 	<li><span style="font-size: medium">Click <b>Create a resource</b> -&gt; <b>Databases</b> -&gt; <b>Azure Cosmos DB</b> </span></li>
</ul>
<p style="text-align: center"><a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image006.jpg"><img width="414" height="329" title="clip_image006" style="float: none;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="clip_image006" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image006_thumb.jpg" border="0" /></a><b><u></u></b></p>
<span style="font-size: medium"></span>
<ul>
 	<li><span style="font-size: medium">Once page is open, Enter <b>ID<u></u></b> </span></li>
 	<li><span style="font-size: medium">Select <b>API </b>as<b> SQL<u></u></b> </span></li>
 	<li><span style="font-size: medium">Select <b>Subscription<u></u></b> </span></li>
 	<li><span style="font-size: medium">Create/Select<b> Resource Group<u></u></b> </span></li>
 	<li><span style="font-size: medium">Select<b> Location<u></u></b> </span></li>
 	<li><span style="font-size: medium">Select <b>Pin to Dashboard</b><u></u> </span></li>
 	<li><span style="font-size: medium">Click<b> Create</b><u></u> </span></li>
</ul>
<p style="text-align: center"><b>             <a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image008.jpg"><img width="221" height="597" title="clip_image008" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="clip_image008" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image008_thumb.jpg" border="0" /></a></b></p>
<span style="font-size: medium"></span>
<ul>
 	<li><span style="font-size: medium">Once the page is open, click <b>Overview<u></u></b> </span></li>
 	<li><span style="font-size: medium">Click <b>Add Collection</b></span></li>
</ul>
<p style="text-align: center"><a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image009.png"><img width="244" height="107" title="clip_image009" style="padding-top: 0px;padding-left: 0px;margin: 0px;padding-right: 0px;border-width: 0px" alt="clip_image009" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image009_thumb.png" border="0" /></a><b><u></u></b></p>
<span style="font-size: medium"></span>
<ul>
 	<li><span style="font-size: medium">Let’s create Database and a collection to store account master information. Provide <b>Database id<u></u></b> </span></li>
 	<li><span style="font-size: medium">Provide <b>Collection Id<u></u></b> </span></li>
 	<li><span style="font-size: medium">Select <b>Storage Capacity</b> as <b>Fixed (10 GB)</b><u></u> </span></li>
 	<li><span style="font-size: medium">Click <b>OK</b></span></li>
</ul>
<p style="text-align: center"><u></u>             <a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image011.png"><img width="257" height="428" title="clip_image011" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="clip_image011" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image011_thumb.png" border="0" /></a></p>
<span style="font-size: medium"></span>
<ul>
 	<li><span style="font-size: medium">Once Collection created successfully, Click <b>New Collection</b></span></li>
</ul>
<p style="text-align: center"><a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image013.png"><img width="456" height="285" title="clip_image013" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="clip_image013" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image013_thumb.png" border="0" /></a></p>
&nbsp;
<ul>
 	<li><span style="font-size: medium">Enter <b>Database id</b></span></li>
</ul>
<p style="text-align: center"><a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image015.png"><img width="257" height="482" title="clip_image015" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="clip_image015" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image015_thumb.png" border="0" /></a></p>
<span style="font-size: medium"></span>
<ul>
 	<li><span style="font-size: medium">Enter <b>Collection Id</b> </span></li>
 	<li><span style="font-size: medium">Select <b>Storage capacity</b> </span></li>
 	<li><span style="font-size: medium">Select<b> Throughput</b> </span></li>
 	<li><span style="font-size: medium">Click <b>OK</b> </span></li>
 	<li><span style="font-size: medium">Once Database and collection created, screen will look like below</span></li>
</ul>
<p style="text-align: center"><a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image017.png"><img width="421" height="391" title="clip_image017" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="clip_image017" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image017_thumb.png" border="0" /></a></p>
&nbsp;
<ul>
 	<li><span style="font-size: medium">Click <b>Close</b> (<b>X</b>)</span></li>
</ul>
<p style="text-align: center"><a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image019.png"><img width="418" height="230" title="clip_image019" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="clip_image019" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image019_thumb.png" border="0" /></a></p>
&nbsp;
<p align="justify"><span style="font-size: medium"><b><u>Adding Account Master Details</u></b> </span></p>

<ul>
 	<li>
<div align="justify"><span style="font-size: medium">Go to </span><a href="https://github.com/rawatsudhir1/AzureCosmosDBChangeFeedUseCase"><span style="font-size: medium">https://github.com/rawatsudhir1/AzureCosmosDBChangeFeedUseCase</span></a><span style="font-size: medium"> and either clone the repo or download it as zip </span></div></li>
 	<li>
<div align="justify"><span style="font-size: medium">In the repo under SupportingFiles, open CustomerAccountInfo.txt file. This file has some records or json document (contains customer account master information) which we will upload through portal. The other approach is to create a web-app or mobile app (with proper security enabled) to send this data. </span></div></li>
</ul>
<p style="text-align: center"><a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image021.png"><img width="432" height="460" title="clip_image021" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="clip_image021" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image021_thumb.png" border="0" /></a></p>

<blockquote><span style="font-size: medium"><b>*<u>Note</u> :- </b>I am not following any data modeling technique. Generally, when you are storing data in Azure CosmosDB please decide, whether application will perform read or update extensive operation.<b> <u></u></b></span></blockquote>
<ul>
 	<li>
<div align="justify"><span style="font-size: medium">Copy first record from the file (from line 1 to line 8 as per the above image) </span></div></li>
 	<li>
<div align="justify"><span style="font-size: medium">Goto <b>Azure CosmosDB account</b>, created in earlier step. </span></div></li>
 	<li>
<div align="justify"><span style="font-size: medium">Click <b>Data Explorer</b></span></div></li>
</ul>
<p style="text-align: center"><a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image023.png"><img width="495" height="364" title="clip_image023" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="clip_image023" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image023_thumb.png" border="0" /></a></p>
<span style="font-size: medium"></span>
<ul>
 	<li><span style="font-size: medium">Click <b>SummaryInfo</b> </span></li>
 	<li><span style="font-size: medium">Click <b>Documents</b> </span></li>
 	<li><span style="font-size: medium">Click <b>New Document</b> </span></li>
 	<li><span style="font-size: medium">Paste the record copied from github in earlier step</span></li>
</ul>
<p style="text-align: center"><a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image025.png"><img width="565" height="242" title="clip_image025" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="clip_image025" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image025_thumb.png" border="0" /></a></p>
&nbsp;
<ul>
 	<li><span style="font-size: medium">Click <b>Save</b> </span></li>
 	<li><span style="font-size: medium">Repeat Steps to add more records (copy from github repo) </span></li>
 	<li><span style="font-size: medium">After adding all six records, here is how screen look like</span></li>
</ul>
<p style="text-align: center"><a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image027.png"><img width="568" height="302" title="clip_image027" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="clip_image027" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image027_thumb.png" border="0" /></a></p>
&nbsp;
<ul>
 	<li><span style="font-size: medium">Close (<b>X</b>) <b>Data Explorer</b></span></li>
</ul>
<span style="font-size: medium">Before recording deposit or expense details in <b>DetailInfo </b>collection, let’s first build out <b>Azure Function Logic</b> </span>

<span style="font-size: medium"><b><u>Building Azure function logic</u></b> </span>
<ul>
 	<li><span style="font-size: medium">Click <b>Create a Resource<u></u></b> </span></li>
 	<li><span style="font-size: medium">Click <b>Compute</b> </span></li>
 	<li><span style="font-size: medium">Click <b>Function App</b></span></li>
</ul>
<p style="text-align: center"><b>         </b><b><a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image029.png"><img width="493" height="487" title="clip_image029" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="clip_image029" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image029_thumb.png" border="0" /></a></b></p>
&nbsp;
<ul>
 	<li><span style="font-size: medium">Once blade is open, Enter <b>App name<u></u></b> </span></li>
 	<li><span style="font-size: medium">Select <b>Subscription</b> </span></li>
 	<li><span style="font-size: medium"><b>Create new</b> or <b>Use existing Resource Group<u></u></b> </span></li>
 	<li><span style="font-size: medium">Select Windows as <b>OS<u></u></b> </span></li>
 	<li><span style="font-size: medium">Select <b>Consumption Plan</b> as <b>Hosting Plan</b> </span></li>
 	<li><span style="font-size: medium">Select <b>Location</b> (Select the same region where Azure CosmosDB is created) </span></li>
 	<li><span style="font-size: medium">Let default values for <b>Storage</b> </span></li>
 	<li><span style="font-size: medium">Click <b>Pin to dashboard</b> </span></li>
 	<li><span style="font-size: medium">Click <b>Create</b></span></li>
</ul>
<p style="text-align: center"><a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image031.png"><img width="211" height="513" title="clip_image031" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="clip_image031" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image031_thumb.png" border="0" /></a>   <b><u></u></b></p>
&nbsp;
<ul>
 	<li><span style="font-size: medium">Once Function App is created, Click on <b>New</b> (<b>+</b>)<b><u></u></b></span></li>
</ul>
<p style="text-align: center"><b>            <a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image033.png"><img width="459" height="366" title="clip_image033" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="clip_image033" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image033_thumb.png" border="0" /></a></b></p>
&nbsp;
<ul>
 	<li><span style="font-size: medium">Click <b>Custom Function<u></u></b></span></li>
</ul>
<p style="text-align: center"><a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image035.jpg"><img width="316" height="338" title="clip_image035" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="clip_image035" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image035_thumb.jpg" border="0" /></a></p>
&nbsp;
<ul>
 	<li><span style="font-size: medium">Choose a template, enter cosmos in search</span></li>
</ul>
<p style="text-align: center"><a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image037.png"><img width="566" height="238" title="clip_image037" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="clip_image037" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image037_thumb.png" border="0" /></a></p>
&nbsp;
<ul>
 	<li><span style="font-size: medium">Select <b>Cosmos DB trigger</b> </span></li>
 	<li><span style="font-size: medium">On New Function, Select <b>C#</b> as <b>language</b> </span></li>
 	<li><span style="font-size: medium">Provide <b>Name</b> of the function </span></li>
 	<li><span style="font-size: medium">On <b>Azure Cosmos DB account connection </b>click <b>new </b>and select the cosmodb account created earlier </span></li>
 	<li><span style="font-size: medium">Provide <b>Collection name</b> </span></li>
 	<li><span style="font-size: medium">Provide <b>Database name</b></span></li>
</ul>
<p style="text-align: center"><a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image039.png"><img width="290" height="389" title="clip_image039" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="clip_image039" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image039_thumb.png" border="0" /></a><b><u></u></b></p>
&nbsp;
<ul>
 	<li><span style="font-size: medium">Let <b>Collection name for leases</b> as it is<b><u></u></b> </span></li>
 	<li><span style="font-size: medium">Click <b>Create</b> </span></li>
 	<li><span style="font-size: medium">Once function is created, Click on function app and then Application Setting</span></li>
</ul>
<p style="text-align: center"><a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image041.png"><img width="439" height="267" title="clip_image041" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="clip_image041" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image041_thumb.png" border="0" /></a></p>
&nbsp;
<ul>
 	<li><span style="font-size: medium">Under Application settings, add two variables <strong>endpointUrl</strong> and <strong>authorizationKey</strong>. These variables hold values to connect CosmosDB to retrieve and update Bank Account Master table. Copy values for both the variable from CosmosDB account under <b>Keys</b> section. <b><u></u></b></span></li>
 	<li><span style="font-size: medium">Add <strong>endpointUrl</strong> , <strong>authorizationKey</strong> with values and <b>Save</b> it. This is how it will look like.<b><u></u></b> </span></li>
</ul>
<p style="text-align: center"><b>         <a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image043.png"><img width="727" height="314" title="clip_image043" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="clip_image043" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image043_thumb.png" border="0" /></a></b></p>
&nbsp;
<ul>
 	<li><span style="font-size: medium">Click on function (if you choose default name then it will be <b>CosmosTriggerCSharp1</b>)<b><u></u></b> </span></li>
 	<li><span style="font-size: medium">Copy code from </span><a href="https://github.com/rawatsudhir1/AzureCosmosDBChangeFeedUseCase/tree/master/AzureFunctionCode"><span style="font-size: medium">https://github.com/rawatsudhir1/AzureCosmosDBChangeFeedUseCase/tree/master/AzureFunctionCode</span></a><span style="font-size: medium"> and paste it in function. Click <b>Save<u></u></b> </span></li>
</ul>
<p style="text-align: center"><b><a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image045.png"><img width="863" height="412" title="clip_image045" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="clip_image045" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image045_thumb.png" border="0" /></a></b></p>
&nbsp;

<span style="font-size: medium">Azure function is setup. Let’s move to next step<b><u></u></b> </span>

<span style="font-size: medium"><b><u>Post transaction</u></b> </span>
<ul>
 	<li><span style="font-size: medium">Open Visual Studio 2017, create a console application<b><u></u></b> </span></li>
 	<li><span style="font-size: medium">Copy code from <a href="https://github.com/rawatsudhir1/AzureCosmosDBChangeFeedUseCase/tree/master/PostTransaction"><strong><u>here</u></strong></a></span><span style="font-size: medium"> (<b>Program.cs</b>) and paste it. <b><u></u></b></span></li>
 	<li><span style="font-size: medium">Include Microsoft.Azure.DocumentDB.Core and Newtonsoft.Json nuget package.<b><u></u></b> </span></li>
 	<li><span style="font-size: medium">Add <strong>endpointurl</strong> and <strong>authorizationKey</strong> as shown below.</span> <b><u></u></b></li>
</ul>
<p style="text-align: center"><b>          <a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image047.png"><img width="782" height="189" title="clip_image047" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="clip_image047" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image047_thumb.png" border="0" /></a></b></p>
&nbsp;
<ul>
 	<li><span style="font-size: medium">Run/F5 to run console application. This action will post a transaction to Azure CosmosDB<b><u></u></b></span></li>
</ul>
<p style="text-align: center"><b>          <a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image049.png"><img width="715" height="390" title="clip_image049" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="clip_image049" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image049_thumb.png" border="0" /></a></b></p>
&nbsp;

<b><u><span style="font-size: medium">Output at Azure Function </span></u></b>
<ul>
 	<li><span style="font-size: medium">Switch to Azure portal </span></li>
 	<li><span style="font-size: medium">Look at <b>Logs</b> window in function </span></li>
</ul>
<p style="text-align: center"><a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image051.png"><img width="694" height="174" title="clip_image051" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="clip_image051" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image051_thumb.png" border="0" /></a></p>
&nbsp;

<span style="font-size: medium"><b><u>Send Notification to Bank user</u></b> </span>
<ul>
 	<li><span style="font-size: medium">Please make sure to setup twilio test account to send sms notification. </span></li>
 	<li><span style="font-size: medium">Switch to <b>Azure portal</b> and open <b>Azure function</b> </span></li>
 	<li><span style="font-size: medium">Click <b>Integrate</b> </span></li>
 	<li><span style="font-size: medium">On <b>Outputs</b> click <b>New Output</b></span></li>
</ul>
<p style="text-align: center"><a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image053.png"><img width="700" height="181" title="clip_image053" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="clip_image053" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image053_thumb.png" border="0" /></a></p>
&nbsp;
<ul>
 	<li><span style="font-size: medium">Select <b>Twilio SMS</b> and click <b>Select</b></span></li>
</ul>
<p style="text-align: center"><a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image055.png"><img width="480" height="369" title="clip_image055" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="clip_image055" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image055_thumb.png" border="0" /></a></p>
&nbsp;
<ul>
 	<li><span style="font-size: medium">Keep <b>message</b> as <b>Message parameter name </b></span></li>
 	<li><span style="font-size: medium">Keep <b>acctsid</b> as <b>Account SID setting. </b>The variable <b>acctsid</b> will define under <b>application setting</b> which hold value of Account SID (got from Twilio dashboard) </span></li>
 	<li><span style="font-size: medium">Keep <b>authtoken</b> as <b>Auth Token setting. </b>The variable <b>authtoken</b> will define under <b>application setting</b> which hold value of Authentication token (got from Twilio dashboard) </span></li>
 	<li><span style="font-size: medium">Provide <b>To number. </b>Make sure this phone number is verified in Twilio </span></li>
 	<li><span style="font-size: medium">Provide <b>From number</b>. This information available in in Twilio dashboard. If first time created Twilio account then it will provide a number to use for some time. </span></li>
</ul>
<p style="text-align: center"><a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image057.png"><img width="698" height="267" title="clip_image057" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="clip_image057" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image057_thumb.png" border="0" /></a></p>
&nbsp;
<ul>
 	<li><span style="font-size: medium">Let’s add variables in <b>Application settings. </b>Click <b>function</b> and <b>Application settings</b></span></li>
</ul>
<p style="text-align: center"><a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image059.png"><img width="691" height="368" title="clip_image059" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="clip_image059" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image059_thumb.png" border="0" /></a></p>
&nbsp;
<ul>
 	<li><span style="font-size: medium">Add <b>acctsid </b>and value (Account SID from Twilio Dashboard) </span></li>
 	<li><span style="font-size: medium">Add <b>authtoken</b> and value (Authorization Token from Twilio Dashboard) </span></li>
</ul>
<p style="text-align: center"><a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image061.png"><img width="750" height="501" title="clip_image061" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="clip_image061" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image061_thumb.png" border="0" /></a></p>
&nbsp;
<ul>
 	<li><span style="font-size: medium">Click <b>Save</b> </span></li>
 	<li><span style="font-size: medium">Copy code from </span><a href="https://github.com/rawatsudhir1/AzureCosmosDBChangeFeedUseCase/blob/master/AzureFunctionCode/AFnCodeTwilioAdded.txt"><span style="font-size: medium">github</span></a><span style="font-size: medium"> and paste in </span></li>
 	<li><span style="font-size: medium">Click <b>Save</b>.<b> </b>Make sure there is no error in log <b></b></span></li>
 	<li><span style="font-size: medium">Run console program and post a transaction </span></li>
</ul>
<p style="text-align: center"><a href="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image063.png"><img width="863" height="358" title="clip_image063" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="clip_image063" src="https://msdnshared.blob.core.windows.net/media/2018/01/clip_image063_thumb.png" border="0" /></a></p>
&nbsp;
<ul>
 	<li>
<div align="justify"><span style="font-size: medium">Once it run successful, a SMS will be sent to the mobile number. If not received make sure defined number is not in DND (Do Not Disturb) mode. </span></div></li>
</ul>
<p align="justify"><span style="font-size: medium"><b><u></u></b></span></p>
<p align="justify"><span style="font-size: medium"><b><u>Building PowerBI Report</u></b> </span></p>

<ul>
 	<li>
<div align="justify"><span style="font-size: medium">Follow <a href="https://docs.microsoft.com/en-us/azure/cosmos-db/powerbi-visualize">here</a></span><span style="font-size: medium"> to build a PowerBI dashboard. </span></div></li>
</ul>
<p align="justify"><span style="font-size: medium"><b><u></u></b></span></p>
<p align="justify"><span style="font-size: medium"><b><u>Summary</u></b> </span></p>
<p align="justify"><span style="font-size: medium">In this blog, we built a use case to showcase how Azure COSMOSDB can be used in Banking Sector. However, there are another scenario which can be build using this feature like create request for vendors once an order is received (Retail domain), Immediate action on bad feedback (Service domain), Alert when a new quotation request is received (Insurance domain) etc. </span></p>
<p align="justify"><span style="font-size: medium"></span></p>
<p align="justify"><span style="font-size: medium">Thanks for reading and I hope you liked it. </span></p>

<pre><span style="font-size: medium"></span></pre>
<p align="justify"><span style="font-size: medium">Thanks to my colleague Gandhali for her suggestions. </span></p>
<p align="justify"><span style="font-size: medium"></span></p>
<p align="justify"><span style="font-size: medium">Eat Healthy, Stay Fit and Keep Learning. </span></p>
<p align="justify"></p>]]></content:encoded>
    </item>
    <item>
      <title>Building chat assistance using QandA Maker and Xamarin</title>
      <link>https://docs.microsoft.com/archive/blogs/biblog/building-chat-assistance-using-qanda-maker-and-xamarin</link>
      <pubDate>Fri, 20 Jan 2017 17:46:45 GMT</pubDate>
      <dc:creator><![CDATA[sudhirblog]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/biblog/?p=1365</guid>
      <description><![CDATA[&nbsp;
Being a Data guy I never thought to work on outside data boundary. It’s not because I don’t...]]></description>
      <content:encoded><![CDATA[&nbsp;
<p align="justify">Being a Data guy I never thought to work on outside data boundary. It’s not because I don’t want to but because there are lot of data services on Azure to keep myself busy. Then how come a data guy got into non-data world?</p>
<p align="justify">In my role I work with many customer working on different technologies. With BOT, Cognitive, AI bubbling up customers keep asking me about it. One of the scenarios I keep hearing how to build knowledge base to serve their customer effectively. For example</p>

<ul>
 	<li>
<div align="justify">How I can setup IT help desk for my customer/employee? Specially on mobile incase something goes down due to hardware/software failure on PC, they can still chat to get some help?</div></li>
 	<li>
<div align="justify">Getting information about product, licensing etc. on the way on mobile?</div></li>
</ul>
<p align="justify">This triggers me to think about build a solution and showcase how it can be done. After my initial research I figured out services I am going to use “QandA maker” and “Xamarin” to build it. Here is the architecture I zeroed down to work on.</p>
<a href="https://msdnshared.blob.core.windows.net/media/2017/01/image499.png"><img width="775" height="230" title="image" style="float: none;padding-top: 0px;padding-left: 0px;margin: 0px 0px 0px 80px;padding-right: 0px;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/01/image_thumb422.png" border="0" /></a>
<p align="justify"><strong><u><em>Architecture</em></u></strong>:- Let’s look onto the architecture. The developer will build, train and publish knowledge base using QnA maker. Then build Xamarin chat assistance application which will connect to QnA maker and response customer query. Once development of application is done, developer will release it for various platform. Same can be download by end user and they can chat from their devices.</p>
<p align="justify">Let’s start building it. First, setup knowledge base. We’ll be using Microsoft QnA maker.</p>

<ul>
 	<li>Go to <a href="https://qnamaker.ai/" title="https://qnamaker.ai/">https://qnamaker.ai/</a> (it's in preview as of today).</li>
 	<li>Click “<strong>Create new service</strong>”. It may ask to login with your Microsoft account.</li>
</ul>
<a href="https://msdnshared.blob.core.windows.net/media/2017/01/image500.png"><img width="488" height="492" title="image" style="float: none;padding-top: 0px;padding-left: 0px;margin: 0px 0px 0px 185px;padding-right: 0px;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/01/image_thumb423.png" border="0" /></a>
<ul>
 	<li>Provide “<strong>Service Name</strong>”</li>
 	<li>Either provide “<strong>FAQ URL</strong>” or upload file containing question and answer or add question and answer manually.</li>
 	<li>On the left side there is a “<strong>Test</strong>” option incase you want to test it.</li>
 	<li>Click “<strong>Create”</strong></li>
</ul>
<strong></strong>

<a href="https://msdnshared.blob.core.windows.net/media/2017/01/image501.png"><img width="705" height="332" title="image" style="float: none;padding-top: 0px;padding-left: 0px;margin: 0px 0px 0px 185px;padding-right: 0px;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/01/image_thumb424.png" border="0" /></a>
<ul>
 	<li>Add question and answer in knowledge base if you want and click “<strong>Save and retrain</strong>”</li>
 	<li>Click <strong>Publish</strong></li>
 	<li>On next page click <strong>Publish</strong></li>
 	<li>Once completed, copy the “<strong>Sample HTTP request</strong>” information.</li>
</ul>
<a href="https://msdnshared.blob.core.windows.net/media/2017/01/image502.png"><img width="535" height="281" title="image" style="float: none;padding-top: 0px;padding-left: 0px;margin: 0px 0px 0px 185px;padding-right: 0px;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/01/image_thumb425.png" border="0" /></a>

Next is design Xamarin solution so that we can easily target the app to different platforms.
<ul>
 	<li>Download <a href="https://github.com/nishanil/Xamarin.Forms-Samples/tree/master/DataTemplateSelector">chat user interface sample</a></li>
</ul>
<p align="justify">Changed the code to call QnA service and make async call for better user experience. You can modify the response based on the score as well. Though it's not implemented here but you get score in response. Download the code from <a href="https://github.com/rawatsudhir/Building-Chat-Assistance-Solution" title="https://github.com/rawatsudhir/Building-Chat-Assistance-Solution">https://github.com/rawatsudhir/Building-Chat-Assistance-Solution</a>. Feel free to contribute to github if you have any idea/suggestion.</p>
<p align="justify">Here is how final outcome looks like.</p>
&nbsp;
<table width="743" align="center" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td width="366" valign="top"><a href="https://msdnshared.blob.core.windows.net/media/2017/01/image503.png"><img width="272" height="485" title="image" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/01/image_thumb426.png" border="0" /></a></td>
<td width="375" valign="top"><a href="https://msdnshared.blob.core.windows.net/media/2017/01/image504.png"><img width="284" height="489" title="image" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/01/image_thumb427.png" border="0" /></a></td>
</tr>
</tbody>
</table>
<table width="743" align="center" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td width="366" valign="top"><a href="https://msdnshared.blob.core.windows.net/media/2017/01/image505.png"><img width="273" height="477" title="image" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/01/image_thumb428.png" border="0" /></a></td>
<td width="375" valign="top"><a href="https://msdnshared.blob.core.windows.net/media/2017/01/image506.png"><img width="277" height="485" title="image" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/01/image_thumb429.png" border="0" /></a></td>
</tr>
</tbody>
</table>
&nbsp;

&nbsp;
<p align="center"><a href="https://msdnshared.blob.core.windows.net/media/2017/01/image508.png"><img width="211" height="372" title="image" style="padding-top: 0px;padding-left: 0px;margin: 0px;padding-right: 0px;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/01/image_thumb431.png" border="0" /></a></p>
&nbsp;

Finally, release the app on stores. Please refer <a href="https://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/publishing_an_application/">here</a> for releasing the app.

Thanks to my colleagues Nish and Aditee for clearing my doubts on Xamarin during app development.

&nbsp;

Hope it helps and Thanks for reading it.

&nbsp;

Eat Healthy, Stay Fit and Keep Learning !]]></content:encoded>
    </item>
    <item>
      <title>Build Social Sentiment Analysis Solution using Microsoft Azure Services</title>
      <link>https://docs.microsoft.com/archive/blogs/biblog/build-social-sentiment-analysis-solution-using-microsoft-azure-services</link>
      <pubDate>Tue, 01 Nov 2016 12:51:02 GMT</pubDate>
      <dc:creator><![CDATA[sudhirblog]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/biblog/?p=1185</guid>
      <description><![CDATA[&nbsp;
Now a days people express their opinion on social media. Company’s using such platform to...]]></description>
      <content:encoded><![CDATA[&nbsp;
<p align="justify"><span style="font-size: medium">Now a days people express their opinion on social media. Company’s using such platform to capture honest and transparent opinion. This help company to enhance their product or services. In this blog, I am going to show case how quick and easily a solution can be build using Microsoft Azure. </span></p>
<p align="justify"><span style="font-size: medium"><strong><u>Problem Statement</u></strong>:- After launching product in the market, a company want to capture users sentiment from social media.</span></p>
<p align="justify"><span style="font-size: medium">There were two challenges here 1) capture tweets from twitter or comments from Facebook (assuming product has page listed)  2) Figure out the sentiment of the tweets. </span></p>
<p align="justify"><span style="font-size: medium"></span> <span style="font-size: medium"><strong><u>Technologies Involved</u></strong>:- Microsoft Azure Logic apps, Azure SQL DB, Azure WebJob, Cognitive services and PowerBI.  </span></p>
<p align="justify"><span style="font-size: medium"></span> <span style="font-size: medium"><strong><u>Prerequisite</u></strong> :- <a href="https://msdn.microsoft.com/en-us/library/mt238290.aspx">Microsoft SQL Server Management Studio</a>, <a href="https://www.microsoft.com/en-in/download/details.aspx?id=48146">Microsoft Visual Studio</a>, <a href="https://go.microsoft.com/fwlink/?linkid=518003">Azure SDK for .NET (Visual Studio 2015)</a>, <a href="https://powerbi.microsoft.com/en-us/downloads/">Microsoft Power BI Dashboard</a> and download </span><span style="font-size: medium"><a href="https://github.com/rawatsudhir/ProductSentimentAnalysis">source code from GitHub</a> and store it in local drive</span></p>
<p align="justify"><span style="font-size: medium"></span></p>
<p align="justify"><span style="font-size: medium">As a first step, let’s set up  Azure SQL database to store tweets.</span></p>
<p align="justify"><span style="font-size: medium"></span></p>
<p align="justify"><span style="font-size: medium">1) Go to Azure Portal <a href="https://portal.azure.com">https://portal.azure.com</a> </span></p>
<p align="justify"><span style="font-size: medium">2) Once login to the Azure Portal, Click <strong>New, Databases, SQL Database</strong></span></p>
<p align="justify"><strong><span style="font-size: medium"></span></strong></p>
<p align="justify"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image11.png"><img width="818" height="287" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb10.png" border="0" /></a></p>
<p align="justify"><span style="font-size: medium"></span></p>
<p align="justify"><span style="font-size: medium">3) Provide <strong>Database name</strong>, <strong>Subscription</strong>, <strong>Resource group </strong>(recommend to <strong>Create new </strong>for this demo ) , <strong>Select source</strong> (as <strong>Blank database</strong>), <strong>Server</strong> (Create a new Server as mentioned below), <strong>Want to use SQL elastic pool?</strong> (Not now), <strong>Pricing tier</strong> (as <strong>Basic</strong>) and <strong>Collation</strong>. Check <strong>Pin to dashboard</strong> and click <strong>Create</strong></span></p>
<p align="justify"><span style="font-size: medium"></span></p>
<p align="justify"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image12.png"><img width="799" height="727" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb11.png" border="0" /></a></p>
<p align="justify"><span style="font-size: medium">*Note:- Please note down <strong>Server admin login</strong> and <strong>Password</strong>.</span></p>
<p align="justify"><span style="font-size: medium">4) Once created, open database (Double click) from Azure dashboard.</span></p>
<p align="justify"><span style="font-size: medium"></span></p>
<p align="justify"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image13.png"><img width="235" height="234" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb12.png" border="0" /></a></p>
<p align="justify"><span style="font-size: medium">5) Go to <strong>Properties</strong> and then <strong>SERVER NAME</strong></span></p>
<p align="justify"><span style="font-size: medium"></span></p>
<p align="center"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image14.png"><img width="472" height="526" title="image" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb13.png" border="0" /></a></p>
<p align="justify"><span style="font-size: medium">6) Copy <strong>SERVER NAME</strong>.<strong> </strong></span></p>
<p align="justify"><span style="font-size: medium">7) Click Start (Windows sign on bottom left) and search for <strong>Microsoft SQL Server Management Studio. </strong>Click to open Microsoft SQL Server Management Studio.</span></p>
<p align="justify"><strong><span style="font-size: medium"></span></strong></p>
<p align="justify"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image15.png"><img width="515" height="156" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb14.png" border="0" /></a></p>
<p align="justify"><span style="font-size: medium"></span></p>
<p align="justify"><span style="font-size: medium">8) Paste <strong>SERVER NAME</strong> (copied in step 6) in <strong>Server name, Login </strong>and<strong> Password</strong></span></p>
<p align="justify"><span style="font-size: medium"></span></p>
<p align="justify"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image16.png"><img width="606" height="396" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb15.png" border="0" /></a></p>
<p align="justify"><span style="font-size: medium"><strong>*Note</strong>:- Keep Server Name, Database Name, login and Password in a Notepad file. It will help through out this sample.</span></p>
<p align="justify"><span style="font-size: medium">9) Click <strong>Connect</strong>. If you encounter below warning then need to setup firewall rule at Azure SQL level. It will allow SQL Server management studio installed on machine to connect SQL Server on cloud. </span></p>
<p align="justify"><span style="font-size: medium"></span></p>
<p align="justify"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image17.png"><img width="406" height="328" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb16.png" border="0" /></a></p>
<p align="justify"><span style="font-size: medium"></span></p>
<p align="justify"><span style="font-size: medium">10) Click <strong>Sign in… </strong>login to Azure</span></p>
<p align="justify"><span style="font-size: medium">11) Once successfully logged in, Select <strong>Add my</strong> <strong>client IP</strong> (XXXXXXX) and click <strong>OK</strong></span></p>
<p align="justify"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image18.png"><img width="455" height="328" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb17.png" border="0" /></a></p>
<p align="justify"><span style="font-size: medium"></span></p>
<p align="justify"><span style="font-size: medium">12) Once logged in, click <strong>New Query</strong></span></p>
<p align="justify"><span style="font-size: medium"></span></p>
<p align="justify"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image19.png"><img width="639" height="283" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb18.png" border="0" /></a></p>
<p align="justify"><span style="font-size: medium"><strong>*Note</strong>:- Please make sure to select the tweetdb/created earlier database from the drop down box.</span></p>
<p align="justify"><span style="font-size: medium"></span></p>
<p align="justify"><span style="font-size: medium">13) Copy create table script from the folder (DB Script) downloaded from GitHub or copy it from <a href="https://github.com/rawatsudhir/ProductSentimentAnalysis/tree/master/DB%20Script">here</a>.</span></p>
<p align="justify"><span style="font-size: medium">14) Paste query in query window, click Execute</span></p>
<p align="justify"><span style="font-size: medium"></span></p>
<p align="justify"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image20.png"><img width="722" height="418" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb19.png" border="0" /></a></p>
<p align="justify"><span style="font-size: medium"></span></p>
<p align="justify"><span style="font-size: medium">Once Azure SQL DB is set up, now let’s move to next step which is capture tweets real time and store it in Azure SQL db.  </span></p>
<p align="justify"><span style="font-size: medium">Here I am using Microsoft Azure Logic App. With Logic apps one can easily design workflows on cloud. I created a workflow in logic apps which will capture tweets (contains #MyDemoProduct hashtag) after every 3 minutes. If interested read more about Microsoft Azure Logic Apps <a href="https://azure.microsoft.com/en-in/documentation/articles/app-service-logic-what-are-logic-apps/">here</a>. </span></p>
<p align="justify"><span style="font-size: medium"></span></p>
<p align="justify"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image21.png"><img width="677" height="542" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb20.png" border="0" /></a></p>
<p align="justify"><span style="font-size: medium"></span></p>
<p align="justify"><span style="font-size: medium">Let’s go step by step and set up workflow on Microsoft Azure using Logic App.   </span></p>
<span style="font-size: medium"></span>

<span style="font-size: medium">1) Go to Azure Portal <a href="https://portal.azure.com">https://portal.azure.com</a> </span>

<span style="font-size: medium">2) Click <strong>Enterprise Integration</strong></span>

<span style="font-size: medium">3) Click <strong>Logic App</strong></span>

<span style="font-size: medium"></span>
<p align="center"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image22.png"><img width="486" height="285" title="image" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb21.png" border="0" /></a></p>
<p align="left"><span style="font-size: medium">4) Enter <strong>Name</strong>, <strong>Subscription</strong>, Create/Select <strong>Resource group </strong>(select existing one which created in earlier step), <strong>Location</strong></span></p>
<p align="left"><span style="font-size: medium">5) Click <strong>Pin to Dashboard</strong> and <strong>Create</strong></span></p>
<p align="left"><span style="font-size: medium"></span></p>
<p align="center"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image23.png"><img width="262" height="707" title="image" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb22.png" border="0" /></a></p>
<p align="left"><span style="font-size: medium"></span></p>
<p align="left"><span style="font-size: medium">6) Once validation done, Azure will setup new Logic App</span> <span style="font-size: medium">service and open designer to create the workflow</span></p>
<p align="left"><span style="font-size: medium"></span></p>
<p align="left"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image24.png"><img width="730" height="421" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb23.png" border="0" /></a></p>
<p align="left"><span style="font-size: medium">7) Click <strong>Blank LogicApp</strong></span></p>
<p align="left"><span style="font-size: medium">8) Search for <strong>twitter</strong> connector in <strong>Show Microsoft managed APIs</strong>. Select <strong>Twitter – When a new tweet is posted</strong></span></p>
<p align="left"><span style="font-size: medium"></span></p>
<p align="left"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image25.png"><img width="638" height="184" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb24.png" border="0" /></a></p>
<p align="left"><span style="font-size: medium">9) Login to Twitter account. If you don’t have twitter account please create it.</span></p>
<p align="left"><span style="font-size: medium">10) Enter <strong>#MyDemoProduct</strong> or any other text which you want to capture in <strong>*Search text</strong>. Set <strong>*Frequency</strong> is <strong>Minute</strong> and <strong>*Interval</strong> is <strong>3</strong>. When we run this app it will capture tweets (based on <strong>*Search text</strong>) in every 3 minute. Click <strong>+ New step </strong>and Select<strong> Add an Action</strong></span></p>
<p align="left"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image26.png"><img width="665" height="435" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb25.png" border="0" /></a></p>
<p align="left"><span style="font-size: medium">11) In <strong>Show Microsoft managed APIs</strong>, Search for <strong>SQL</strong> and select <strong>SQL Server – Insert row</strong></span></p>
<p align="left"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image27.png"><img width="568" height="619" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb26.png" border="0" /></a></p>
<p align="left"><span style="font-size: medium">12) Enter <strong>*CONNECTION NAME</strong>, <strong>*SQL SERVER NAME</strong>, <strong>*SQL DATABASE NAME</strong>, <strong>*USERNAME</strong> and <strong>*PASSWORD</strong>. If you haven’t copied these information in notepad as suggested earlier then get it from Azure portal. Click <strong>Create</strong>.</span></p>
<p align="left"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image28.png"><img width="452" height="537" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb27.png" border="0" /></a></p>
<p align="left"><span style="font-size: medium">13) Select table name <strong>TweetFromTwitter</strong> from the <strong>*Table name</strong> drop down box </span></p>
<p align="left"><span style="font-size: medium"></span></p>
<p align="left"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image29.png"><img width="443" height="318" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb28.png" border="0" /></a></p>
<p align="left"><span style="font-size: medium">14) Next step to map table columns with twitter fields. Move to every column and click <strong>Add dynamic content</strong> and select twitter field as described below. Leave <strong>Score</strong> column as blank. Click <strong>Save</strong></span></p>
<p align="left"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image30.png"><img width="520" height="593" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb29.png" border="0" /></a></p>
<p align="left"><span style="font-size: medium"></span></p>
<p align="left"><span style="font-size: medium">15) Close Logic App Designer. Click <strong>Run Trigger</strong></span></p>
<p align="left"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image31.png"><img width="626" height="285" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb30.png" border="0" /></a></p>
<p align="left"><span style="font-size: medium">16) For test purpose tweet with #MyDemoProduct or any other text you provided earlier (when setting up Logic Apps)</span></p>
<p align="left"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image32.png"><img width="491" height="503" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb31.png" border="0" /></a></p>
<p align="left"><span style="font-size: medium">16) In status, notice Logic App execution</span></p>
<p align="left"><span style="font-size: medium"></span></p>
<p align="left"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image33.png"><img width="594" height="237" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb32.png" border="0" /></a></p>
<p align="left"><span style="font-size: medium">17) Click <strong>Disable</strong> as it will fill up Azure SQL database table quickly based on the frequency of tweet post</span></p>
<p align="left"><span style="font-size: medium">18) Switch to <strong>Microsoft SQL Server Management Studio </strong>and<strong> Execute </strong>query (Select * from TABLE_NAME). Notice <strong>Score</strong> column is NULL</span></p>
<p align="left"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image34.png"><img width="736" height="361" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb33.png" border="0" /></a></p>
<p align="left"><span style="font-size: medium"><strong>*Note</strong>:-</span> <span style="font-size: medium">Since I tweet from dummy account, it capture same location. I changed manually <strong>Location</strong> column value for some records.</span></p>
<p align="left"><span style="font-size: medium">Next Step is to setup Cognitive Services to get sentiment of tweets captured in Azure SQL Database. Also let’s setup Azure web job. </span></p>
<p align="left"><span style="font-size: medium"></span></p>
<p align="left"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image35.png"><img width="571" height="450" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb34.png" border="0" /></a></p>
<p align="left"><span style="font-size: medium">1) Go to Azure Portal <a href="https://portal.azure.com">https://portal.azure.com</a>. Click <strong>New</strong>, <strong>Intelligence + analytics, Cognitive Services APIs</strong>  </span></p>
<p align="left"><span style="font-size: medium"></span></p>
<p align="left"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image36.png"><img width="623" height="358" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb35.png" border="0" /></a></p>
<p align="left"><span style="font-size: medium"></span></p>
<p align="justify"><span style="font-size: medium">2) Enter <strong>Account name</strong>, <strong>Subscription</strong>, <strong>API Type</strong> as <strong>Text Analytics (preview), Location </strong>as <strong>West US </strong>(only available region at present), <strong>Pricing tier</strong> as <strong>Free </strong>and <strong>Resource group</strong> as <strong>Use existing</strong> (choose one which is created earlier). Check <strong>Pin to dashboard </strong>and click<strong> Create</strong></span></p>
<p align="left"><span style="font-size: medium"></span></p>
<p align="left"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image37.png"><img width="274" height="725" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb36.png" border="0" /></a></p>
<p align="left"><span style="font-size: medium"></span></p>
<p align="left"><span style="font-size: medium">3) Once done, it will show below screen indicates Microsoft Cognitive Services is created successfully.  </span></p>
<p align="left"><span style="font-size: medium"></span></p>
<p align="left"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image38.png"><img width="596" height="499" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb37.png" border="0" /></a></p>
<p align="left"><span style="font-size: medium"></span></p>
<p align="left"><span style="font-size: medium">4) Click <strong>Keys. </strong>Copy<strong> Key 1 </strong>and paste in Notepad.</span></p>
<p align="left"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image39.png"><img width="648" height="483" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb38.png" border="0" /></a></p>
<p align="left"><span style="font-size: medium"></span></p>
<p align="justify"><span style="font-size: medium">Microsoft Cognitive Service is setup. Next step is to make changes in code and deploy it as Azure webjob. </span><span style="font-size: medium">If not already, please download the source code from <a href="https://github.com/rawatsudhir/ProductSentimentAnalysis" title="https://github.com/rawatsudhir/ProductSentimentAnalysis">https://github.com/rawatsudhir/ProductSentimentAnalysis</a></span></p>
<p align="left"><span style="font-size: medium">1)  Open Microsoft Visual Studio 2015. Provide Azure SQL DB credential and Subscription key (of Microsoft Cognitive Service)</span></p>
<p align="left"><span style="font-size: medium"></span></p>
<p align="left"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image40.png"><img width="909" height="406" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb39.png" border="0" /></a></p>
<p align="left"><span style="font-size: medium"></span></p>
<p align="left"><span style="font-size: medium">2) Click <strong>Start</strong>. This code took all tweets from Azure SQL DB and pass it to Microsoft Cognitive Services get sentiment of each tweets and store it </span></p>
<p align="left"><span style="font-size: medium"></span></p>
<p align="left"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image41.png"><img width="783" height="282" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb40.png" border="0" /></a></p>
<p align="left"><span style="font-size: medium"></span></p>
<p align="left"><span style="font-size: medium">3) Switch to Microsoft SQL Server Management Studio. If not open already please go to <strong>Start</strong> menu and click Microsoft SQL Server Management Studio.</span></p>
<p align="left"><span style="font-size: medium">4) Connect to Azure SQL DB and run <strong>Select top (100) * from TABLE_NAME</strong></span></p>
<p align="left"><span style="font-size: medium"></span></p>
<p align="left"><span style="font-size: medium"></span></p>
<p align="left"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image42.png"><img width="595" height="447" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb41.png" border="0" /></a></p>
<p align="left"><span style="font-size: medium"></span></p>
<span style="font-size: medium"><strong>Below steps are OPTIONAL</strong>. Next step is deploy code to Azure as webjob. </span>

<span style="font-size: medium">1) Go to Azure Portal <a href="https://portal.azure.com">https://portal.azure.com</a>. Click <strong>Web+mobile</strong>, <strong>Web App</strong>, enter <strong>App name</strong>, <strong>Subscription</strong>, <strong>Resource group</strong> as <strong>Use existing</strong> (choose one which is created earlier), <strong>App Service plan/Location (</strong>Create new<strong> app service plan, </strong>select<strong> Pricing tier </strong>as <strong>Free </strong>for this solution<strong>), App Insights </strong>as <strong>off, </strong>check<strong> Pin to dashboard, </strong>click<strong> Create </strong> </span>

<span style="font-size: medium"></span>

<a href="https://msdnshared.blob.core.windows.net/media/2016/11/image43.png"><img width="912" height="428" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb42.png" border="0" /></a>
<p align="left"><span style="font-size: medium">2) Once created below screen will show up</span></p>
<p align="left"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image44.png"><img width="602" height="625" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb43.png" border="0" /></a></p>
<p align="left"><span style="font-size: medium">3) Switch to Microsoft Visual Studio. Right click on project and click <strong>Publish as Azure WebJob</strong></span></p>
<p align="center"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image45.png"><img width="656" height="273" title="image" style="float: none;padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb44.png" border="0" /></a></p>
<span style="font-size: medium">4) Provide following information (get information from App service created in earlier step)</span>

<span style="font-size: medium"></span>

<a href="https://msdnshared.blob.core.windows.net/media/2016/11/image46.png"><img width="588" height="461" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb45.png" border="0" /></a>

<span style="font-size: medium"></span>

<span style="font-size: medium">5) Once published. switch to Azure portal, click App service (created earlier) and click <strong>WebJobs</strong></span>

<span style="font-size: medium"></span>

<a href="https://msdnshared.blob.core.windows.net/media/2016/11/image47.png"><img width="524" height="496" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb46.png" border="0" /></a>

<span style="font-size: medium"></span>

<span style="font-size: medium">6) Select <strong>WebJob</strong> which deploy in earlier step. Click <strong>Run</strong></span>

<strong><span style="font-size: medium"></span></strong>

<a href="https://msdnshared.blob.core.windows.net/media/2016/11/image48.png"><img width="550" height="149" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb47.png" border="0" /></a>

<span style="font-size: medium"></span>

<span style="font-size: medium">Next Step is build dashboard using Microsoft PowerBI desktop.</span>

<a href="https://msdnshared.blob.core.windows.net/media/2016/11/clip_image0011.png"><img width="474" height="375" title="clip_image001" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="clip_image001" src="https://msdnshared.blob.core.windows.net/media/2016/11/clip_image001_thumb1.png" border="0" /></a>
<p align="left"><span style="font-size: medium">1)</span> <span style="font-size: medium">Click windows button, search and click <strong>Power BI Desktop</strong></span></p>
<p align="left"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image49.png"><img width="387" height="405" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb48.png" border="0" /></a></p>
<p align="left"><span style="font-size: medium"></span></p>
<p align="left"><span style="font-size: medium">2) Once Power BI dashboard opened, <strong>Enter Server</strong> and <strong>Database</strong> name. Click <strong>OK</strong></span></p>
<p align="left"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image50.png"><img width="542" height="291" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb49.png" border="0" /></a></p>
<p align="left"><span style="font-size: medium"></span></p>
<p align="left"><span style="font-size: medium">3) Click <strong>Database, </strong>Provide <strong>Username</strong>, <strong>Password. </strong>Click <strong>Connect</strong></span></p>
<p align="left"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image51.png"><img width="467" height="299" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb50.png" border="0" /></a></p>
<p align="left"><span style="font-size: medium"></span></p>
<p align="left"><span style="font-size: medium">4) Select <strong>TweetFromTwitter </strong>and click <strong>Load</strong> </span></p>
<p align="left"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image52.png"><img width="535" height="245" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb51.png" border="0" /></a></p>
&nbsp;

<span style="font-size: medium">5)</span> <span style="font-size: medium">Select <strong>Tweet_Text</strong> and <strong>Score</strong>. Select <strong>Table </strong>from <strong>Visualizations</strong></span>

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/2016/11/image53.png"><img width="613" height="264" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb52.png" border="0" /></a>

&nbsp;

<span style="font-size: medium">6) Click somewhere in canvas. Select <strong>Location</strong> and <strong>Score</strong>. Select <strong>Pie Chart</strong> as <strong>Visualization. </strong>In <strong>Values </strong>click Score and choose Average.</span>

<span style="font-size: medium"><strong></strong></span>

<a href="https://msdnshared.blob.core.windows.net/media/2016/11/image121.png"><img width="896" height="712" title="image[121]" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="image[121]" src="https://msdnshared.blob.core.windows.net/media/2016/11/image121_thumb.png" border="0" /></a>

<span style="font-size: medium"></span>

<span style="font-size: medium">7) Click on <strong>Publish</strong> if you have PowerBI account. Below is another report created with same dataset.</span>

<a href="https://msdnshared.blob.core.windows.net/media/2016/11/PowerBIReport.png"><img width="948" height="546" title="PowerBIReport" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border-width: 0px" alt="PowerBIReport" src="https://msdnshared.blob.core.windows.net/media/2016/11/PowerBIReport_thumb.png" border="0" /></a>

&nbsp;

<span style="font-size: medium">Thanks for reading/trying it out.</span>]]></content:encoded>
    </item>
    <item>
      <title>Capture Microsoft Azure Stream Analytics logs</title>
      <link>https://docs.microsoft.com/archive/blogs/biblog/capture-microsoft-azure-stream-analytics-logs</link>
      <pubDate>Thu, 25 Aug 2016 11:07:49 GMT</pubDate>
      <dc:creator><![CDATA[sudhirblog]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/biblog/?p=405</guid>
      <description><![CDATA[&nbsp;

[Cross-Posting] I recently added a new blog post at my teams blog space. It show case...]]></description>
      <content:encoded><![CDATA[&nbsp;

[Cross-Posting] I recently added a new blog post at my <a href="https://blogs.msdn.microsoft.com/bigdatasupport/2016/08/24/capture-microsoft-azure-stream-analytics-logs/"><span style="font-size: medium">teams blog space</span></a>. It show case PowerShell script to capture Azure Stream Analytics logs.

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/2016/08/image636.png"><img width="923" height="401" title="image" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/08/image_thumb516.png" border="0" /></a>

Hope it help in debugging Azure Stream Analytics Job.

--Eat Healthy, Stay Fit and Keep Learning.

Thanks.]]></content:encoded>
    </item>
    <item>
      <title>Automate HDInsight Cluster Creation using .net sdk</title>
      <link>https://docs.microsoft.com/archive/blogs/biblog/automate-hdinsight-cluster-creation-using-net-sdk-2</link>
      <pubDate>Wed, 06 Jul 2016 12:57:08 GMT</pubDate>
      <dc:creator><![CDATA[sudhirblog]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/biblog/?p=376</guid>
      <description><![CDATA[&nbsp;
This blog post shows how to automate HDInsight cluster creation from .net sdk. Information...]]></description>
      <content:encoded><![CDATA[&nbsp;
<p align="justify">This blog post shows how to automate HDInsight cluster creation from .net sdk. Information is available in pieces so I thought to blog about it so that I can refer it in future and it may help others.</p>
<p align="justify"><a href="https://azure.microsoft.com/en-in/documentation/articles/hdinsight-hadoop-create-windows-clusters-dotnet-sdk/">This blog</a> post shows how it can be done but when you execute program it will prompt for authentication which will not work when you want to automate the entire process.</p>
<p align="justify">We want to automate the process means no manual intervention is required to provide credential for authentication. In below steps I am setting up a application in Azure AD (Active Directory) which is a must if you want to automate the process, providing access to resource group and then .net code setting up HDInsight cluster.</p>
In this scenario, I have test resource group created and a storage in it from Ibiza portal.
<p align="center"><a href="https://msdnshared.blob.core.windows.net/media/2016/07/image248.png"><img width="587" height="379" title="image" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/07/image_thumb220.png" border="0" /></a></p>
<p align="justify">First step is to create Azure Active Directory application and service principal to access resources on Azure. Please follow <a href="https://azure.microsoft.com/en-us/documentation/articles/resource-group-create-service-principal-portal/">here</a> to setup.</p>
<p align="justify">Once Azure Active Directory application and role assignment  is configured it will look like below.</p>
<p align="center"><a href="https://msdnshared.blob.core.windows.net/media/2016/07/image249.png"><img width="421" height="388" title="image" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/07/image_thumb221.png" border="0" /></a></p>
<p align="center"><a href="https://msdnshared.blob.core.windows.net/media/2016/07/image250.png"><img width="694" height="284" title="image" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/07/image_thumb222.png" border="0" /></a></p>
Once it’s done. Open Visual Studio 2015. Create new console application.

Add reference mentioned <a href="https://azure.microsoft.com/en-us/documentation/articles/resource-manager-net-sdk/">here</a>.

Download code from <a href="https://github.com/rawatsudhir/AutomateHDInsightClusterCreation">here</a> and paste it.
<p align="center"><a href="https://msdnshared.blob.core.windows.net/media/2016/07/image251.png"><img width="725" height="381" title="image" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/07/image_thumb223.png" border="0" /></a></p>
Execute the code.
<p align="center"><a href="https://msdnshared.blob.core.windows.net/media/2016/07/image252.png"><img width="684" height="126" title="image" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/07/image_thumb224.png" border="0" /></a></p>
Switch to Azure portal to monitor if request has been accepted.
<p align="center"><a href="https://msdnshared.blob.core.windows.net/media/2016/07/image253.png"><img width="692" height="335" title="image" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/07/image_thumb225.png" border="0" /></a></p>
After sometime you will get message that HDInsight cluster is created.
<p align="center"><a href="https://msdnshared.blob.core.windows.net/media/2016/07/image254.png"><img width="697" height="95" title="image" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/07/image_thumb226.png" border="0" /></a></p>
Hope it helps.

Eat Healthy, Stay Fit and Keep Learning!]]></content:encoded>
    </item>
    <item>
      <title>Incremental data load from Azure Table Storage to Azure SQL using Azure Data Factory</title>
      <link>https://docs.microsoft.com/archive/blogs/biblog/incremental-data-load-from-azure-table-storage-to-azure-sql-using-azure-data-factory</link>
      <pubDate>Thu, 04 Feb 2016 10:43:00 GMT</pubDate>
      <dc:creator><![CDATA[sudhirblog]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/biblog/2016/02/04/incremental-data-load-from-azure-table-storage-to-azure-sql-using-azure-data-factory/</guid>
      <description><![CDATA[&nbsp;
I blogged about how one can load incremental data from Azure Table Storage to Azure SQL...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;</p>
<p align="justify">I blogged about how one can load incremental data from Azure Table Storage to Azure SQL using Azure Data Factory in my teams blog. Please read full post from <a href="https://blogs.msdn.com/b/bigdatasupport/archive/2016/01/24/incremental-data-load-from-azure-table-storage-to-azure-sql-using-azure-data-factory.aspx">here</a>.</p>
<p align="justify"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/5808.image_1492C652.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/5808.image_5F00_1492C652.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/2210.image_thumb_79EB4B9A.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/2210.image_5F00_thumb_5F00_79EB4B9A.png" alt="image" width="448" height="526" border="0" /></a></p>
<p align="justify">Hope it will be helpful. Thanks for your time. Cheers!!!!</p>
<p>- Eat Healthy&hellip;Stay Fit and Keep learning.</p>]]></content:encoded>
    </item>
    <item>
      <title>Adding additional storage to HDInsight cluster using PowerShell</title>
      <link>https://docs.microsoft.com/archive/blogs/biblog/adding-additional-storage-to-hdinsight-cluster-using-powershell</link>
      <pubDate>Thu, 04 Feb 2016 10:37:00 GMT</pubDate>
      <dc:creator><![CDATA[sudhirblog]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/biblog/2016/02/04/adding-additional-storage-to-hdinsight-cluster-using-powershell/</guid>
      <description><![CDATA[&nbsp;
This blog post is going to be a quick one.
Today I was working on a issue and a part of it...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;</p>
<p align="justify">This blog post is going to be a quick one.</p>
<p align="justify">Today I was working on a issue and a part of it was to add additional storage account to HDInsight cluster (ARM). For me it&rsquo;s little tricky to find out so I thought to put it here so incase someone finds it handy.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/8880.image_20740645.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/8880.image_5F00_20740645.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/3058.image_thumb_04D20B00.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/3058.image_5F00_thumb_5F00_04D20B00.png" alt="image" width="682" height="271" border="0" /></a>&nbsp;</p>
<p>Hope&nbsp;it will be helpful.</p>
<p>- Eat Healthy&hellip;Stay Fit and Keep learning.</p>]]></content:encoded>
    </item>
    <item>
      <title>Using cross/outer apply in Azure Stream Analytics</title>
      <link>https://docs.microsoft.com/archive/blogs/biblog/using-crossouter-apply-in-azure-stream-analytics</link>
      <pubDate>Tue, 11 Aug 2015 23:21:56 GMT</pubDate>
      <dc:creator><![CDATA[sudhirblog]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/biblog/2015/08/11/using-crossouter-apply-in-azure-stream-analytics/</guid>
      <description><![CDATA[&#160;  Hi again. While I was working on Azure Stream Analytics, I got into a situation where I need...]]></description>
      <content:encoded><![CDATA[<p>&#160;</p>  <p align="justify"><font size="3">Hi again. While I was working on Azure Stream Analytics, I got into a situation where I need to parse array data from incoming JSON event. So I blogged about it in my teams blog </font><a href="https://blogs.msdn.com/b/bigdatasupport/archive/2015/08/05/using-cross-outer-apply-in-azure-stream-analytics.aspx"><font size="3">here</font></a><font size="3">.</font> </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/4810.image_268BD1E3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/4810.image_5F00_268BD1E3.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/7624.image_thumb_21642738.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/7624.image_5F00_thumb_5F00_21642738.png" width="602" height="500" /></a></p>  <p><font size="3">Hope it will be helpful. Thanks for your time. Cheers!!!!</font></p>  <p><font size="3">- Eat Healthy…Stay Fit and Keep learning.</font></p>]]></content:encoded>
    </item>
    <item>
      <title>Connecting Devices – IoT Part 1</title>
      <link>https://docs.microsoft.com/archive/blogs/biblog/connecting-devices-iot-part-1</link>
      <pubDate>Tue, 14 Jul 2015 04:02:26 GMT</pubDate>
      <dc:creator><![CDATA[sudhirblog]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/biblog/2015/07/14/connecting-devices-iot-part-1/</guid>
      <description><![CDATA[&#160;  Getting Started…  I recently did a community event on IoT and thought to share my...]]></description>
      <content:encoded><![CDATA[<p align="justify"><font size="3" face="Calibri"></font></p>  <p align="justify"><font size="3" face="Calibri"></font></p>  <h1><font size="3" face="Calibri"></font></h1>  <h3 align="justify">&#160;</h3>  <h3 align="justify">Getting Started…</h3>  <p align="justify"><font size="3" face="Calibri">I recently did a community event on IoT and thought to share my learning's. </font></p>  <p align="justify"><font size="3" face="Calibri">My journey with IoT starts when I started working on Microsoft Azure Stream Analytic Service. It’s interesting how real time reporting brings lot of insights for business decision maker to get real sense of their business and make effective decisions. There are lot of real time services available like storm, MapR, Microsoft Azure Stream Analytic Service etc which help building real time solutions. I worked on Apache storm and when I started working on Azure Stream Analytic Services, one thought came to my mind which is “This is really simple”. I am not doing any comparison here which many people might be interested in. I will probably write another blog on such comparison but for now some information can be found <a href="https://blogs.technet.com/b/dataplatforminsider/archive/2014/10/30/the-ins-and-outs-of-azure-stream-analytics-real-time-event-processing.aspx">here</a>.&#160;&#160; </font></p>  <p align="justify"><font size="3" face="Calibri">During my research phase, I read lot about IoT (<a href="https://en.wikipedia.org/wiki/Internet_of_Things">Internet of Things</a>). So I started getting deeper and deeper and wonder how technology benefit world in real time. How this concept can help us to make a better world. There are lot of work going on in this direction.&#160;&#160;&#160; </font></p>  <p align="justify"><font size="3" face="Calibri">I started looking onto sensors, board, devices etc. so that I can get involved in it. I looked onto various boards available in the market like CubieBoard, Banana Pi, MinnowBoard Max, Intel Galileo, Raspberrypi etc. I bought </font><a href="https://www.raspberrypi.org">raspberry pi</a> <font size="3" face="Calibri">because it’s cheap <img class="wlEmoticon wlEmoticon-smile" style="border-top-style: none; border-bottom-style: none; border-right-style: none; border-left-style: none" alt="Smile" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/4571.wlEmoticon-smile_471B297B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/4571.wlEmoticon_2D00_smile_5F00_471B297B.png" />&#160; and I thought to use it as my entertainment device at home. I setup my raspberry pi device with sensor and send all information to PowerBI through Microsoft Service bus and Azure Stream Analytics. Here are the steps.</font></p>  <p align="justify"><font size="3" face="Calibri">When I received my raspberry pi 2 kit, here what I got in the packet. </font></p>  <blockquote>   <p align="justify"><font size="3" face="Calibri">1) Raspberry Pi 2 Model B with 1GB RAM, QuadCore CPU</font></p> </blockquote>  <blockquote>   <p align="justify"><font size="3" face="Calibri">2) 16 GB Micro SD Card with NOOBS <font size="2">(New out of box software)</font></font></p> </blockquote>  <blockquote>   <p align="justify"><font size="3" face="Calibri">3) Plastic Case</font></p> </blockquote>  <blockquote>   <p align="justify"><font size="3" face="Calibri">4) 5V 2Amp Power Adapter with Micro USB cable</font></p> </blockquote>  <blockquote>   <p align="justify"><font size="3" face="Calibri">5) High Quality HDMI Cable</font></p> </blockquote>  <blockquote>   <p align="justify"><font size="3" face="Calibri">6) 4Pole 3.5mm to 3 RCA Video/Audio Cable </font></p>    <p align="justify"><font size="3" face="Calibri">7) Cat5E Network Patch Cable</font></p> </blockquote>  <p align="justify"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/3364.image_24C624B3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/3364.image_5F00_24C624B3.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/3527.image_thumb_6520E982.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/3527.image_5F00_thumb_5F00_6520E982.png" width="552" height="286" /></a></p>  <p align="justify"><font size="3" face="Calibri">The 16 GB Micro SD Card I received have ‘new out of box software’ includes various operating system like Raspbian, Pidora, OpenELEC, OSMC, RISC OS, Arch Linux. We can choose to install any one the OS provided in Micro SD Card. Though I have Raspbian on the card but I thought to format it, download the bits and install it. Here are the steps…</font></p>  <h3 align="justify">Setting up device…</h3>  <blockquote>   <p align="justify"><font size="3" face="Calibri">1) Put SD Card in a card reader. </font></p>    <p align="justify"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/1030.image_0EB9D618.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/1030.image_5F00_0EB9D618.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/8640.image_thumb_553956D1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/8640.image_5F00_thumb_5F00_553956D1.png" width="261" height="197" /></a></p> </blockquote>  <blockquote>   <p><font size="3" face="Calibri">2) Put SD card reader into the laptop.</font></p>    <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/1680.clip_image002_421ABAD6.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/1680.clip_5F00_image002_5F00_421ABAD6.jpg"><img title="clip_image002" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto" border="0" alt="clip_image002" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/8551.clip_image002_thumb_781F39E3.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/8551.clip_5F00_image002_5F00_thumb_5F00_781F39E3.jpg" width="283" height="214" /></a></p> </blockquote>  <blockquote>   <p><font size="3" face="Calibri">3) Format the card.</font></p>    <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/4784.clip_image0025_2366619C.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/4784.clip_5F00_image0025_5F00_2366619C.jpg"><img title="clip_image002[5]" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto" border="0" alt="clip_image002[5]" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/1680.clip_image0025_thumb_07583362.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/1680.clip_5F00_image0025_5F00_thumb_5F00_07583362.jpg" width="373" height="312" /></a></p> </blockquote>  <blockquote>   <p><font size="3" face="Calibri">4) Download</font> <a href="https://www.raspberrypi.org/downloads/">Raspbian</a> <font size="3" face="Calibri">image on a separate disk.</font></p>    <p><font size="3" face="Calibri">5) I am using “win32 Disk Imager” to the write image (downloaded in previous step) on the card.</font></p> </blockquote>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/4456.5_3952649D.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/4456.5_5F00_3952649D.jpg"><img title="5" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto" border="0" alt="5" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/7142.5_thumb_5EDE72AF.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/7142.5_5F00_thumb_5F00_5EDE72AF.jpg" width="415" height="209" /></a></p>  <blockquote>   <p><font size="3" face="Calibri">6) Put SD card to raspberry pi</font></p>    <p><font size="3" face="Calibri"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/1321.6_42D04475.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/1321.6_5F00_42D04475.jpg"><img title="6" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto" border="0" alt="6" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/0272.6_thumb_094FC52F.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/0272.6_5F00_thumb_5F00_094FC52F.jpg" width="186" height="246" /></a></font></p> </blockquote>  <blockquote>   <p><font size="3" face="Calibri">7)</font> <font size="3" face="Calibri">Connect network, Power, Display, Keyboard and Mouse to raspberry pi and switch it on.</font></p>    <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/8883.7_6DADC9E9.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/8883.7_5F00_6DADC9E9.jpg"><img title="7" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto" border="0" alt="7" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/3162.7_thumb_6C6BC1BB.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/3162.7_5F00_thumb_5F00_6C6BC1BB.jpg" width="499" height="376" /></a></p> </blockquote>  <blockquote>   <p><font size="3" face="Calibri">8) It will start booting up the device and pause incase you want to change anything in configuration. The default keyboard layout is British so you may want to change it. That can be done even after.&#160; Click finish.</font></p> </blockquote>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/3554.8_6C021F77.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/3554.8_5F00_6C021F77.jpg"><img title="8" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto" border="0" alt="8" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/0358.8_thumb_51C44704.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/0358.8_5F00_thumb_5F00_51C44704.jpg" width="360" height="272" /></a></p>  <blockquote>   <p><font size="3" face="Calibri">9) Once it finish the configuration, it open the console to run queries. Type “startx” and press enter. </font></p>    <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/7510.9_36224BBF.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/7510.9_5F00_36224BBF.jpg"><img title="9" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto" border="0" alt="9" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/5417.9_thumb_027C7012.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/5417.9_5F00_thumb_5F00_027C7012.jpg" width="450" height="339" /></a></p> </blockquote>  <p>&#160;</p>  <blockquote>   <p><font size="3" face="Calibri">10) The above command will open Linux UI (below). </font></p> </blockquote>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/0116.10_41DCB453.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/0116.10_5F00_41DCB453.jpg"><img title="10" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto" border="0" alt="10" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/7713.10_thumb_1C755196.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/7713.10_5F00_thumb_5F00_1C755196.jpg" width="532" height="280" /></a></p>  <p>&#160;</p>  <p><font size="3" face="Calibri">Next I want to test some code to connect to event hub and send events. Let’s explore how that can be done.</font></p>  <h3>Installing Azure SDK for python…</h3>  <blockquote>   <p><font size="3" face="Calibri">11) Open LX Terminal.</font></p> </blockquote>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/4578.11_753D9911.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/4578.11_5F00_753D9911.jpg"><img title="11" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto" border="0" alt="11" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/4540.11_thumb_56893FD7.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/4540.11_5F00_thumb_5F00_56893FD7.jpg" width="424" height="320" /></a></p>  <p>&#160;</p>  <blockquote>   <p><font size="3" face="Calibri">12) Setting up python setuptools. Type following command <strong>sudo easy_install pip</strong></font></p> </blockquote>  <blockquote>   <p><font size="3" face="Calibri">13) Install azure sdk by running following command <strong>sudo pip install azure</strong></font></p> </blockquote>  <p><font size="3" face="Calibri"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/6404.12_45A49BE7.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/6404.12_5F00_45A49BE7.jpg"><img title="12" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto" border="0" alt="12" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/5270.12_thumb_14A77BEB.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/5270.12_5F00_thumb_5F00_14A77BEB.jpg" width="413" height="311" /></a></font></p>  <p><font size="3"><font face="Calibri"><code></code></font></font></p>  <blockquote>   <p><code><font size="3" face="Calibri">14) Once installation is done. It’ll be good to reboot. Type <strong>sudo reboot</strong> and press <strong>enter</strong>. </font></code></p>    <p><code><font size="3" face="Calibri">15) After Reboot, it will prompt for <strong>login</strong> and <strong>password</strong>. Type <strong>pi</strong> as <strong>login</strong> and <strong>raspberry</strong> as <strong>password</strong>. Press <strong>enter.</strong></font></code></p>    <p><code><font size="3" face="Calibri">16) T</font></code><code><font size="3" face="Calibri">ype <strong>startx</strong> and press <strong>enter</strong>.</font></code></p>    <h3><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/8814.16_143DD9A7.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/8814.16_5F00_143DD9A7.jpg"><img title="16" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto" border="0" alt="16" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/4087.16_thumb_4E4F3737.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/4087.16_5F00_thumb_5F00_4E4F3737.jpg" width="428" height="322" /></a></h3>    <h3>Setting up Service on Microsoft Azure…</h3>    <p><code><font size="3" face="Calibri"></font></code></p>    <p><code><font size="3" face="Calibri"></font></code></p>    <p align="justify"><code><font size="3" face="Calibri">Before we exploring python code to send events to Event hub, we need to setup service bus on Microsoft Azure.</font></code></p>    <p align="justify"><code><font size="3" face="Calibri">17) Open browser on raspberry pi or on any other device.</font></code></p>    <p align="justify"><code><font size="3" face="Calibri">18) Goto <a href="https://manage.windowsazure.com">https://manage.windowsazure.com</a> </font></code></p>    <p align="justify"><code><font size="3" face="Calibri">19) Login with your account which is associated with Microsoft Azure Subscription.</font></code></p>    <p align="justify"><code><font size="3" face="Calibri">20) Once you login, Click on Service Bus and click <strong>CREATE A NEW SERVICEBUS. </strong>You can use existing service bus as well. </font></code></p> </blockquote>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/0247.19_42BC0AA9.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/0247.19_5F00_42BC0AA9.jpg"><img title="19" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto" border="0" alt="19" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/7043.19_thumb_33A7BC80.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/7043.19_5F00_thumb_5F00_33A7BC80.jpg" width="422" height="318" /></a></p>  <blockquote>   <p><font size="3" face="Calibri">21) Enter Service Bus Name, Region, Type and Messaging Tier as mentioned below.</font></p> </blockquote>  <p>&#160;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/6862.20_65A1EDBB.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/6862.20_5F00_65A1EDBB.jpg"><img title="20" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto" border="0" alt="20" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/6470.20_thumb_6708A13E.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/6470.20_5F00_thumb_5F00_6708A13E.jpg" width="345" height="260" /></a></p>  <blockquote>   <p align="justify"><font size="3" face="Calibri">22) Once service bus set up, double click on newly created service, click on Configure and copy the Primary Key which is required in next step.</font></p>    <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/5127.WP_20150714_010_36752386.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/5127.WP_5F00_20150714_5F00_010_5F00_36752386.jpg"><img title="WP_20150714_010" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto" border="0" alt="WP_20150714_010" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/1778.WP_20150714_010_thumb_7EC4FA06.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/1778.WP_5F00_20150714_5F00_010_5F00_thumb_5F00_7EC4FA06.jpg" width="433" height="327" /></a></p> </blockquote>  <p align="justify"><font size="3" face="Calibri">We are not going to create event hub. That will be done through python code. For more information on service bus can be found <a href="https://azure.microsoft.com/en-in/documentation/services/service-bus/">here</a>.</font></p>  <h3>Sending events from Python code…</h3>  <blockquote>   <p><font size="3" face="Calibri">23) Open Python IDE</font></p>    <p>&#160;</p> </blockquote>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/5543.WP_20150714_011_34C97914.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/5543.WP_5F00_20150714_5F00_011_5F00_34C97914.jpg"><img title="WP_20150714_011" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto" border="0" alt="WP_20150714_011" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/1780.WP_20150714_011_thumb_4878F359.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/1780.WP_5F00_20150714_5F00_011_5F00_thumb_5F00_4878F359.jpg" width="376" height="284" /></a></p>  <p>&#160;</p>  <blockquote>   <p><font size="3" face="Calibri">24) Click File, New Window </font></p>    <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/4152.WP_20150714_012_5AC44ACC.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/4152.WP_5F00_20150714_5F00_012_5F00_5AC44ACC.jpg"><img title="WP_20150714_012" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto" border="0" alt="WP_20150714_012" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/7713.WP_20150714_012_thumb_5BBECB5A.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/7713.WP_5F00_20150714_5F00_012_5F00_thumb_5F00_5BBECB5A.jpg" width="324" height="244" /></a></p> </blockquote>  <blockquote>   <p><font size="3" face="Calibri">25) Copy &amp; Paste the following code</font></p>    <p><font size="2">#import random because using one of the functions in code        <br />import random         <br />from azure.servicebus import ServiceBusService</font></p>    <p><font size="2"># SharedAccessKeyName from Azure Portal        <br />key_name ='RootManageSharedAccessKey'</font></p>    <p><font size="2"># SharedAccessKey from Azure Portal        <br />key_value='' </font></p>    <p><font size="2"># Pointing to Microsoft Azure Service Bus        <br />sbs = ServiceBusService('SERVICE_BUS_NAME', shared_access_key_name=key_name, shared_access_key_value=key_value)</font></p>    <p><font size="2"># Event Hub Creation        <br />sbs.create_event_hub('hubcreationfromlinux')</font></p>    <p><font size="2"># Some randomg values        <br />devicecounts = 5         <br />eventcounts = 1000</font></p>    <p><font size="2">for eventcount in range (1, eventcounts) :        <br />&#160;&#160;&#160; deviceId = &quot;dev-&quot; + str(random.randrange (1, devicecounts))         <br />&#160;&#160;&#160; temperature = str(float(&quot;{0:.2f}&quot;.format(random.uniform (0,50))))         <br />&#160;&#160;&#160; sbs.send_event('hubcreationfromlinux', '{ &quot;DeviceId&quot;:&quot;' + deviceId + '&quot;, &quot;Temperature&quot;:&quot;' + temperature +'&quot;}')         <br />&#160;&#160;&#160; print &quot;DeviceId : &quot; + deviceId + &quot;&#160; Temperature : &quot; + temperature</font>       <br /></p>    <p align="left"><font size="2">The above code I put up in github <a href="https://github.com/rawatsudhir/firstIOTcode/blob/master/PythonToEventHub">here</a>.</font></p>    <p align="left"><font face="Calibri"><font size="3">26) Click <strong><u>F</u>ile –&gt; <u>S</u>ave</strong></font></font></p>    <p align="left"><font size="3" face="Calibri">27) Click <strong><u>R</u>un –&gt; Run Module</strong></font></p>    <p align="left"><font size="3" face="Calibri">28) Once code start executing, it will first create a Event hub and then start sending the events.</font></p>    <p align="left"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/7608.14_7214709F.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/7608.14_5F00_7214709F.jpg"><img title="14" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto" border="0" alt="14" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/6661.14_thumb_4CAD0DE2.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/6661.14_5F00_thumb_5F00_4CAD0DE2.jpg" width="561" height="308" /></a></p> </blockquote>  <blockquote>   <p><font size="3" face="Calibri">29) Switch to Microsoft Azure portal and click on newly created event hub. Under the dashboard, it will show events are coming up.</font></p>    <p>&#160;</p> </blockquote>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/2335.15_17A30F63.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/2335.15_5F00_17A30F63.jpg"><img title="15" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto" border="0" alt="15" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/1134.15_thumb_7D6536EF.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/1134.15_5F00_thumb_5F00_7D6536EF.jpg" width="496" height="374" /></a></p>  <p align="justify"><font size="3" face="Calibri">That’s all for now. I hope you like it (though it’s little longer <img class="wlEmoticon wlEmoticon-smile" style="border-top-style: none; border-bottom-style: none; border-right-style: none; border-left-style: none" alt="Smile" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/metablogapi/4571.wlEmoticon-smile_471B297B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94-metablogapi/4571.wlEmoticon_2D00_smile_5F00_471B297B.png" />). I will write another blog on same line where I will showcase how to use sensors with raspberry pi and sending events to event hub and then how to present that information on PowerBI. Signing off….Have a great day!</font></p>  <p align="justify"><font size="3" face="Calibri">- Eat Healthy…Stay Fit and Keep learning.</font></p>]]></content:encoded>
    </item>
    <item>
      <title>HDInsight: - CoC (Calculation of Cores)</title>
      <link>https://docs.microsoft.com/archive/blogs/biblog/hdinsight-coc-calculation-of-cores</link>
      <pubDate>Sat, 21 Dec 2013 23:58:00 GMT</pubDate>
      <dc:creator><![CDATA[sudhirblog]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/biblog/2013/12/21/hdinsight-coc-calculation-of-cores/</guid>
      <description><![CDATA[If you ever notice &ldquo;99% of XX HDINSIGHT CORES&rdquo; in your HDInsight dash board on wonder...]]></description>
      <content:encoded><![CDATA[<p style="text-align: justify;"><span style="font-family: times new roman,times; font-size: large;">If you ever notice &ldquo;<strong>99% of XX HDINSIGHT CORES</strong>&rdquo; in your </span><span style="font-family: times new roman,times; font-size: large;">HDInsight dash board on wonder what it means? Or during cluster creation if you </span><span style="font-family: times new roman,times; font-size: large;">get error/warning &ldquo;<strong>The cluster can have at most 0 data nodes</strong>&rdquo; and wonder what</span><br /><span style="font-family: times new roman,times; font-size: large;">it means?</span></p>
<p style="text-align: justify;"><span style="font-family: times new roman,times; font-size: large;">In this short article </span><span style="font-family: times new roman,times; font-size: large;">I&rsquo;ll just explain what above means and show core calculation.</span></p>
<p style="text-align: justify;"><span style="font-family: times new roman,times; font-size: large;">So let&rsquo;s take an example if you have 740 HDInsight Core on </span><span style="font-family: times new roman,times; font-size: large;">your subscription and&nbsp;</span><span style="font-family: times new roman,times; font-size: large;">740 HDInsight Core being used by 8 clusters (167 nodes). </span><span style="font-family: times new roman,times; font-size: large;">Each worker node consumes 4 cores and each head node consumes 8 cores.</span></p>
<p><span style="font-family: times new roman,times; font-size: large;"> Here is the calculation:-</span></p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="156">
<p><span style="font-family: times new roman,times; font-size: medium;"><strong>Clusters </strong></span></p>
</td>
<td valign="top" width="226">
<p style="text-align: center;"><span style="font-family: times new roman,times; font-size: medium;"><strong>Data Nodes x Cores</strong></span></p>
</td>
<td valign="top" width="173">
<p style="text-align: center;"><span style="font-family: times new roman,times; font-size: medium;"><strong>Head Nodes x Cores</strong></span></p>
</td>
<td valign="top" width="203">
<p style="text-align: center;"><span style="font-family: times new roman,times; font-size: medium;"><strong>Total Cores used</strong></span></p>
</td>
</tr>
<tr>
<td valign="top" width="156">
<p><span style="font-family: times new roman,times; font-size: medium;">First&nbsp;cluster</span></p>
</td>
<td valign="top" width="226">
<p style="text-align: center;"><span style="font-family: times new roman,times; font-size: medium;">16&nbsp;x 4 = 64</span></p>
</td>
<td valign="top" width="173">
<p style="text-align: center;"><span style="font-family: times new roman,times; font-size: medium;">1&nbsp;x 8 = 8</span></p>
</td>
<td valign="top" width="203">
<p style="text-align: center;"><span style="font-family: times new roman,times; font-size: medium;">72</span></p>
</td>
</tr>
<tr>
<td valign="top" width="156">
<p><span style="font-family: times new roman,times; font-size: medium;">Second&nbsp;cluster</span></p>
</td>
<td valign="top" width="226">
<p style="text-align: center;"><span style="font-family: times new roman,times; font-size: medium;">16&nbsp;x 4 = 64</span></p>
</td>
<td valign="top" width="173">
<p style="text-align: center;"><span style="font-family: times new roman,times; font-size: medium;">1&nbsp;x 8 = 8</span></p>
</td>
<td valign="top" width="203">
<p style="text-align: center;"><span style="font-family: times new roman,times; font-size: medium;">72</span></p>
</td>
</tr>
<tr>
<td valign="top" width="156">
<p><span style="font-family: times new roman,times; font-size: medium;">Third&nbsp;cluster</span></p>
</td>
<td valign="top" width="226">
<p style="text-align: center;"><span style="font-family: times new roman,times; font-size: medium;">16&nbsp;x 4 = 64</span></p>
</td>
<td valign="top" width="173">
<p style="text-align: center;"><span style="font-family: times new roman,times; font-size: medium;">1&nbsp;x 8 = 8</span></p>
</td>
<td valign="top" width="203">
<p style="text-align: center;"><span style="font-family: times new roman,times; font-size: medium;">72</span></p>
</td>
</tr>
<tr>
<td valign="top" width="156">
<p><span style="font-family: times new roman,times; font-size: medium;">Forth&nbsp;cluster</span></p>
</td>
<td valign="top" width="226">
<p style="text-align: center;"><span style="font-family: times new roman,times; font-size: medium;">16&nbsp;x 4 =64</span></p>
</td>
<td valign="top" width="173">
<p style="text-align: center;"><span style="font-family: times new roman,times; font-size: medium;">1 x 8 = 8</span></p>
</td>
<td valign="top" width="203">
<p style="text-align: center;"><span style="font-family: times new roman,times; font-size: medium;">72</span></p>
</td>
</tr>
<tr>
<td valign="top" width="156">
<p><span style="font-family: times new roman,times; font-size: medium;">Fifth&nbsp;cluster</span></p>
</td>
<td valign="top" width="226">
<p style="text-align: center;"><span style="font-family: times new roman,times; font-size: medium;">32&nbsp;x 4= 128</span></p>
</td>
<td valign="top" width="173">
<p style="text-align: center;"><span style="font-family: times new roman,times; font-size: medium;">1&nbsp;x 8 = 8</span></p>
</td>
<td valign="top" width="203">
<p style="text-align: center;"><span style="font-family: times new roman,times; font-size: medium;">136</span></p>
</td>
</tr>
<tr>
<td valign="top" width="156">
<p><span style="font-family: times new roman,times; font-size: medium;">Six&nbsp;cluster</span></p>
</td>
<td valign="top" width="226">
<p style="text-align: center;"><span style="font-family: times new roman,times; font-size: medium;">32&nbsp;x 4= 128</span></p>
</td>
<td valign="top" width="173">
<p style="text-align: center;"><span style="font-family: times new roman,times; font-size: medium;">1&nbsp;x 8 = 8</span></p>
</td>
<td valign="top" width="203">
<p style="text-align: center;"><span style="font-family: times new roman,times; font-size: medium;">136</span></p>
</td>
</tr>
<tr>
<td valign="top" width="156">
<p><span style="font-family: times new roman,times; font-size: medium;">Seven&nbsp;cluster</span></p>
</td>
<td valign="top" width="226">
<p style="text-align: center;"><span style="font-family: times new roman,times; font-size: medium;">32&nbsp;x 4= 128</span></p>
</td>
<td valign="top" width="173">
<p style="text-align: center;"><span style="font-family: times new roman,times; font-size: medium;">1&nbsp;x 8 = 8</span></p>
</td>
<td valign="top" width="203">
<p style="text-align: center;"><span style="font-family: times new roman,times; font-size: medium;">136</span></p>
</td>
</tr>
<tr>
<td valign="top" width="156">
<p><span style="font-family: times new roman,times; font-size: medium;">Eight&nbsp;cluster</span></p>
</td>
<td valign="top" width="226">
<p style="text-align: center;"><span style="font-family: times new roman,times; font-size: medium;">7&nbsp;x 4 =28</span></p>
</td>
<td valign="top" width="173">
<p style="text-align: center;"><span style="font-family: times new roman,times; font-size: medium;">1 x 8 = 8</span></p>
</td>
<td valign="top" width="203">
<p style="text-align: center;"><span style="font-family: times new roman,times; font-size: medium;">36</span></p>
</td>
</tr>
<tr>
<td valign="top" width="156">
<p><span style="font-family: times new roman,times; font-size: medium;"><strong>TOTAL</strong></span></p>
</td>
<td valign="top" width="226">
<p style="text-align: center;"><span style="font-family: times new roman,times; font-size: medium;"><strong>668 cores </strong></span></p>
</td>
<td valign="top" width="173">
<p style="text-align: center;"><span style="font-family: times new roman,times; font-size: medium;"><strong>64 cores</strong></span></p>
</td>
<td valign="top" width="203">
<p style="text-align: center;"><span style="font-family: times new roman,times; font-size: medium;"><strong>732</strong></span></p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p style="text-align: justify;"><span style="font-family: times new roman,times; font-size: large;">So if you try to create cluster at least with 1 node it requires 12 cores which is not available to subscription. That&rsquo;s why you get error &ldquo;<strong>The cluster can have at most 0 data nodes</strong>&rdquo; and message &ldquo;<strong>99% of 740 HDInsight cores</strong>&rdquo; in the dashboard.</span></p>
<p style="text-align: justify;"><span style="font-family: times new roman,times; font-size: large;"><span style="line-height: 107%; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;">In case it&rsquo;s require to increase the core, one of the options is to raise ticket from the portal.</span></span></p>
<p><span style="font-family: times new roman,times; font-size: large;"><span style="line-height: 107%; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/8228.Untitled.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94/8228.Untitled.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/53/94/8228.Untitled.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-53-94/8228.Untitled.png" alt="" border="0" /></a></span></span></p>
<p>&nbsp;</p>
<p><span style="font-family: times new roman,times; font-size: large;">The other option is reuse existing cluster in case you are not using it.</span></p>
<p>&nbsp;</p>
<p><span style="font-family: times new roman,times; font-size: large;">HTH.</span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
  </channel>
</rss>