1

Microsoft suggests azure.data.tables nuget and namespace instead of older microsoft.azure.cosmos.table namespace but it is not well documented and I cannot find more information beside their Github page. Here they described basic querying but my question is; is it possible to get sorted and filtered entities from the server, not on the client side?

For example with the other library it is possible to use TableQuery and do take, orderby operations like described here

What i am trying to achieve it basically

var result= query.OrderByDescending(l => l.Timestamp).Skip((pagenumber- 1) * count.Value).Take(count.Value);

Is it possible to achieve this query on the server side using Azure.Data.Tables namespace?

2 Answers 2

1

Only thing you can use from these operators is “Take” because other two operators are not supported by Azure Table Storage.

For the list of supported LINQ operators with Azure Table Storage, please see this link: https://learn.microsoft.com/en-us/rest/api/storageservices/query-operators-supported-for-the-table-service.

Sign up to request clarification or add additional context in comments.

4 Comments

so you mean that we can only on the client side. but other library is supporting and rest api is also possible? that means technically it is implemented but maybe not with the Azure.data.tables library
Ops just saw the annotation that only works with CosmosDb endpoints :(
Yeah, that's correct. Azure Storage Tables does not support it. I am not sure if Azure Cosmos DB Table API support it either (I may be wrong though).
So, this is fine for Azure Storage, but how about if we are using Azure Cosmos DB Table API? The best practice is to use Azure.Data.Tables as the client for Cosmos, and Cosmos supports OrderBy, so why doesn't this client?
0

I am in a similar situation and I came across these articles:

The methods he describes is a hack and will take some thought as to how to apply to your situation. Thought I'd put it up here in case anyone ends up on this page.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.