Querying Azure Table Storage

Here is how to generically query Azure Table Storage without having to define the entity that is in the table (which you may not know and can vary).

CloudStorageAccount storageAccount = CloudStorageAccount.Parse(diagnostics);
CloudTableClient tableClient = storageAccount.CreateCloudTableClient();
CloudTable cloudTable = tableClient.GetTableReference(“WADLogsTable”);
TableQuery query = new TableQuery();

query.FilterString = filter;
var items = cloudTable.ExecuteQuery(query).ToList();

See my previous post for how to set the filters.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s