Skip to content

GROUP BY and aggregations for Azure Cosmos DB SQL API client library for Python #25868

@James-Beckwith

Description

@James-Beckwith

Is your feature request related to a problem? Please describe.
I want to be able to send queries with groupings and aggregations to automatically summarize the information in my cosmos instance table for various, scriptable instances via the Azure Cosmos DB SQL API client library for Python. The field I want to group by is variable and is one of a list of items (all of which I want to group by). Doing this via the portal is possible but slow and tedious and hard to extract the results into a meaningful form. I would like to script a loop whereby I change the group by item, run the query, and store the results after some post-processing in python.

Describe the solution you'd like
I can send a query to the query_items method of a containerProxy class which includes GROUP BY and COUNT statements and the query is run against the cosmos db and results returned.

Describe alternatives you've considered
Not using cosmos db.

Additional context
This is the same as #20497 which is closed without being resolved and without any update in almost a year.

Metadata

Metadata

Labels

ClientThis issue points to a problem in the data-plane of the library.CosmosService AttentionWorkflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.feature-requestThis issue requires a new behavior in the product in order be resolved.

Type

No type

Projects

Status

No status

Relationships

None yet

Development

No branches or pull requests

Issue actions