how can i delete data from a azure table based on timestamp?
how could i delete data from a windows azure table for a particular interval of timestamp?
August 13th, 2010 12:06pm

Hi Hema,

Can you describe your problem in more detail? The way Azure table delete works is that you query your table for data and then send the request to delete that data (by providing both PartitionKey/RowKey value). So in order to delete the data, first you would need to query the data from table storage.

Generally speaking it is not recommended to query your tables on attributes other than PartitionKey and RowKey as only these two attributes are indexed. Querying on any other attribute will result in full table scan and is thus not efficient and costly operation.

In order to query by Timestamp property, if you were using REST based API here is how your query would look like (esp. the filter portion)

$filter=Timestamp ge datetime'2010-01-01T00:00:00' and Timestamp le datetime'2010-01-02T00:00:00'

Assuming you are trying to get all entities which are modified between Jan 1st 2010 & Jan 2nd 2010.

One other thing: Don't forget to URL encode the filter expression.

Hope this helps.

Thanks

Gaurav Mantri

Cerebrata Software

http://www.cerebrata.com

 

 

 

Free Windows Admin Tool Kit Click here and download it now
August 13th, 2010 1:59pm

Hi, Gaurav

I also have the problem here to query according to timestamp in nodejs. I use the azure sdk for nodejs. And I build the query like follows:

var query=new azure.TableQuery().where('Timestamp ge ?',azure.TableUtilities.entityGenerator.DateTime(new Date(Date.UTC(2014,11,11,00,00,00))));

However I still didn't get the right query. Can you help me with that? Thanks



  • Edited by Gabriel0402 Wednesday, January 28, 2015 6:38 PM
January 28th, 2015 9:36pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics