mongodb-aggregation
Service icon

MongoDB Aggregation

Stable version 1.0.1 (Compatible with OutSystems 11)
Uploaded
 on 02 October 2023
 by 
5.0
 (2 ratings)
mongodb-aggregation

MongoDB Aggregation

Details
Aggregation is a way of processing a large number of documents in a collection by means of passing them through different stages. The stages make up what is known as a pipeline. The stages in a pipeline can filter, sort, group, reshape and modify documents that pass through the pipeline.
Read more

What is Aggregation in MongoDB?

Aggregation is a way of processing a large number of documents in a collection by means of passing them through different stages. The stages make up what is known as a pipeline. The stages in a pipeline can filter, sort, group, reshape and modify documents that pass through the pipeline.

One of the most common use cases of Aggregation is to calculate aggregate values for groups of documents. This is similar to the basic aggregation available in SQL with the GROUP BY clause and COUNT, SUM and AVG functions. MongoDB Aggregation goes further though and can also perform relational-like joins, reshape documents, create new and update existing collections, and so on.

While there are other methods of obtaining aggregate data in MongoDB, the aggregation framework is the recommended approach for most work.

There are what are called single purpose methods like estimatedDocumentCount(), count(), and distinct() which are appended to a find() query making them quick to use but limited in scope.



How does the MongoDB aggregation pipeline work?


Here is a diagram to illustrate a typical MongoDB aggregation pipeline.

 


Source: https://studio3t.com/knowledge-base/articles/mongodb-aggregation-framework/

Release notes (1.0.1)

Update demo application to without login

License (1.0.1)
Reviews (2)
by 
2024-03-25
in version 1.0.1
It was a nice help to the project
by 
2023-10-20
in version 1.0.1
It's Amazing!
Team
Other assets in this category