aggregate
Perform database aggregation operations on MongoDB collections by executing a pipeline of stages, enabling data transformation and analysis.
Instructions
Run an aggregation against a MongoDB collection
Input Schema
Name | Required | Description | Default |
---|---|---|---|
collection | Yes | Collection name | |
database | Yes | Database name | |
pipeline | Yes | An array of aggregation stages to execute |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"collection": {
"description": "Collection name",
"type": "string"
},
"database": {
"description": "Database name",
"type": "string"
},
"pipeline": {
"description": "An array of aggregation stages to execute",
"items": {
"additionalProperties": true,
"properties": {},
"type": "object"
},
"type": "array"
}
},
"required": [
"database",
"collection",
"pipeline"
],
"type": "object"
}