<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: swatiBabber</title>
    <description>The latest articles on DEV Community by swatiBabber (@swatibabber).</description>
    <link>https://dev.to/swatibabber</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F516926%2F4a1003c8-a345-4b4f-86c1-afcd3fe09a7b.png</url>
      <title>DEV Community: swatiBabber</title>
      <link>https://dev.to/swatibabber</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/swatibabber"/>
    <language>en</language>
    <item>
      <title>Performance tip for  Cosmos DB collection migration using ADF </title>
      <dc:creator>swatiBabber</dc:creator>
      <pubDate>Mon, 21 Jun 2021 11:32:15 +0000</pubDate>
      <link>https://dev.to/swatibabber/performance-tip-for-cosmos-db-collection-migration-using-adf-289p</link>
      <guid>https://dev.to/swatibabber/performance-tip-for-cosmos-db-collection-migration-using-adf-289p</guid>
      <description>&lt;p&gt;If your Cosmos DB migration pipeline is taking a long time :&lt;br&gt;
&lt;strong&gt;first thing&lt;/strong&gt; to check is the overview page of your Cosmos Db for throttling metric in monitoring chart.&lt;/p&gt;

&lt;p&gt;The Overview page in the Azure portal for each Azure Cosmos database includes a brief view of the database usage including its request and hourly billing usage. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xMqml6bR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k0gkp73el8dfmp2bisa8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xMqml6bR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k0gkp73el8dfmp2bisa8.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you see multiple(more than 1-5) Http 429s in the chart , that means provisioned throughput is not enough for the amount of data you are migrating.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pre-create containers with enough RUs&lt;/strong&gt;&lt;br&gt;
Although Azure Cosmos DB scales out storage automatically, it is not advisable to start from the smallest container size. Smaller containers have lower throughput availability, which means that the migration would take much longer to complete. Instead, it is useful to create the containers with the final data size and make sure that the migration workload is fully consuming the provisioned throughput.&lt;/p&gt;

&lt;p&gt;If data size was estimated to be around 60 TB, a container of at least 2.4 M RUs is required to accommodate the entire dataset.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Estimate the migration speed&lt;/strong&gt;&lt;br&gt;
Assuming that the migration workload can consume the entire provisioned throughput, the provisioned throughout would provide an estimation of the migration speed. Continuing the previous example, 5 RUs are required for writing a 1-KB document to Azure Cosmos DB SQL API account. &lt;br&gt;
2.4 million RUs would allow a transfer of 480,000 documents per second (or 480 MB/s). This means that the complete migration of 60 TB will take 125,000 seconds or about 34 hours.&lt;/p&gt;

&lt;p&gt;In case you want the migration to be completed within a day, you should increase the provisioned throughput to 5 million RUs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Secondly,&lt;br&gt;
**Determine if there is a hot partition&lt;/strong&gt;&lt;br&gt;
To verify if there is a hot partition, navigate to Insights &amp;gt; Throughput &amp;gt; Normalized RU Consumption (%) By PartitionKeyRangeID. Filter to a specific database and container.&lt;/p&gt;

&lt;p&gt;Each PartitionKeyRangeId maps to a one physical partition. If there is one PartitionKeyRangeId that has significantly higher Normalized RU consumption than others (for example, one is consistently at 100%, but others are at 30% or less), this can be a sign of a hot partition.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5NN_r1dP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ucm0fbn4p1gft97ulmps.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5NN_r1dP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ucm0fbn4p1gft97ulmps.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To see which logical partition keys are consuming the most RU/s, use Azure Diagnostic Logs. This sample query sums up the total request units consumed per second on each logical partition key.&lt;/p&gt;

