Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to set retention period for azure storage tables?

I have a azure table used for metric data collection and I want to set some retention period for eg: if retention period is 7 then table should have last 7 day data in it.

Is there any option available.

like image 362
Skull Avatar asked Feb 13 '17 10:02

Skull


1 Answers

I have a azure table used for metric data collection and I want to set some retention period for eg: if retention period is 7 then table should have last 7 day data in it.

Is there any option available.

As of today, No such thing is available for Azure Tables (or for Blobs and Files). You would need to roll something out of your own. One possible solution would be to write a background job (either as WebJob or Azure Function) that runs periodically and finds the entities that have been created before "x" days (7 in your example) and delete those entities.

like image 191
Gaurav Mantri Avatar answered Nov 02 '22 23:11

Gaurav Mantri