Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

azure table batch operation with different parition key

Tags:

c#

azure

I am new to Azure development (c#). I want to insert some entities to Azure table using TableBatchOperation. I am using the id of the entities as partition key. However, in a batch operation, the partition keys have to be the same. On the other hand, I do not want to perform single TableOperation in a loop as that will be a performance bottleneck. Can anyone suggest any work-around how can I save my entities as a Batch Operation which have different partition keys?

like image 377
explorer Avatar asked Oct 30 '25 15:10

explorer


1 Answers

There is no way to do this. The reason the partition key even exists is that Azure can distribute data across machines with no coordination between partitions. The system is designed such that different partitions cannot be used in the same transaction or operation.

like image 158
usr Avatar answered Nov 02 '25 07:11

usr