Viewing your Data
In our code example, we wrote a query in C# to add data to our table; however, most developers are used to a tool like SQL Server Management Studio to query and view data. Having a good Windows Azure Storage tool makes it easy to ensure that your code is working correctly with the storage system and you are getting the results you are looking for. There are a variety of storage tools out there. Most of these tools provide a mechanism for querying your storage tables as well as being able to manipulate the data within the tables. For example, LINQPad is a good tool for querying Table Storage and with the Windows Azure SDK for .NET you can use the Server Explorer to query your tables directly from within Visual Studio.
In this article we’ll use Cerebrata’s Azure Management Studio to load up some additional data in our
sportingproducts
table and then view it. For just a quick sample we will upload a simple csv file. Here is a sample of the data from the file:
From within Azure Management Studio I find the table from the storage account I wish to upload the data to and right-click the table. From the context menu I can select Upload > From CSV….
Once I’ve selected my CSV file, I will be prompted for some mapping information.
Note that I’ve set the checkbox to indicate that the name of the columns, which will map to the properties, exist in the top row. I’ve also indicated that the text qualifier is a double quote. If you notice that line 6 from the sample file has a comma in the description, so I need to surround the full description in this qualifier since commas are my column delimiter. You can check out the format preview if you like to see how the mapping looks for the first few lines of the file. Click Next where you are satisfied.
On the next screen I can modify the data types for the columns that I’m importing, and also set up what values should map into the
PartitionKey
and RowKey
-Values. You can also determine if you want to replace an entity if it already exists with the data you are importing. Once you are set with these, click on ‘OK’ to perform the import. Azure Management Studio has a ‘Transfers‘ window that will show you the progress of the import.
Once the import is complete I can refresh my
sportingproducts
table view in Azure Management Studio to see the data.
If you don’t see all of your data, note that Azure Management Studio doesn’t pull back your entire table when it shows the view. It only pulls back the first 1,000 entities by default (which you can change in the settings).