MongoDB Aggregation with Node.js
Learn how to create aggregation pipelines with Node.js.
MongoDB Aggregation with Node.js
Unit Overview
In this unit, you will learn how to perform basic aggregation with Node.js. First, you will learn what aggregation is, followed by the stages and operators that can be used in an aggregation pipeline. Then, you'll learn how to use the $match and $group stages of an aggregation pipeline. Finally, you'll learn how to use the $sort and $project stages of an aggregation pipeline.
Prerequisites
Lessons in This Unit
- Lesson 01: Building a MongoDB Aggregation Pipeline in Node.js Applications
- Lesson 02: Using MongoDB Aggregation Stages with Node.js:
$matchand$group - Lesson 03: Using MongoDB Aggregation Stages with Node.js:
$sortand$project
-
01.
-
02.Lesson 2: Using MongoDB Aggregation Stages with Node.js: $match and $group
- Learn
- Practice
-
03.Lesson 3: Using MongoDB Aggregation Stages with Node.js: $sort and $project
- Learn
- Practice
-
04.Conclusion
- Learn
John McCambridge I University Curriculum Engineer
John is a Curriculum Engineer on the University team at MongoDB. Before his work as a Curriculum Engineer, he was an instructor and teaching assistant for coding boot camps at UT (Austin), and UCLA. Additionally, he worked as a QA engineer for a startup called Coder and spent five years at Apple Inc. John is a passionate software engineer and educator who enjoys taking complex topics and making them digestible for the community.
Emily Pope | Senior Curriculum Designer
Emily is a Senior Curriculum Designer at MongoDB. Prior to MongoDB, Emily worked closely with professors at MIT and Columbia to design bootcamps in full stack development and data science at Emeritus. She also worked as an instructional designer on database and computer science learning experiences at Cengage. Emily loves learning about the everchanging tech space and is passionate about making these skills accessible to a global audience.
Hi there and welcome! In this unit, you will learn how to perform basic aggregation with Node.js.
I’m John. I’m a Curriculum Engineer here at MongoDB, and I’ll be working with you through this unit.
You will learn how to create an aggregation pipeline by using the MongoDB Node.js driver. With the aggregation framework, you can transform and analyze your data.
The lessons in this unit consist of video lectures followed by quiz questions or labs so that you can practice what you learned.
First, we will give you an overview of aggregation and a pipeline’s stages.
Then, we’ll explore the $match and $group stages of an aggregation pipeline.
Before you begin this unit, you should have a basic understanding of: Node.js, The MongoDB database and document model, and Atlas.
You will also need to set up an Atlas account with a free tier cluster.
By the end of this unit, you will be able to define aggregation and the pipeline stages, and build an aggregation pipeline by using the $match, $group, $sort, and $project stages.
Let’s get started!
