Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enabling Mongo DB Aggregation Pipelines in Cosmos DB via Code

It's really neat that Azure Cosmos DB now also supports Aggregation Pipelines, and this makes it a viable replacement for us to use instead of running our own Mongo DB Containers, but I have failed to find a way to enable the features via code (how to do it in the Portal is described here: https://azure.microsoft.com/en-gb/blog/azure-cosmosdb-extends-support-for-mongodb-aggregation-pipeline-unique-indexes-and-more/).

We need this for the integration and testing environments which we create via deployment pipelines from scratch every day, and the backing Cosmos DB instances must support Aggregation pipelines.

I have checked the API documentation at https://learn.microsoft.com/en-us/rest/api/documentdb/, and also the az cosmosdb command line tool, but I can't find the right setting to pass in.

Has this just not yet surfaced, or am I missing something?

like image 971
donmartin Avatar asked Oct 31 '25 20:10

donmartin


1 Answers

You can track the change with the following pull request: https://github.com/Azure/azure-cli/pull/5451#pullrequestreview-94854631

The following command will allow you to enable aggregation pipeline.

az cosmosdb update -n {acc} -g {rg} --capabilities EnableAggregationPipeline
like image 146
dmakwana Avatar answered Nov 03 '25 11:11

dmakwana