Reputation: 338
I am currently migrating web configs to Azure Tables. I have a selection of entities sectioned by partition key.
Instead of updating these config entities when changes needed to be made, I was wondering if it's possible to delete all entities based on their specific partition key and then adding them again based on their partition key?
I can't seem to find anything that would indicate that I can within the documentation or within other sources.
Upvotes: 1
Views: 3299
Reputation: 136306
I was wondering if it's possible to delete all entities based on their specific partition key and then adding them again based on their partition key?
If you're looking to delete all entities in a partition (i.e. having same partition key value) with a single command, it is not possible. You will need to delete each entity separately.
You can however speed up the operation by using Entity Group Transaction
where you can delete up to 100 entities in a single operation. You can also use entity group operation to create 100 entities having same partition key in a single operation.
You can learn more about the entity group transaction here: https://learn.microsoft.com/en-us/rest/api/storageservices/performing-entity-group-transactions.
Upvotes: 3