From the course: Full Stack Web Development with Flask

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Creating the MongoDB aggregation pipeline

Creating the MongoDB aggregation pipeline - Flask Tutorial

From the course: Full Stack Web Development with Flask

Creating the MongoDB aggregation pipeline

- [Instructor] Creating the MongoDB Aggregation Pipeline. In this video, we're going to explore the MongoDB Aggregation framework using the Compass interface. And then we're going to create aggregation pipeline to process data in three stages. The three stages we'll be lookin' at are the $loopup, $match, and $unwind. So as you can see, as it says stage pipeline here. So the first stage here is going to be a $lookup. A $lookup from the table, which is the target, which is going to be enrollment table. And then the local field that match that table in our ID is called the user_id from the user collection, right, I shouldn't say table, should be collection. And inside the enrollment also has a user_id field. And that's the one that I matched with. Okay? And then the as here, this is a string to, it's like a virtual collection. And that's the words, if you don't put it, just say, like that, but if you click on it, it will…

Contents