aggregate-db
Run an aggregation pipeline on a MongoDB database, processing documents through stages like $changeStream or $currentOp.
Instructions
Run an aggregation against a MongoDB database
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database | Yes | Database name | |
| pipeline | Yes | An array of aggregation stages to execute. The first stage must be a database-level aggregation stage (one of `$changeStream`, `$currentOp`, `$documents`, `$listLocalSessions`, `$queryStats`). https://www.mongodb.com/docs/manual/reference/mql/aggregation-stages/#db.aggregate---stages | |
| responseBytesLimit | No | The maximum number of bytes to return in the response. This value is capped by the server's configured maxBytesPerQuery and cannot be exceeded. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| documents | Yes | The documents returned by the aggregation pipeline | |
| appliedLimits | Yes | The limits applied to the aggregation pipeline | |
| aggResultsCount | No | The total number of documents returned by the aggregation pipeline |