In today’s blog, we’ll walk you through the steps necessary to upload a file to Azure Blob from SSIS. Enjoy!
To download the Azure Feature Pack, click here.
3. Once downloaded, the Azure tab under SSIS Toolbox will appear in the UI:
4. Drag and drop Azure Blob Upload Task in the control flow. Note that because it is not yet configured, SSIS will display a red cross mark, indicating error. Hovering over the error displays this: ‘Azure Storage Connection Manager is not valid.’
5. Open the Azure Blob Upload Task in the control flow reveals a few fields that need to be populated to connect to Azure.
Let’s go through each of the five sections:
1 Basic – Here you can change the Name and Description as needed.
2 Connection – Clicking here reveals AzureStorageConnection. Click on it to bring up the Azure Storage Connection Manager Editor popup box.
As shown, a Storage account name and Account key are both necessary. To create these, go to the Azure portal and click Storage accounts > Add.
A popup box is revealed. Provide a name for the storage account and modify any other fields, as necessary.
Once the storage account is created, select it in the portal menu. Under SETTINGS, click on Access Keys to find the key to connect to your storage account.
Back in the Azure Storage Connection Manager Editor, provide the information. When the correct information is provided, a Test cnnection will succeed.
3 Destination – Here you can do the following:
- Give the name of the container (BlobContainer) you want to create in your storage account.
- Provide a name for the BlobDirectory. Note that if you named the container, naming the directory is optional. If you do choose to name both, Azure will create the following path: BlobDirectory/BlobContainer/Blob. So, if you don’t want one extra folder (BlobDirectory), skip BlobDirectory and only provide BlobContainer name.
4 Source – Allows you to provide the path of the file you want to upload.
5 Source Filter – Allows you to provide the name of your file, as well as time ranges (optional).
- Note: Not specifying a file means that every file from the LocalDirectory will be uploaded.
- Note: You can either hard code your values for BlobContainer, FileName, and LocalDirectory or you can set an expression to populate it dynamically. You can use user variables or parameters to set the expression.
6. After everything is set correctly, run the SSIS: the job should complete successfully.
7. Navigate again to the Azure Portal and click on Storage Account. Select your container and then click Blob Service > Blobs to see your container. Click on it to see the files uploaded:
Hopefully this guide has been helpful. Be sure to subscribe to our blog for more Dynamics 365 tips and tricks!