&lt;p&gt;Kusto&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Copy&lt;br&gt;
AzureDiagnostics&lt;br&gt;
| where TimeGenerated &amp;gt;= ago(24hour)&lt;br&gt;
| where Category == "PartitionKeyRUConsumption"&lt;br&gt;
| where collectionName_s == "CollectionName" &lt;br&gt;
| where isnotempty(partitionKey_s)&lt;br&gt;
// Sum total request units consumed by logical partition key for each second&lt;br&gt;
| summarize sum(todouble(requestCharge_s)) by partitionKey_s, operationType_s, bin(TimeGenerated, 1s)&lt;br&gt;
| order by sum_requestCharge_s desc&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This sample output shows that in a particular minute, the logical partition key with value "Contoso" consumed around 12,000 RU/s, while the logical partition key with value "Fabrikam" consumed less than 600 RU/s. If this pattern was consistent during the time period where rate limiting occurred, this would indicate a hot partition.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PnaezQVa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mv9ml5hkzdisvqa9b4fe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PnaezQVa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mv9ml5hkzdisvqa9b4fe.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>adfinterviewquestions</category>
      <category>adf</category>
      <category>azure</category>
      <category>performance</category>
    </item>
    <item>
      <title>Array Rotation</title>
      <dc:creator>swatiBabber</dc:creator>
      <pubDate>Tue, 20 Apr 2021 08:53:32 +0000</pubDate>
      <link>https://dev.to/swatibabber/array-rotation-1d2g</link>
      <guid>https://dev.to/swatibabber/array-rotation-1d2g</guid>
      <description>&lt;p&gt;Use &lt;strong&gt;array reversal&lt;/strong&gt; for array rotation .&lt;br&gt;
Use two pointer for array reversal.&lt;/p&gt;

