Azure / Azure/azure-sdk-for-python
GROUP BY and aggregations for Azure Cosmos DB SQL API client library for Python
- Dominant language
- Python
- Stars
- 5.6k
- Forks
- 3.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 193
Description
**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 https://github.com/Azure/azure-sdk-for-python/issues/20497 which is closed without being resolved and without any update in almost a year.
Contributor guide
Assessment
This issue has not been assessed yet.