29 Nov How to Connect to Azure Blob from Alteryx
Azure blob storage is a Microsoft Azure feature that allows users to store a large amount of unstructured data. Azure blob storage can be used as a Delta Lake where you keep all the data that belongs to your organization. Blob is an acronym and it stands for Binary Large Object which includes images and multimedia files. In this article, I will show you how to connect to Azure Blob storage from Alteryx.
Firstly, let’s connect with the files in the Azure container from Alteryx designer but before we can do that, we need to generate a Shared Access Signature (SAS) code for each file we would like to connect to. We are going to use wix.csv data as sample data.
We are going to follow these steps below;
- Go to https://portal.azure.com and search for Azure Storage. Create a container (I named it alteryxtestcsvfiles) on the Blob section. Click on the three ellipses to the right of the window.
2. Click on Generate SAS
3. Adjust the expiry date to a future date
4. Click on Generate SAS token and URL
Successfully followed the four steps? Good job!
Now use the SAS Code you generated to connect to the data from Alteryx download tool.
With the SAS Code, we can now communicate with the resources privately. . .
The SAS code is split into two parts, we have Field1 and Field2.
Field1 = https://samplestorageyoucreated.blob.core.windows.net/alteryxtestcsvfiles/yourdata.csv
The view below shows the complete Alteryx workflow to get our CSV data, transform the data and use the browse tool to show the CSV data.
The Azure Blob Storage URL and the query string serve as the input to the workflow. Use the input tool as shown in the screenshot below.
Now we will concentrate on the Alteryx download tool, the configuration interface. I brought the Alteryx Download tool into the workflow. Take a look at the configuration window for the basic settings of the Download tool.
The Headers window has Accept: text/plain, and also has the field1 selected as the field to take care of the response body.
The screenshot below shows using the Payload Configuration tab to get and use the query string for authentication.
The Text to Columns tools (the first and the Second) help to get the text data into their table equivalence.
Use the Select Tool to pick the Fields needed for the Dataframe by deselecting unwanted fields in the configuration window.
I use the Dynamic Renaming tool to pick up the field name of a dataset from the first row of the data.
We have successfully connected to the CSV data in Azure Blob with Alteryx with the above steps. If you enjoyed this article, share it with your friends and colleagues!
No Comments