Thursday, 11 June 2015

Azure Upload and Download Tasks

Case
Microsoft released the SSIS Feature Pack for Microsoft Azure (2012, 2014), but how do the upload and download tasks work?
Azure Blob Upload and Download Tasks


















Solution

1) Storage Account
First make sure you have an Azure account that has an storage account in it. Besides the name the location is also important. Especially for the Azure HDInsight Create Cluster Task. Mine is called SSISJoost.
Storage Account


















2) Access Keys
Click on the Manage Access Keys icon to get the primary access key. We need this for the Azure Storage Connection Manager.
Storage Account Access Keys


















3) Connection Manager for Azure Storage
If you haven't already installed the SSIS Feature Pack for Microsoft Azure then now it's time to do that. Create a new Connection Manager for Azure Storage by right clicking the Connection Managers Pane. Then choose New Connection... and then AzureStorage. Fill in the Storage account name from step 1 and the Access key from step 2. Test the connection and click OK to save the new Connection Manager.
SSIS Connection Manager for Azure Storage



















4) Azure Blob Upload Task
Then add the Azure Blob Upload Task to the surface of the Control Flow and give it a descriptive name (and description).
AzureStorageConnection: select the Connection Manager from step 3 or create a new one.
BlobContainer: specify the name of the container where you want to store the files. It creates a new container if it doesn't exist. The name should be in lower case.
BlobPath: specify an optional 'subfolder'. Use / if you don't need 'subfolders'.
FileName: specify a filename or wildcard filter to select the file(s) that needs to be uploaded.
ModifiedAfter and ModifiedBefore: specify data filters or leave them unchanged
LocalPath: specify the folder on your server/computer where the files are stored.
Azure Blob Upload Task























5) Result Upload Task
Now execute the Azure Blob Upload Task and go to azure to see the result.
Upload result
























6) Azure Blob Upload Task
Then add the Azure Blob Download Task to the surface of the Control Flow and give it a descriptive name (and description).
AzureStorageConnection: select the Connection Manager from step 3 or create a new one.
LocalPath: specify the folder on your server/computer where the files will be stored.
FileName: specify a filename or wildcard filter to select the file(s) that needs to be downloaded.
ModifiedAfter and ModifiedBefore: specify data filters or leave them unchanged
BlobContainer: specify the name of the container where the files are stored on Azure
BlobPath: specify an optional 'subfolder'. Use / if you didn't used 'subfolders'.
Azure Blob Download Task






















Tip: You can also use the Azure Blob Source and Destination to upload and download files.
Note: Unfortunately an Azure File System Task (to for example delete files) is still missing...





No comments:

Post a Comment

Please use the SSIS MSDN forum for general SSIS questions that are not about this post. I'm a regular reader of that forum and will gladly answer those questions over there.

All comments are moderated manually to prevent spam.

Related Posts Plugin for WordPress, Blogger...