Azure Table Storage

Power BI is a powerful tool that enables users to visualize and analyze data in a variety of ways. One of the key features of Power BI is its ability to connect to a wide range of data sources, including Azure Table Storage. In this article, we will explore how to use Power Query M Language code for connecting to the Azure Table Storage data source from inside Power BI.

What is Azure Table Storage?

Azure Table Storage

Azure Table Storage is a NoSQL key-value store that is part of the Azure Storage service. It is designed to store large amounts of unstructured data and provide fast access to that data. Unlike traditional relational databases, Azure Table Storage does not enforce a schema on the data, making it a flexible and scalable option for many use cases.

Connecting to Azure Table Storage from Power BI

To connect to Azure Table Storage from Power BI, we will need to use the Power Query Editor. The Power Query Editor is a powerful tool that lets you transform and shape data before importing it into Power BI.

1. Open Power BI and click on “Get Data” in the Home ribbon.

2. In the “Get Data” window, select “Azure” and then “Azure Table Storage“.

3. In the “Azure Table Storage” window, enter the connection details for your Azure Table Storage account, including the account name and account key.

4. Once you have entered your connection details, click “Connect” to establish a connection to your Azure Table Storage account.

5. You will then be prompted to select which tables you want to import into Power BI. Select the tables you want and click “Load” to import the data into Power BI.

Using Power Query M Language Code for Connecting to Azure Table Storage

While the steps outlined above are straightforward, you may find that you need to customize the data import process to meet your specific needs. This is where Power Query M Language code comes in.

Power Query M Language is a functional programming language used in Power Query. It allows you to create custom functions and scripts to transform and shape data. To use Power Query M Language code for connecting to Azure Table Storage, follow these steps:

1. Open Power BI and click on “Edit Queries” in the Home ribbon.

2. In the “Edit Queries” window, click on “New Source” and then select “Blank Query”.

3. In the formula bar, enter the following formula to create a function for connecting to Azure Table Storage:


let

ConnectToAzureTableStorage = (accountName as text, accountKey as text, tableName as text) =>

let

Source = AzureStorage.Tables(accountName, accountKey),

Table = Source{[Name=tableName]}[Data]

in

Table

in

ConnectToAzureTableStorage


4. This function takes three parameters: accountName, accountKey, and tableName. Replace each of these parameters with the appropriate values for your Azure Table Storage account and table.

5. Once you have entered your connection details, press Enter to create the function.

6. You can now use this function in any query to connect to your Azure Table Storage account and retrieve data from your table.

Conclusion

Connecting to Azure Table Storage from Power BI is a powerful way to analyze and visualize large amounts of unstructured data. By using Power Query M Language code, you can customize the data import process to meet your specific needs and create more powerful data visualizations. With the steps outlined in this article, you should now be able to connect to Azure Table Storage from inside Power BI and take full advantage of this powerful data source.

Power BI Training Courses by G Com Solutions (0800 998 9248)

Contact Us

    Subject

    Your Name (required)

    Company/Organisation

    Email (required)

    Telephone

    Training Course(s)

    Your Message

    Upload Example Document(s) (Zip multiple files)

    Similar Posts