<?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>Transformation of Data from Azure Storage to DocumentDB Using Azure Data Factory Custom Activity</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/data-factory-custom-activity-storage-transform-documentdb/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/data-factory-custom-activity-storage-transform-documentdb/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:47:26 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title />
      <link>https://docs.microsoft.com/archive/blogs/data-factory-custom-activity-storage-transform-documentdb/55</link>
      <pubDate>Wed, 29 Jun 2016 15:03:51 GMT</pubDate>
      <dc:creator><![CDATA[Raveena Dayani]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/data-factory-custom-activity-storage-transform-documentdb/?p=55</guid>
      <description><![CDATA[Make sure the projects are of .NET framework 4.5.2

To write a test client which completely mimics...]]></description>
      <content:encoded><![CDATA[Make sure the projects are of .NET framework 4.5.2

To write a test client which completely mimics the ADF, write a console application with the code as shared.
<ol>
	<li>Following nugets need to be installed first:</li>
</ol>
<ul>
	<li>Azure.Management.DataFactories – provides ADF management capabilities</li>
	<li>Moq – a mocking framework for .NET</li>
</ul>
&nbsp;
<ol start="2">
	<li>Make linked services for azure table storage, batch and azure documentDB:</li>
</ol>
<ul>
	<li>Azure Storage Linked Service connection string (Input):
<ul>
	<li>Account Name - schoolrecordsstorage</li>
	<li>Account Key – can be found on the portal</li>
	<li>Default Endpoint Protocol – https</li>
</ul>
</li>
</ul>
&nbsp;
<ul>
	<li>Azure Batch Linked Service (Batch):
<ul>
	<li>Account Name – schoolrecordsbatch</li>
	<li>Batch URI - <a href="https://northeurope.batch.azure.com">https://northeurope.batch.azure.com</a></li>
	<li>Access Key - can be found on the portal</li>
	<li>Pool Name – streamspool</li>
	<li>Linked Service Name – Azure Storage Linked Service’s name</li>
</ul>
</li>
</ul>
&nbsp;
<ul>
	<li>Azure documentDB linked service connection string (Output):
<ul>
	<li>Account Endpoint - <a href="https://proficiencydocdbintschoolrecordsdocdb.documents.azure.com:443/">https://documents.azure.com:443/</a></li>
	<li>Account Key – can be found on the portal</li>
</ul>
</li>
</ul>
&nbsp;
<ol start="3">
	<li>Create list of all the linked services being used by ADF</li>
</ol>
&nbsp;
<ol start="4">
	<li>Make datasets for azure table storage and documentDB</li>
</ol>
&nbsp;
<ul>
	<li>Azure Storage Dataset definition (Input):</li>
	<li>Structure - List&lt;DataElement&gt;() where new DataElement are EnglishScore, MathScore, ChemistryScore, PhysicsScore, ComputerScore, AccountsScore, BusinessStdScore, EconomicsScore</li>
	<li>Linked Service Name – associated storage linked service</li>
	<li>Type Properties – SubjectsScoreStorage is the table name</li>
	<li>External – true (when data in storage is not coming from some other pipeline but coming from external source)</li>
	<li>Availability – 1 Hourly</li>
	<li>Policy – Specify the retry interval and timeout and maximum no. of retries</li>
</ul>
&nbsp;
<ul>
	<li>Azure Blob Dataset definition (Input):
<ul>
	<li>Linked Service Name – associated storage linked service</li>
	<li>Type Properties - FolderPath = "binariescontainer"</li>
	<li>External – true</li>
	<li>Availability – 1 Hourly</li>
</ul>
</li>
</ul>
&nbsp;
<ul>
	<li>Azure DocumentDB Dataset definition (Output):
<ul>
	<li>Linked Service Name – associated documentDB linked service</li>
	<li>Type Properties – <span style="text-decoration: line-through">TestAssetsR</span> StudentCollection is the collection name</li>
	<li>Availability – 1 Hourly</li>
</ul>
</li>
</ul>
&nbsp;
<ol start="5">
	<li>Create list of all the datasets being used by ADF</li>
</ol>
&nbsp;
<ol start="6">
	<li>Create an activity within the pipeline:</li>
</ol>
&nbsp;
<ul>
	<li>Assign Storage and Azure Batch as inputs to it</li>
	<li>Assign DocumentDB as output to it</li>
	<li>Type Properties – Give the following details in here:
<ul>
	<li>Assembly Name: <span style="text-decoration: line-through">dll</span> StudentGradingAdfActivity.dll</li>
	<li>Entry Point:TransformActivity (i.e., namespace.className of entry class)</li>
	<li>Package Linked Service: Azure Storage Linked Service Name</li>
	<li>Package File: binariescontainer/ StudentGradingAdfActivity.zip (i.e., a zip containing only .dll and .pdb files which has the custom activity dll as well)</li>
	<li>Extended Properties: Containing all the configurable properties, namely, sliceStart, sliceEnd, dataStorageAccountName, docDbEndpointUrl, sinkDbName, dataStorageContainer, azureStorageDatasetName, docDbDatasetName, docDbLinkedServiceName, azureStorageLinkedServiceName, blobDllStorageDatasetName, queueName, storedProcedureName, queueWrapperWriteSize, docsWriteBatchSize, (dataStorageAccountKey, docDbAuthKey, appInsightsInstrumentationKey)</li>
	<li>Policy: Define the policy to follow for pipeline scheduling, namely, order of execution, retry count and timeout.</li>
	<li>Scheduler: 1 Hourly</li>
</ul>
</li>
</ul>
&nbsp;
<ol start="7">
	<li>Create a mock for the IActivityLogger. This will be needed in the next step</li>
</ol>
&nbsp;
<ol start="8">
	<li>Call Execute(IEnumerable&lt;LinkedService&gt;, IEnumerable&lt;Dataset&gt;, Activity, IActivityLogger). Pass mock logger to it as logging is not needed while running the adf test client</li>
</ol>
&nbsp;]]></content:encoded>
    </item>
  </channel>
</rss>