From the course: MongoDB Aggregation Pipeline: Advanced Data Analysis and Manipulation

Unlock the full course today

Join today to access over 24,500 courses taught by industry experts.

Aggregation pipeline vs. map-reduce

Aggregation pipeline vs. map-reduce

- [Instructor] Prior to the introduction of the MongoDB Aggregation Framework, MongoDB offered Map-Reduce as a way to condense data into aggregated results. To accomplish this, developers would utilize the Map-Reduce method on a collection, and would write JavaScript functions to process, filter, and transform data into a desired format. The Map-Reduce programming model isn't exclusive to MongoDB. Many data processing software offer it as it can be a very powerful way to manipulate big data. For MongoDB, in the map function, we are filtering or selecting the data to work with, while the reduce function transforms the data into our desired outcome. Map-Reduce was a precursor to the Aggregation Framework, and anything you could have done with Map-Reduce, such as grouping or merging data, you can now replicate with the Aggregation Framework and its various operators. With the dollar sign function and dollar sign…

Contents