azure-sdk-for-net icon indicating copy to clipboard operation
azure-sdk-for-net copied to clipboard

[QUERY] OrderBy support when migrating from Microsoft.Azure.Cosmos.Table package to Azure.Data.Tables

Open ashwinmayya opened this issue 3 years ago • 4 comments
trafficstars

Library name and version

Azure.Data.Tables 12.6.1

Query/Question

We have been using Cosmos DB Table API in our .NET Core service for a while now. Recently we began looking into migrating from using the Microsoft.Azure.Cosmos.Table package to Azure.Data.Tables since the former has been deprecated. However, it appears to us that OrderBy support is not available in the newer package, even though the older package and indeed the CosmosDb Table API itself appears to support it - see here. This is a big issue for us as we are looking to add server-driven pagination support to some of our service APIs. We need our service APIs to return paginated responses containing entities in the order requested by the client.

Is there a way around this?

Environment

No response

ashwinmayya avatar Aug 09 '22 17:08 ashwinmayya

Hi @ashwinmayya. Thank you for reaching out and we regret that you're experiencing difficulties. The Cosmos Table REST API that is used by Azure.Data.Tables does not support any kind of query functionality around grouping or ordering. The legacy package made use of the Cosmos-specific binary API, which gives it access to functionality that is available only through that path.

Unfortunately, using that in Azure.Data.Tables is not something that we'll be considering, as it would create a disparity in functionality between the Storage Tables and Cosmos Tables endpoints.

jsquire avatar Aug 09 '22 17:08 jsquire

Hi @ashwinmayya. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “/unresolve” to remove the “issue-addressed” label and continue the conversation.

ghost avatar Aug 09 '22 17:08 ghost

Thanks @jsquire. Do you have any recommendations on making this scenario work with Table API? Or is it just not the right choice for this scenario?

ashwinmayya avatar Aug 09 '22 18:08 ashwinmayya

The only thought that I'd have is to either keep using the Cosmos library or move away from the Tables API on Cosmos - which would basically obviate moving to the Cosmos library.

jsquire avatar Aug 09 '22 18:08 jsquire

Hi @ashwinmayya, since you haven’t asked that we “/unresolve” the issue, we’ll close this out. If you believe further discussion is needed, please add a comment “/unresolve” to reopen the issue.

ghost avatar Aug 16 '22 22:08 ghost