Accumulator $push not implemented yet. In Cosmos MongoDB

Duy Nguyen (Engineering - Backend) 20 Reputation points
2024-03-29T08:07:18.46+00:00

I am using Aggregation in AzureCosmosDB, my collection have many messages and I want to group it by user_id. This is my pipeline:

{"$group": {"_id": "$user_id", "messages": {"$push": "$$ROOT"}}}

But when I ran aggregate, I found an error :

Accumulator $push not implemented yet

I have found the document supported $push accumulator here https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/feature-support-42#accumulator-expressions

So do I use it wrong or I need to call it in another way to use this feature ?

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,435 questions
{count} votes

Accepted answer
  1. Sajeetharan 1,566 Reputation points Microsoft Employee
    2024-04-01T08:46:22.14+00:00

    From the screenshot you've shared, you're trying out Cosmos DB for MongoDB vCore, $push aggregation operator in $group stage is not supported with vCore yet. The above documentation is for Cosmos DB for MongoDB RU


0 additional answers

Sort by: Most helpful