&lt;p&gt;public class Solution {&lt;br&gt;
    public void Rotate(int[] nums, int k) {&lt;br&gt;
        k=k% nums.Length;&lt;br&gt;
              k=k% nums.Length;&lt;br&gt;
        reverse(nums, 0, nums.Length-1);&lt;br&gt;
        reverse(nums,0, k-1);&lt;br&gt;
        reverse(nums,k,nums.Length-1);&lt;br&gt;
    }&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;void reverse(int[] nums, int start , int end)
{
    while(start&amp;lt;end)
    {
        int temp=nums[start];
        nums[start]=nums[end];
        nums[end]=temp;
        start++;
        end--;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;/p&gt;

</description>
      <category>twopointerapproach</category>
      <category>reversearray</category>
    </item>
    <item>
      <title>Remove duplicates from Sorted Array</title>
      <dc:creator>swatiBabber</dc:creator>
      <pubDate>Mon, 19 Apr 2021 16:41:20 +0000</pubDate>
      <link>https://dev.to/swatibabber/remove-duplicates-from-sorted-array-4l4h</link>
      <guid>https://dev.to/swatibabber/remove-duplicates-from-sorted-array-4l4h</guid>
      <description>&lt;p&gt;If array is a sorted array, use two pointer approach to find the position of non duplicate items in the array.&lt;/p&gt;

&lt;p&gt;public class Solution {&lt;br&gt;
    public int RemoveDuplicates(int[] nums) &lt;br&gt;
    {&lt;br&gt;
         int len=0;&lt;br&gt;
         if(nums.Length==0)&lt;br&gt;
             { return 0; }&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    for(int i=0;i&amp;lt;nums.Length-1;i++)
     {
       if( nums[i]!=nums[i+1])
       {
           len=len+1;
           nums[len]=nums[i+1];
       }
     }
   return len+1;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;/p&gt;

</description>
      <category>twopointerapproach</category>
    </item>
    <item>
      <title>ADF-Mapping data flows performance and tuning</title>
      <dc:creator>swatiBabber</dc:creator>
      <pubDate>Mon, 04 Jan 2021 22:01:54 +0000</pubDate>
      <link>https://dev.to/swatibabber/adf-mapping-data-flows-performance-and-tuning-51pp</link>
      <guid>https://dev.to/swatibabber/adf-mapping-data-flows-performance-and-tuning-51pp</guid>
      <description>&lt;p&gt;It is very important to understand the compute logic behind data flows to tune the performance of the data flow pipeline. Data flows utilize a Spark optimizer that reorders and runs your business logic in 'stages' to perform as quickly as possible.&lt;/p&gt;

&lt;p&gt;For each sink that your data flow writes to, the monitoring output lists the duration of each transformation stage, along with the time it takes to write data into the sink.&lt;strong&gt;The time that is the largest is likely the bottleneck of your data flow.&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If the transformation stage that takes the largest contains a source, then you may want to look at further optimizing your read time. &lt;/li&gt;
&lt;li&gt;If a transformation is taking a long time, then you may need to repartition or increase the size of your integration runtime.&lt;/li&gt;
&lt;li&gt;If the sink processing time is large, you may need to scale up your database or verify you are not outputting to a single file.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once you have identified the bottleneck of your data flow, use the below optimizations strategies to improve performance.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Optimize&lt;/strong&gt;:&lt;br&gt;
The Optimize tab contains settings to configure the partitioning scheme of the Spark cluster. This tab exists in every transformation of data flow and specifies whether you want to repartition the data after the transformation has completed. Adjusting the partitioning provides control over the distribution of your data across compute nodes and data locality optimizations that can have both positive and negative effects on your overall data flow performance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Logging level&lt;/strong&gt; :&lt;br&gt;
If you do not require every pipeline execution of your data flow activities to fully log all verbose telemetry logs, you can optionally set your logging level to "Basic" or "None".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Optimizing the Azure Integration Runtime&lt;/strong&gt;&lt;br&gt;
Data flows run on Spark clusters that are spun up at run-time. The configuration for the cluster used is defined in the integration runtime (IR) of the activity. There are three performance considerations to make when defining your integration runtime: cluster type, cluster size, and time to live.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Cluster Type: general Purpose , Memory optimized and Compute optimized.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;General purpose clusters&lt;/strong&gt; are the default selection and will be ideal for most data flow workloads. These tend to be the best balance of performance and cost.&lt;/p&gt;

&lt;p&gt;If your data flow has many joins and lookups, you may want to use a &lt;strong&gt;memory optimized cluster&lt;/strong&gt;. They can store more data in memory and will minimize any out-of-memory errors you may get. Memory optimized have the highest price-point per core, but also tend to result in more successful pipelines. If you experience any out of memory errors when executing data flows, switch to a memory optimized Azure IR configuration.&lt;/p&gt;

&lt;p&gt;For simpler, non-memory intensive data transformations such as filtering data or adding derived columns, &lt;strong&gt;compute-optimized clusters&lt;/strong&gt; can be used at a cheaper price per core.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Cluster size&lt;br&gt;
Data flows distribute the data processing over different nodes in a Spark cluster to perform operations in parallel. A Spark cluster with more cores increases the number of nodes in the compute environment. More nodes increase the processing power of the data flow. Increasing the size of the cluster is often an easy way to reduce the processing time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Time to live&lt;br&gt;
By default, every data flow activity spins up a new cluster based upon the IR configuration. Cluster start-up time takes a few minutes and data processing can't start until it is complete. If your pipelines contain multiple sequential data flows, you can enable a time to live (TTL) value. Specifying a time to live value keeps a cluster alive for a certain period of time after its execution completes. If a new job starts using the IR during the TTL time, it will reuse the existing cluster and start up time will greatly reduced. After the second job completes, the cluster will again stay alive for the TTL time.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Only one job can run on a single cluster at a time. If there is an available cluster, but two data flows start, only one will use the live cluster. The second job will spin up its own isolated cluster.&lt;/p&gt;

&lt;p&gt;4.&lt;strong&gt;Optimize Source&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Select proper partitioning depending on the source. &lt;/li&gt;
&lt;li&gt;For file based sources, avoid using for-each activity as every iteration will spin up new Spark cluster.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;5.&lt;strong&gt;Optimize Sink&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Disabling index , if it is a SQL sink.&lt;/li&gt;
&lt;li&gt;Scaling up , if it is a SQL sink.&lt;/li&gt;
&lt;li&gt;Enable staging for Synapse.&lt;/li&gt;
&lt;li&gt;Use Spark-native Parquet format for File based sinks.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>adfmappingdataflows</category>
      <category>adfinterview</category>
      <category>adfinterviewquestions</category>
      <category>adfperformance</category>
    </item>
    <item>
      <title>ADF-Mapping Data Flows Debug Mode</title>
      <dc:creator>swatiBabber</dc:creator>
      <pubDate>Mon, 04 Jan 2021 21:43:26 +0000</pubDate>
      <link>https://dev.to/swatibabber/adf-mapping-data-flows-debug-mode-1mg9</link>
      <guid>https://dev.to/swatibabber/adf-mapping-data-flows-debug-mode-1mg9</guid>
      <description>&lt;p&gt;Azure Data Factory mapping data flow's debug mode allows you to interactively watch the data shape transform while you build and debug your data flows. &lt;/p&gt;

&lt;p&gt;1.The debug session can be used both in Data Flow design sessions as well as during pipeline debug execution of data flows.&lt;/p&gt;

&lt;p&gt;2.When Debug mode is on, you'll interactively build your data flow with an active Spark cluster. The session will close once you turn debug off in Azure Data Factory. &lt;strong&gt;You should be aware of the hourly charges incurred by Azure DataBricks during the time that you have the debug session turned on&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;3.If you have parameters in your Data Flow or any of its referenced datasets, you can specify what values to use during debugging by selecting the &lt;strong&gt;Parameters tab in Debug Settings.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;4.&lt;strong&gt;File sources only limit the rows that you see, not the rows being read.&lt;/strong&gt; For very large datasets, it is recommended that you take a small portion of that file and use it for your testing. You can select a temporary file in Debug Settings for each source that is a file dataset type.&lt;/p&gt;

&lt;p&gt;5.&lt;strong&gt;When running in Debug Mode in Data Flow, your data will not be written to the Sink transform.&lt;/strong&gt;A Debug session is intended to serve as a test harness for your transformations.&lt;/p&gt;

&lt;p&gt;6.When unit testing Joins, Exists, or Lookup transformations, make sure that you use a small set of known data for your test. You can use the Debug Settings option above to set a temporary file to use for your testing. This is needed because when limiting or sampling rows from a large dataset, &lt;strong&gt;you cannot predict which rows and which keys will be read into the flow for testing.&lt;/strong&gt; The result is non-deterministic, meaning that your join conditions may fail.&lt;/p&gt;

&lt;p&gt;7.When executing a debug pipeline run with a data flow, you have two options on which compute to use. You can either use an existing debug cluster or spin up a new just-in-time cluster for your data flows.&lt;br&gt;
Using an existing debug session will greatly reduce the data flow start up time as the cluster is already running, but is not recommended for complex or parallel workloads as it may fail when multiple jobs are run at once.&lt;/p&gt;

</description>
      <category>mappingdataflows</category>
      <category>debuggingadf</category>
      <category>adfinterview</category>
      <category>adfinterviewquestions</category>
    </item>
    <item>
      <title>How does Azure Data Factory work?</title>
      <dc:creator>swatiBabber</dc:creator>
      <pubDate>Mon, 04 Jan 2021 14:28:22 +0000</pubDate>
      <link>https://dev.to/swatibabber/how-does-azure-data-factory-work-j5n</link>
      <guid>https://dev.to/swatibabber/how-does-azure-data-factory-work-j5n</guid>
      <description>&lt;p&gt;Data Factory contains a series of interconnected systems that provide a complete end-to-end platform for data engineers.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Connect and Collect&lt;/strong&gt;: The first step in building an information production system is to connect to all the required sources of data and processing, such as software-as-a-service (SaaS) services, databases, file shares, and FTP web services. The next step is to move the data as needed to a &lt;strong&gt;centralized location&lt;/strong&gt; for subsequent processing.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Without Data Factory, enterprises must build custom data movement components or write custom services to integrate these data sources and processing. It's expensive and hard to integrate and maintain such systems. In addition, they often lack the enterprise-grade monitoring, alerting, and the controls that a fully managed service can offer.&lt;/p&gt;

&lt;p&gt;2.&lt;strong&gt;Transform and enrich&lt;/strong&gt;: After data is present in a centralized data store in the cloud, process or transform the collected data by using ADF mapping data flows. Data flows enable data engineers to build and maintain data transformation graphs that execute on Spark without needing to understand Spark clusters or Spark programming.&lt;/p&gt;

&lt;p&gt;If you prefer to code transformations by hand, ADF supports external activities for executing your transformations on compute services such as HDInsight Hadoop, Spark, Data Lake Analytics, and Machine Learning.&lt;/p&gt;

&lt;p&gt;3.&lt;strong&gt;CI/CD and publish&lt;/strong&gt;:&lt;br&gt;
Data Factory offers full support for CI/CD of your data pipelines using Azure DevOps and GitHub. This allows you to incrementally develop and deliver your ETL processes before publishing the finished product. After the raw data has been refined into a business-ready consumable form, load the data into Azure Data Warehouse, Azure SQL Database, Azure CosmosDB, or whichever analytics engine your business users can point to from their business intelligence tools.&lt;/p&gt;

&lt;p&gt;4.&lt;strong&gt;Monitor&lt;/strong&gt;:After you have successfully built and deployed your data integration pipeline, providing business value from refined data, monitor the scheduled activities and pipelines for success and failure rates. Azure Data Factory has built-in support for pipeline monitoring via Azure Monitor, API, PowerShell, Azure Monitor logs, and health panels on the Azure portal.&lt;/p&gt;

</description>
      <category>adfinterviewquestions</category>
      <category>azure</category>
      <category>adfinterview</category>
    </item>
    <item>
      <title>Why Azure Data Factory?</title>
      <dc:creator>swatiBabber</dc:creator>
      <pubDate>Mon, 04 Jan 2021 11:59:57 +0000</pubDate>
      <link>https://dev.to/swatibabber/why-azure-data-factory-1p07</link>
      <guid>https://dev.to/swatibabber/why-azure-data-factory-1p07</guid>
      <description>&lt;p&gt;I will explain this with an example:&lt;br&gt;
&lt;strong&gt;Scenario&lt;/strong&gt;: A gaming company that collects petabytes of game logs that are produced by games in the cloud.&lt;br&gt;
&lt;strong&gt;Business Requirements&lt;/strong&gt;: The company wants to analyze these logs to gain insights into customer preferences, demographics, and usage behavior. It also wants to identify up-sell and cross-sell opportunities, develop compelling new features, drive business growth, and provide a better experience to its customers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tech Requirements&lt;/strong&gt;:&lt;br&gt;
1.To analyze these logs, the company needs to use reference data such as customer information, game information, and marketing campaign information that is in an on-premises data store.&lt;br&gt;
2.The company wants to utilize this data from the on-premises data store, combining it with additional log data that it has in a cloud data store.&lt;br&gt;
3.To extract insights, it hopes to process the joined data by using a Spark cluster in the cloud (Azure HDInsight), &lt;br&gt;
4.Publish the transformed data into a cloud data warehouse such as Azure Synapse Analytics to easily build a report on top of it. 5.They want to automate this workflow, and monitor and manage it on a daily schedule. They also want to execute it when files land in a blob store container.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution using ADF&lt;/strong&gt;:&lt;br&gt;
Using Azure Data Factory, you can create and schedule data-driven workflows (called pipelines) that can ingest data from disparate data stores. You can build complex ETL processes that transform data visually with data flows or by using compute services such as Azure HDInsight Hadoop, Azure DataBricks, and Azure SQL Database.&lt;/p&gt;

&lt;p&gt;Additionally, you can publish your transformed data to data stores such as Azure Synapse Analytics for business intelligence (BI) applications to consume. Ultimately, through Azure Data Factory, raw data can be organized into meaningful data stores and data lakes for better business decisions.&lt;/p&gt;

&lt;p&gt;Check out next article in the series:&lt;br&gt;
&lt;a href="https://dev.to/swatibabber/how-does-azure-data-factory-work-j5n"&gt;https://dev.to/swatibabber/how-does-azure-data-factory-work-j5n&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--C51fGRA7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qtibxgtfwlph7rxtcpa8.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--C51fGRA7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qtibxgtfwlph7rxtcpa8.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>adfinterviewtips</category>
      <category>azureinterview</category>
      <category>adf</category>
      <category>adftips</category>
    </item>
    <item>
      <title>Data Factory - Azure AD Authentication for SQL Database</title>
      <dc:creator>swatiBabber</dc:creator>
      <pubDate>Tue, 24 Nov 2020 09:46:28 +0000</pubDate>
      <link>https://dev.to/swatibabber/data-factory-azure-ad-authentication-for-sql-database-4hml</link>
      <guid>https://dev.to/swatibabber/data-factory-azure-ad-authentication-for-sql-database-4hml</guid>
      <description>&lt;p&gt;To use Azure identity authentication, follow these steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Provision an Azure Active Directory administrator for your &lt;br&gt;
server on the Azure portal&lt;/strong&gt;, if not already done : This is an &lt;br&gt;
important step as for adding Azure data factory's managed &lt;br&gt;
identity as a user in SQL, an Azure AD account having &lt;strong&gt;at &lt;br&gt;
least "ALTER ANY USER"&lt;/strong&gt; permission is required.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If 2nd step is performed using a SQL Authenticated account, &lt;br&gt;
the SQL command will return error.&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Create contained database users for the Azure Data Factory &lt;br&gt;
managed identity&lt;/strong&gt;.Connect to the database from or to which &lt;br&gt;
you want to copy data by using tools like SQL Server &lt;br&gt;
Management Studio, with an Azure AD identity that has at least &lt;br&gt;
ALTER ANY USER permission. Run the following T-SQL&lt;/p&gt;

&lt;p&gt;&lt;em&gt;CREATE USER [your Data Factory name] FROM EXTERNAL PROVIDER&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Grant the Data Factory managed identity needed permissions as &lt;br&gt;
you normally do for SQL users and others. Run the following &lt;br&gt;
code &lt;br&gt;
&lt;em&gt;ALTER ROLE [role name] ADD MEMBER [your Data Factory name]&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;Refer this &lt;a href="https://www.sqlshack.com/working-azure-active-directory-azure-sql-database/"&gt;link&lt;/a&gt; for demo.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>azure</category>
      <category>datafactory</category>
      <category>azureactivedirectory</category>
      <category>sqldatabase</category>
    </item>
    <item>
      <title>Third party REST API(OAuth) call using Azure Data Factory-Web Activity</title>
      <dc:creator>swatiBabber</dc:creator>
      <pubDate>Fri, 20 Nov 2020 08:44:01 +0000</pubDate>
      <link>https://dev.to/swatibabber/third-party-rest-api-call-from-azure-data-factory-web-activity-using-oauth2-5agi</link>
      <guid>https://dev.to/swatibabber/third-party-rest-api-call-from-azure-data-factory-web-activity-using-oauth2-5agi</guid>
      <description>&lt;p&gt;One of the common requirements in Data flow pipelines is to retrieve data from REST endpoint and copy it to a data store.&lt;/p&gt;

&lt;p&gt;When I started working on ADF, I found out, there was a confusing list of concepts available to implement scenarios like this: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Linked Service using Anonymous/Basic authentication to connect 
to REST endpoint.&lt;/li&gt;
&lt;li&gt;Linked Service using MSI/AAD service principal to connect to 
REST endpoint.&lt;/li&gt;
&lt;li&gt;Web Activity to fetch time based OAuth(access) token using 
credentials in Http POST body. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;First option, helps in cases when you are trying to access Azure or third party REST APIs where no authorization(access token) is required. In this case, you can create a Linked Service using Anonymous or basic authentication to access the data available at the endpoint.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Second option&lt;/strong&gt; lets you access only &lt;strong&gt;Azure APIs/services/endpoints&lt;/strong&gt; by providing either the managed service identity or using the Service principal to authenticate and authorize using AAD.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Third option&lt;/strong&gt; is used when you want to access a &lt;strong&gt;third party REST API&lt;/strong&gt; which requires authentication as well as authorization(OAuth).In this case the Linked Service approach does not work and a web activity in a pipeline is required to fetch the access token. This access token is then used in subsequent calls to the REST endpoint.&lt;/p&gt;

&lt;p&gt;Below are the steps to implement the third option.(Assuming Username and password are stored in Key Vault)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a Web activity to fetch username from AKV.&lt;/li&gt;
&lt;li&gt;Create another Web activity to fetch password from AKV.&lt;/li&gt;
&lt;li&gt;Create another Web activity to do a POST call with JSON in 
request body consisting of username/password.
Output of this third activity gives the access token , which 
can be used in subsequent calls to REST API.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Um0QY5V3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/8231ock3aswm57fprwu3.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Um0QY5V3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/8231ock3aswm57fprwu3.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Refer the ADF lab 3 below , for a sample of this.&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vJ70wriM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/github-logo-ba8488d21cd8ee1fee097b8410db9deaa41d0ca30b004c0c63de0a479114156f.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/Mmodarre"&gt;
        Mmodarre
      &lt;/a&gt; / &lt;a href="https://github.com/Mmodarre/AzureDataFactoryHOL"&gt;
        AzureDataFactoryHOL
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Azure Data Factory Hands On Lab - Step by Step - A Comprehensive Azure Data Factory and Mapping Data Flow step by step tutorial
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://raw.githubusercontent.com/Mmodarre/AzureDataFactoryHOL/master/.//media/image1.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rHopso5n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/Mmodarre/AzureDataFactoryHOL/master/./media/image1.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
Note: This is a work in progress and any feedback and collaboration is really appreciated. New excercises will be added soon.&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;ELT with Azure Data Factory&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;And&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mapping Data Flows&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Hands-on lab step-by-step&lt;/p&gt;

&lt;p&gt;Feb 2020&lt;/p&gt;

&lt;p&gt;Information in this document, including URL and other Internet Web site
references, is subject to change without notice. Unless otherwise noted
the example companies, organizations, products, domain names, e-mail
addresses, logos, people, places, and events depicted herein are
fictitious, and no association with any real company, organization
product, domain name, e-mail address, logo, person, place or event is
intended or should be inferred. Complying with all applicable copyright
laws is the responsibility of the user. Without limiting the rights
under copyright, no part of this document may be reproduced, stored in
or introduced into a retrieval system, or transmitted in any form or by
any means (electronic, mechanical, photocopying, recording, or
otherwise), or for any…&lt;/p&gt;
&lt;/div&gt;


&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/Mmodarre/AzureDataFactoryHOL"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;
 

</description>
      <category>oauth</category>
      <category>datafactory</category>
      <category>restapi</category>
      <category>managedidentity</category>
    </item>
    <item>
      <title>Why use Key Vault in ADF?</title>
      <dc:creator>swatiBabber</dc:creator>
      <pubDate>Wed, 18 Nov 2020 19:58:03 +0000</pubDate>
      <link>https://dev.to/swatibabber/why-use-key-vault-in-adf-fdf</link>
      <guid>https://dev.to/swatibabber/why-use-key-vault-in-adf-fdf</guid>
      <description>&lt;p&gt;Azure Key Vault (AKV) can be used to store all credentials for services that ADF will connect to. This has multiple advantages:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Security of storing sensitive information in credentials store &lt;br&gt;
which only the ADF service or Administrators can read from.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If credentials need to be rotated, ADF Linked Service is not &lt;br&gt;
required to be modified.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When we migrate the ADF pipeline from Dev to Test to Production &lt;br&gt;
no change is necessary.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>adf</category>
      <category>security</category>
      <category>privacy</category>
      <category>datafactory</category>
    </item>
    <item>
      <title>Customer data privacy in Azure Data Factory</title>
      <dc:creator>swatiBabber</dc:creator>
      <pubDate>Wed, 18 Nov 2020 18:56:07 +0000</pubDate>
      <link>https://dev.to/swatibabber/customer-data-privacy-in-azure-data-factory-4lhc</link>
      <guid>https://dev.to/swatibabber/customer-data-privacy-in-azure-data-factory-4lhc</guid>
      <description>&lt;p&gt;ADF has proven to be a go to option for data movement solutions in Azure.&lt;br&gt;
One of the important things to keep in mind during creation of ADF is the &lt;strong&gt;location of ADF and Integration runtime&lt;/strong&gt;. The IR location can be different from ADF location.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Azure Data Factory Location&lt;/strong&gt;
When you create a data factory, you need to specify the 
location for the data factory. 
The Data Factory location is where the &lt;strong&gt;metadata&lt;/strong&gt; of the data 
factory is stored and where the triggering of the pipeline is 
initiated from. 
Metadata for the factory is only stored in the region of 
customer’s choice and will not be stored in other regions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Integration Runtime Location&lt;/strong&gt;
It defines the location of its back-end compute, and 
essentially the location where the data movement, activity 
dispatching, and SSIS package execution are performed. &lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>azure</category>
      <category>privacy</category>
      <category>dataflow</category>
      <category>datafactory</category>
    </item>
  </channel>
</rss>
