-
Notifications
You must be signed in to change notification settings - Fork 463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: CosmosDB State Store Query to support partitioned queries #3244
Comments
We use cross-partition queries in our Query API implementation. This is expected behavior. Also note that Query API is Alpha and will not be made stable. Why are we using cross-partition queries? Because the default value assigned to Dapr's Query API is not a replacement for a CosmosDB SDK to query entities. I also strongly discourage use of the Dapr Query API. |
One possibility we could consider: If the partition key is provided as metadata on the query request, we could perform a regular partitioned query. This however would be a feature request. If so, can you please update your issue title and description @DSpirit to turn this into a feature request? |
I think @luigirende would be interested in implementing this. |
@berndverst thank you for the update! As we currently use the CosmosDB SDK anyway, it would just be a nice-to-have - so feel free to add it if you have the time :) |
@luigirende wow that was quick! Many thanks :) Looking forward to it! |
Describe the feature
When saving data through the DaprClient using the partitionKey metadata, everything is stored fine and is partitioned correctly.When querying data using the DaprClient with a partitionKey metadata Dictionary, It would be great if only the records having the specified partitionKey are returned.
Here's an example setup (and also some screenshots): https://github.com/DSpirit/dapr-cosmosdb-partitioning
Maintainer Edit:
This is not a bug but intended behavior. The description above needs updating so it is clear that this is a feature enhancement request to add support for partitioned queries. Today the CosmosDB State Store Query API implementation intentionally performs cross-partition queries exclusively.
Release Note
RELEASE NOTE: ADD Support for partition queries in CosmosDB StateStore
The text was updated successfully, but these errors were encountered: