Saturday, February 3, 2018

How to Upload Data Files to Azure Blob Storage?

Problem: You have text files in csv or AVRO formats and you would like to upload them to Blob storage as intermediate steps of big data processing in Azure. How to upload them to Azure Blob storage?

Solution: 

Use "Azure Blob Upload Task" or  "Azure Blob Destination" in Data Flow Task in Integration Service in SQL Server (SSIS).

Before we open new Integration Service project in Visual Studio 2015, you need to do preparations to get our environments setup:
  1. Sign up Azure account.
  2. Install Azure feature pack for SQL Server and ensure that Azure tools appear in Visual Studio. If Azure tools are grey out, please refer to the article to resolve issues.
  3. Install Microsoft Azure Storage Explorer and create a storage account.


     After you create a storage account, you should see four types of storage appearing under your storage account at Azure Storage Explorer:


        Then you can create a Blob container to contain the file to be uploaded. You can easily do it by using Microsoft Azure Storage Explore shown below. Here the Blob Container called "ssisdemoblob" is created and under this a Blob Directory "data" is also created. The summary of naming rules for Azure can be referred as this article.

Now you can go ahead to open visual studio and create a new SSIS project. 

Step 1: Create Azure Storage Connection.

            - Choose "AzureStorage" as Connection manager type. 
            - For Account Key in "Azure Storage Connection" editor, copy "Access Key" in your Azure account. 
            - Click "Test Connection" to make sure it connects successfully to your Azure account.

Below shows how to get access key for your storage account from Azure Portal.


Note that you can create Azure Storage Connection under project level connections as shown below so every package under this project can share the same Azure Storage connection.


Step 2: Configure the Azure Blob Upload Task in SSIS as shown below:




To make this upload more dynamic, here we use variable @[User::srcFolder] for local directory. You can use expression for other properties such as BlobContainer, BlobDirectory, Disable.


Moreover, you can use wildcard for FileName as in other SSIS solutions.

After executing this task, you can see the related file appears under the Blob Directory specified. Now you have your first file uploaded to Azure Blob Storage!


Note that you can also use "Azure Blob Destination" in Data Flow Task to achieve this.
Azure Blob Upload Task can be easily used to upload one more files to azure Blob storage by using wildcards for FileName. While for "Azure Blob Destination" in Data Flow Task, you have to use Foreach Loop Container together with Azure Blob Destination to load multiple files to Blob Storage.







Monday, January 1, 2018

Why "Azure" related tools are grey out in SSIS after installation of Azure feature pack?

Problem: After installation of Azure feature pack for SSIS, Azure related toolboxes are still grey out?

Solution: 

If Azure related toolboxes are grey out in SSIS, that means that the version of SQL server is different from the version of Azure feature pack. You need to change the TargetServerVersion in visual studio to the same version of Azure feature pack you installed.

For example, if you download and install Microsoft SQL Server 2016 Integration Services Feature Pack for Azure for SQL Server 2016, you need to set TargetServerVersion in visual studio to be SQL Server 2016 as shown below:

Now your project version will show: SQL Server 2016 and Azure related tools will show up in your SSIS toolbox!

Saturday, November 4, 2017

Why PowerPivot add-in is missing from some Office 365 plan?

When you follow the steps in my previous post "How to: Enable PowerPivot Add-ins for Excel 2013" to add PowerPivot in excel with Office 365, you may not be able to find PowerPivot in available COM add-ins.

You may wonder whether you missed any steps? That may not be the case. From "Feature availability across Office 365 plans", you will know PowerPivot feature is only available for the following Office 365 Plans (as of 11/2017):
  • Office Professional Plus 2013         
  • Office Professional Plus 2016
  • Office 365 ProPlus                     
  • Office 365 Business
  • Office 365 Business Premium
  • Office 365 Enterprise E3
So go ahead to check your Office 365 Plan first. If it is not available, the alternative is to use Power BI Desktop, the tool for desktop data analytics. Good luck!