GithubHelp home page GithubHelp logo

isabella232 / data-factory-copy-blob-to-blob Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azure-samples/data-factory-copy-blob-to-blob

0.0 0.0 0.0 14 KB

This C# sample shows how to copy data from a location to another location in an Azure Blob Storage.

License: MIT License

C# 100.00%

data-factory-copy-blob-to-blob's Introduction

services platforms author
data-factory
dotnet
spelluru

Sample: copy data one folder to another folder in an Azure Blob Storage

In this sample you do the following steps by using .NET SDK:

  1. Create a data factory.
  2. Create a linked service to link your Azure Storage account to the data factory.
  3. Create a dataset that represents input/output data used by the copy activity.
  4. Create a pipeline with a copy activity that copies data.

Prerequisites

  • Azure subscription. If you don't have a subscription, you can create a free trial account.
  • Azure Storage account. You use the blob storage as source and sink data store. If you don't have an Azure storage account, see the Create a storage account article for steps to create one.
  • Create a blob container in Blob Storage, create an input folder in the container, and upload some files to the folder.
  • Visual Studio 2015 Update 3, or 2017. The walkthrough in this article uses Visual Studio 2017.
  • Download and install Azure .NET SDK.
  • Create an application in Azure Active Directory following this instruction. Make note of the following values that you use in later steps: application ID, authentication key, and tenant ID. Assign application to "Contributor" role by following instructions in the same article.

Build and run the sample

  1. Click Tools -> NuGet Package Manager -> Package Manager Console.

  2. In the Package Manager Console, run the following commands to install packages:

    Install-Package Microsoft.Azure.Management.DataFactory
    Install-Package Microsoft.Azure.Management.ResourceManager
    Install-Package Microsoft.IdentityModel.Clients.ActiveDirectory
    
  3. Set values for variables in the Program.cs file:

    string tenantID = "<tenant ID>";
    string applicationId = "<application ID>";
    string authenticationKey = "<application key>";
    string subscriptionId = "<subscription ID>";
    string resourceGroup = "<resource group name>";
    string region = "East US";
    string dataFactoryName = "<data factory name>";
    string storageAccount = "<azure storage account name>";
    string storageKey = "<azure storage account key>";
    string inputBlobPath = "<blobcontainer/inputfolder>";
    string outputBlobPath = "<blobcontainer/outputfolder>"; 
  4. Add some text files to the input folder in the Azure Blob Storage.

  5. Build the project and run the program.

  6. Verify that the files are copied to the destination location in the Blob Storage.

See Also

For step-by-steps instructions to create this sample from scratch, see Quickstart: create a data factory and pipeline using .NET SDK.

data-factory-copy-blob-to-blob's People

Contributors

microsoftopensource avatar msftgits avatar spelluru avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.