<?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>Gaurav Agarwal</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/gagarwal/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/gagarwal/feed.xml</link>
    <description>Empowering you and your business with Big data and Analytics</description>
    <lastBuildDate>Tue, 16 Apr 2019 05:08:08 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Making Impact on Oil and Gas Industries - Microsoft Advance Analytics</title>
      <link>https://docs.microsoft.com/archive/blogs/gagarwal/making-impact-on-oil-and-gas-industries-microsoft-advance-analytics</link>
      <pubDate>Wed, 25 Jul 2018 16:47:20 GMT</pubDate>
      <dc:creator><![CDATA[Agarwal Gaurav]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/gagarwal/?p=1525</guid>
      <description><![CDATA[Advance analytics has the potential to improve and optimize the over all cost and improve the...]]></description>
      <content:encoded><![CDATA[Advance analytics has the potential to improve and optimize the over all cost and improve the productivity for the Oil and Gas Industries. To make more profit the company must reduce the production cost and improve the productivity.

Microsoft advance analytics tools are creating an impact in analyzing the enormous data which is getting generated from various tools, logs and the IoT sensors. Most of the time companies didn't realize the importance of this data and are unaware of the key value that can be drive from this data.

Some of the key challenges which can be overcome and optimize are:
<ul>
 	<li>
<div><strong>Drilling &amp; Production </strong>Optimizing the drilling process and reducing the failure will let to the profitability to the organization. Analyzing the data on real time bases and generating the real time reports dashboard. Leverage the data from all the sensors and creating the self service analytics to drive the production and minimize the safety risks. Below is how to visualize real time data using some of the Azure services:<strong>
</strong></div>
<img alt="" src="https://msdnshared.blob.core.windows.net/media/2018/07/072518_1123_MakingImpac1.png" /><strong>
</strong></li>
 	<li>
<div><strong>Predictive Maintenance </strong>The continues monitoring for the most critical and a complex equipment's is required so that the proactive maintenance or any fatal breakdown can be detected. The predictive maintenance approach required the historical data pointers for the particular type of machine which will help to build the predictive model. Azure Machine learning based model can be one of the key tool for building this type of system along with other tools and technologies.<strong>
</strong></div>
<img alt="" src="https://msdnshared.blob.core.windows.net/media/2018/07/072518_1123_MakingImpac2.png" /><strong>
</strong></li>
 	<li>
<div><strong>Enterprise Security </strong>In the recent past, oil and gas companies have invested heavily to protect their property from any unwanted threats. Big data and analytics can be used to manage internal network threats. Correlating network events with metrics and identifying patterns to predict cyber-terror is critical. By using artificial intelligence, companies can now anticipate IT security breaches and are strengthening security with data from video monitoring. This can be achieve using Microsoft Cognitive Services and creating AI based system. Microsoft Cognitive Services is a set of intelligent APIs for building equally intelligent applications. It currently offers 21 different API for analyzing images, videos, text, and much more. For more information, visit <a href="https://www.microsoft.com/cognitive-services">https://www.microsoft.com/cognitive-services</a></div></li>
 	<li>
<div><strong>Building End to End Data Lake Solution </strong>As data is continues to grow and we need a centralized repository to store any size, any type with enterprise-wide hyper-scale capability to process and analyze this data. Microsoft Azure data Lake Store and was architected from the ground up for cloud scale and performance. With Azure Data Lake Store you can analyze all of its data in a single place. It can be integrated seamlessly with your existing IT infrastructure providing you complete cloud big data and advanced analytics platform that helps you with everything from data preparation to doing interactive analytics on large-scale datasets.<strong>
</strong></div>
<img alt="" src="https://msdnshared.blob.core.windows.net/media/2018/07/072518_1123_MakingImpac3.png" /><strong>
</strong></li>
</ul>
Every method has its own pros and cons. It's fascinating that we have so many options to develop a particular solution. However I would strongly recommend to try these methods based on the use case of your systems<strong>.
</strong>

<a href="https://www.linkedin.com/in/gaurav-agarwal-bb257314"><span style="font-family: Segoe UI;font-size: 10pt">Gaurav Agarwal</span></a>]]></content:encoded>
    </item>
    <item>
      <title>Azure Data Warehouse:Understanding the DWU, workload management, resource and memory allocation</title>
      <link>https://docs.microsoft.com/archive/blogs/gagarwal/azure-data-warehouseunderstanding-the-dwu-workload-management-resource-and-memory-allocation</link>
      <pubDate>Tue, 18 Apr 2017 11:49:03 GMT</pubDate>
      <dc:creator><![CDATA[Agarwal Gaurav]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/gagarwal/?p=1395</guid>
      <description><![CDATA[SQL Azure Data Warehouse is a MPP fully managed cloud based data warehouse. It also has a unique...]]></description>
      <content:encoded><![CDATA[SQL Azure Data Warehouse is a MPP fully managed cloud based data warehouse. It also has a unique mechanism to control the concurrency level and the resource allocation. This workload management is very critical to understand and deliver the predictable performance.

All the allocation of the resources of your SQL Data Warehouse is measured in a unit called as DWU (Data Warehouse Unit), understanding the DWU and it resource allocation is highly critical to achieve the highest performance level at minimum cost.

The SQL data warehouse workload and resource management is based on the following:
<ol>
 	<li>DWU</li>
 	<li>Concurrent queries</li>
 	<li>Concurrency slots</li>
 	<li>Resource class</li>
 	<li>Memory allocation</li>
 	<li>Distribution</li>
</ol>
Let's try to understand what are there building blocks and how they are important to maximize the performance. We all know that if we go for a higher level for DWU units we will get the highest performance. But we need to also understand how to differentiate a DWU100 with a DWU2000. <strong><em>Do I really need DWU100 or do I need DWU2000 or DWU6000</em></strong>?

If I try to compare the DWU Vs the Max No. of concurrent quires, this will look something like as shown in the graph below:

<img src="https://msdnshared.blob.core.windows.net/media/2017/04/041817_0619_AzureDataWa1.png" alt="" />

If you have noticed that <strong><em>DWU100 has max 4 concurrent queries, </em></strong>from <strong><em>DWU1000 till DWU6000 we are getting max 32 concurrent queries</em>.
</strong>

Now I will say, "Why I should consider DWU beyond 1000, when the max no. of concurrent queries remains the same as 32?"

Here comes the concept of concurrency slot, <strong><em>More no. of DWU more no. for Concurrency slots.</em></strong> A <strong><em>DWU6000 you will get upto 240 concurrent slots.</em></strong>

<img src="https://msdnshared.blob.core.windows.net/media/2017/04/041817_0619_AzureDataWa2.png" alt="" />

The next confusion "What are these slots and how they going to affect the performance of a concurrent query"? There comes another concept called <strong><em>resource class.</em></strong> A resource class will help you in defining the and controlling the memory allocation and CPU cycle allocated to a query. This can be controlled and assigned using the <strong><em>database roles.</em></strong> There are four resource classes <strong><em>smallrc, mediumrc, largerc, and xlargerc.</em></strong> So as the name suggest user with smallrc will be allocated smaller amount of memory but can have more concurrent slot.

<img src="https://msdnshared.blob.core.windows.net/media/2017/04/041817_0619_AzureDataWa3.png" alt="" />
<img src="https://msdnshared.blob.core.windows.net/media/2017/04/041817_0619_AzureDataWa4.png" alt="" />

The concurrency level may decrease when users are assigned to a higher resource class or when SQL Data Warehouse is configured with low DWU. Some queries, like DMV queries, are always allowed to run.

Lastly, we need to understand the concept of Distribution. To achieve the highest throughput and query performance a <strong><em>SQL Data warehouse stores the data into 60 different distribution</em></strong>. Each distribution is referred as a single database unit called as distribution.

Distribution setting are defined at table level in a SQL Data Warehouse selecting any of the two-method available: <strong><em>Round robin or Hash.</em></strong> By default, if you do not define a distribution, the table will be distributed using the round robin distribution method.

So <strong><em>how to find how much memory is allocated to the entire data warehouse</em></strong>?

Let's say I have Data warehouse with <strong><em>DWU1500</em></strong> and the <strong><em>resource class allocated to it is xlargerc which is 3200 MB memory
</em></strong>

<strong>Total memory allocated = 3200*60 distributions/1024 = 187.5 GB </strong>

<strong>Conclusion</strong>: This blog is to help in understanding the Data warehouse workload management and how the memory allocation taken care based on the resource class assigned to a user. In order to understand the SQL Data warehouse overview and architecture I strongly recommend to go through this <a href="https://docs.microsoft.com/en-us/azure/sql-data-warehouse/sql-data-warehouse-overview-what-is">What is Azure SQL Data Warehouse?</a>

<a href="https://in.linkedin.com/in/gaurav-agarwal-bb257314">Gaurav Agarwal</a>]]></content:encoded>
    </item>
    <item>
      <title>Real-time Prediction using Azure Machine Learning with Stream Analytics and Power BI</title>
      <link>https://docs.microsoft.com/archive/blogs/gagarwal/integrating-azure-machine-learning-model-stream-analytics-with-power-bi-real-time-prediction</link>
      <pubDate>Wed, 21 Dec 2016 02:55:56 GMT</pubDate>
      <dc:creator><![CDATA[Agarwal Gaurav]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/gagarwal/?p=1345</guid>
      <description><![CDATA[Azure Stream Analytics (ASA) and Power BI integration provide us to analyze high volume streaming...]]></description>
      <content:encoded><![CDATA[<a href="https://azure.microsoft.com/en-us/services/stream-analytics/">Azure Stream Analytics</a> (ASA) and <a href="https://powerbi.microsoft.com/en-us/what-is-power-bi/">Power BI</a> integration provide us to analyze high volume streaming data in a real-time. We know already how we can integrate an Azure Stream Analytics job output to a Power BI dataset.

Now lets make this more interesting, how about doing a Real-time prediction for your streaming data and display the result in a Power BI Dashboard. This is a typical scenario when your business model need to apply Artificial Intelligence in your data and perform real time data analytics using machine learning algorithms.

The overall data integration show below:

<img src="https://msdnshared.blob.core.windows.net/media/2016/12/122016_2110_Integrating1.png" alt="" />

Following are the steps to be followed to configure AML web service with Azure Stream analytics:

(<em>Note: Assuming that you are already aware of how to configure ASA with Power BI, and you have already deployed your Azure Machine Learning model as a Web service</em>)
<ol>
 	<li>Create a New Azure Stream analytics job</li>
 	<li>
<div>Define the Job Topology Input as appropriate. I have used <em>Source</em> as <em>Event hub</em> with <em>Source type</em> as <em>Stream</em></div>
<img src="https://msdnshared.blob.core.windows.net/media/2016/12/122016_2110_Integrating2.png" alt="" /></li>
 	<li>
<div>Define the Job Topology Output as <em>Sink</em> to <em>Power BI</em> so that it will automatically create the dataset in Power BI portal</div>
<img src="https://msdnshared.blob.core.windows.net/media/2016/12/122016_2110_Integrating3.png" alt="" /></li>
 	<li>
<div>Here is the most important step where you will define a Function for calling the Azure Machine Learning Web Service. Click on <em>Function</em> on left pane of the Stream Analytic job and <em>Add</em> New -&gt; Function Alias -&gt; Function Type as Azure ML -&gt; Subscription-&gt; URL of your Azure Web Service-&gt; API KPI. Once its make the successful call to the Azure ML Web Service it will automatically populate the function <em>Signature</em></div>
<img src="https://msdnshared.blob.core.windows.net/media/2016/12/122016_2110_Integrating4.png" alt="" />
<img src="https://msdnshared.blob.core.windows.net/media/2016/12/122016_2110_Integrating5.png" alt="" />

<img src="https://msdnshared.blob.core.windows.net/media/2016/12/122016_2110_Integrating6.png" alt="" />
<div></div></li>
 	<li>
<div>Finally define the Job Topology <em>Query</em> for the ASA job, you need to call the AML function in the <em>Select</em> clause which you have created in the query as show below:</div>
<img src="https://msdnshared.blob.core.windows.net/media/2016/12/122016_2110_Integrating7.png" alt="" />
<div></div></li>
 	<li>
<div>Save the query and you can now Start the job, this will create a Power BI dataset along with AML function output prediction.</div></li>
</ol>
I hope this blog will help you to know how to configure and perform Real time prediction using Azure Machine Learning and integrating it to a Power BI dashboard.

<a href="https://www.linkedin.com/in/gaurav-agarwal-bb257314">Gaurav Agarwal</a>
<p style="margin-left: 36pt"></p>]]></content:encoded>
    </item>
    <item>
      <title>Installing R package in Azure Machine Learning</title>
      <link>https://docs.microsoft.com/archive/blogs/gagarwal/installing-r-package-in-azure-machine-learning</link>
      <pubDate>Sat, 03 Dec 2016 04:59:47 GMT</pubDate>
      <dc:creator><![CDATA[Agarwal Gaurav]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/gagarwal/?p=1075</guid>
      <description><![CDATA[We already know that Azure Machine Learning(https://studio.azureml.net/) supports for R language...]]></description>
      <content:encoded><![CDATA[We already know that Azure Machine Learning(<a href="https://studio.azureml.net/">https://studio.azureml.net/</a>) supports for R language which makes our life easier to use our own existing R code with in AML studio.

There are over 400 most popular R packages pre-install in the Azure Machine Learning Studio.

<strong>How to find the list of packages that are currently supported or installed,</strong> you can use the below script:

Use <strong><em>Execute R script</em></strong> task in AML studio and copy paste the below script:<span style="color: #000000;font-family: Calibri">
</span>

<em><span style="color: #3366ff">out &lt;- data.frame(installed.packages(,,,fields="Description"))</span></em>
<em><span style="color: #00ccff"><span style="color: #3366ff">maml.mapOutputPort("out") </span> </span></em>

If you want, you can also convert the output to a CSV file using <strong><em>Convert to CSV</em></strong>:

<img alt="" src="https://msdnshared.blob.core.windows.net/media/2016/12/120216_2329_InstallingR2.png" />

Now the biggest issue is when we try to execute our existing R code which have R packages not pre-install or supported in AML. You will end up getting <span style="color: red">Error: could not find function "&lt;<em>packagename</em>&gt;" or package '&lt;<em>packagename</em>&gt;'is not available or there is no package called '&lt;packagename&gt;'
</span>

You need to upload/install the R package with Azure Machine Learning Studio to execute you code.

<strong>Here are the Steps How to install/upload outside R package in Azure Machine Learning studio:
</strong>

<strong>I will be using <a href="https://cran.r-project.org/web/packages/dummies/index.html"><span style="color: #00b0f0"><em>dummies</em></span></a> R package in my example for the installation:
</strong>
<ol>
 	<li>Download the R package <em>dummies</em> or which you want to install, you can use R studio to do this if the package is not yet install in the R package library. Location will be: C:\Users\<em>&lt;username</em>&gt;\Documents\R\win-library\3.2</li>
 	<li>
<div>Put <em>dummies</em> package into a .zip folder as shown below:</div>
<img alt="" src="https://msdnshared.blob.core.windows.net/media/2016/12/120216_2329_InstallingR3.png" /></li>
</ol>
<ol>
 	<li>Now the most important step where most of us making mistake is we need to again put the .zip folder to another .zip folder. Which means <em>dummies.zip -&gt; dummies (2).zip</em></li>
 	<li>
<div>You can rename the final zip folder as per your wish let say in my case I renamed it to <em>pack.zip</em></div>
<img alt="" src="https://msdnshared.blob.core.windows.net/media/2016/12/120216_2329_InstallingR4.png" /></li>
</ol>
<img alt="" src="https://msdnshared.blob.core.windows.net/media/2016/12/120216_2329_InstallingR5.png" />
<ol>
 	<li>
<div>Upload the final pack.zip file to the Azure Machine Learning Data Set:</div>
<img alt="" src="https://msdnshared.blob.core.windows.net/media/2016/12/120216_2329_InstallingR6.png" /></li>
 	<li>Under saved data set drag and drop the .zip package file</li>
 	<li>
<div>Use <strong><em>Execute R script</em></strong> task in AML studio and copy paste the below script:</div>
<em><span style="color: #3366ff">install.packages("src/pack/dummies.zip", lib = ".", repos = NULL, verbose = TRUE)
library(dummies, lib.loc=".", verbose=TRUE)</span></em>

<em><span style="color: #3366ff"></span></em>

&nbsp;

<em><span style="color: #3366ff"></span></em>

<img alt="" src="https://msdnshared.blob.core.windows.net/media/2016/12/120216_2329_InstallingR8.png" /></li>
 	<li>
<div>This will successful install the <em>dummies</em> R package.</div></li>
</ol>
Please note if you are getting the below error while running you R script, please do zip of you zip, as mention in the step 3.
<p style="background: #eff0f1"><span style="color: #303336;font-family: Consolas;font-size: 10pt">Error <span style="color: #7d2727">0063<span style="color: #303336">: The following error occurred during evaluation of R script:
</span></span></span></p>
<p style="background: #eff0f1"><span style="color: #303336;font-family: Consolas;font-size: 10pt">---------- Start of error message from R ----------
</span></p>
<p style="background: #eff0f1"><span style="color: #303336;font-family: Consolas;font-size: 10pt">zip file <span style="color: #7d2727">'src/dummies.zip'<span style="color: #303336"> not found<span style="color: #393318">
</span></span></span></span></p>
I hope this blog will help you to know how to check the pre-install, and how to install you own R package within Azure ML Studio and handle ErrorCode":"0063.

<a href="https://in.linkedin.com/in/gaurav-agarwal-bb257314">Gaurav Agarwal</a>

&nbsp;]]></content:encoded>
    </item>
  </channel>
</rss>