I need to do something like a batch get using Azure table storage. I have a list of known RowKeys and PartitionKeys and I would like retrieve each one.
I was wondering if there was a better way than querying for each entity individually - like a batch GET.
In this answer, there is a proposed solution:
TableQuery<DynamicTableEntity> query = new TableQuery<DynamicTableEntity>()
.Where(TableQuery.CombineFilters(
TableQuery.GenerateFilterCondition("PartitionKey",
QueryComparisons.Equal, "partition1"),
TableOperators.And,
TableQuery.CombineFilters(
TableQuery.GenerateFilterCondition("RowKey", QueryComparisons.Equal, "row1"),
TableQuery.GenerateFilterCondition("RowKey", QueryComparisons.Equal, "row2"))));
But another answers mentions:
There is (or course) a URL length limitation to the query. If you exceed the length, the query will still succeed because the service can not tell that the URL was truncated. In our case, we limited the combined query length to about 2500 characters (URL encoded!)
Is there a way to tell how long a table query is? Or a solution to safetly query the table using the proposed answer?