Import a Table into Azure Data Storage
-
This is part of my blog series Creating an App in Azure.
This is an optional step. If you already have data that you want to include into your new Azure Table, there are several methods of doing a bulk import. Remember that Azure Tables do not have a schema, so you could in theory take two different Excel spreadsheets and import them into Azure. For example, if spreadsheet one has five columns, spreadsheet two has five columns, and they share four of the same columns, when you import them your table will have six columns; the four shared, and the unique column from each spreadsheet. But let's assume you just have one collection of data to import.
Open your Excel file or whatever source you have for your data. Ensure that all rows are displayed and that all columns are included.
Download Azure Storage Explorer:
- Open your browser to https://azure.microsoft.com/en-us/products/storage/storage-explorer.
- Click "Download".
- Click the Download arrow and choose your Operating System.
- Download the executable and run it.
Open Azure Storage Explorer.
From the Get Started page, click "Sign in with Azure".
From the left-hand navigation, find your subscription and expand it. Expand "Storage Accounts" and click on your Storage Account. In our example, "sa-youtube".
Expand "Tables" and click on your table. In our example, "Tasks".
Note the pane says "No data to display" and there are two fields: PartitionKey and RowKey. These two fields are part of every Azure Table. Between them, each row must be unique. Take the time to analyze your data and decide what makes a unique entry. The PartitionKey is far more relevant if you have large amounts of data across several locations, like with a Data Lake. In this instance, it's not as important. You could, in our example, let PartitionKey be "Tasks" and RowKey be the title of each task. Thus, RowKey would have to be unique. That's easier to manage than RowKey being the same and each PartitionKey being unique.
In the case of this Blog you are reading, I am using an Azure Table to host it. You will see in the URL the querystring "Category=Azure&RowKey=20250912124101". The Category is my PartitionKey and the RowKey is a unique string using the date and time the entry was created.
Format your data, ensuring the PartitionKey is the first column and the RowKey is the second column. The column headers must say PartitionKey and RowKey as well. If you are going to use a column PartitionKey, simply add a new first column and set all rows to the same value. In our example, "Tasks".
The column headers for each column can only contain letters, numbers, and hyphens. No spaces.
Save your Excel file as a .csv file.
From the Ribbon, click "Import".
From the Import Entries dialog window, click "Import file".
From the Dialog Window, select your .csv file and click "Open" (or you can just double-click the file).
Note that each field is now displayed including a sample value (the first row after the column header). Ensure the Type is correct for each field, such as Boolean and Int32. String does not need to be set.
Click "Import".
Verify your data looks correct in the pane.
If you need to modify some of your data and reimport it, repeat the previous steps and check "Replace entity values in the table with imported data". All rows with matching PartitionKeys and RowKeys will be overwritten, and new rows will be added.
- Friday, September 12, 2025 2:49 PM
- Category
- Keywords
- Private
- Azure
- Development