Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using List<string> with Azure Table Storage

I am currently making use of the Windows Azure Table Storage Mechanism, having a class which extends TableEntity. However, one of the fields of this class is a List. When getting the entity back from the table, it is returned as a DynamicTableEntity rather than a normal Table Entity. Is there a way to obtain the list from the table rather than serializing the list and storing it on a blob?

like image 572
Alan Grixti Avatar asked Mar 20 '13 23:03

Alan Grixti


People also ask

How do I retrieve data from Azure Table storage?

Enter an Account Name, Account Key, and Table Name on the Azure Table tab of the New Session dialog. Select either HTTP or HTTPS as the connection Protocol. Ensure that the Analysis Grid viewer is selected in the Start With drop-down list. Start retrieving data by clicking the Start button in the New Session dialog.


1 Answers

As you may already know, complex data types are not natively supported by Azure Table Storage. For a list of supported data types, please see here: http://msdn.microsoft.com/en-us/library/windowsazure/dd179338.aspx.

One option is to serialize this List into a delimited string as you mentioned.

Other option is to use a 3rd party library like Lucifure Stash (http://lucifurestash.codeplex.com/). I haven't used it myself but the documentation states that you could store arrays and lists as entity in Azure Tables.

like image 121
Gaurav Mantri Avatar answered Sep 30 '22 18:09

Gaurav Mantri