So what is the aggregation framework? The aggregation framework in its core is just an alternative to
the find method you could say. You have your collection and now the aggregation framework is all about
building a pipeline of steps that runs on the data that is retrieved from your collection and then gives
you the output in the form you needed
and these steps are sometimes related to what you know from find, match
for example here is the equivalent to filtering in the find method, it allows to filter down your results
and you get a lot of different steps you can combine as you want.
You can reuse certain stages,
for example you could match again later too to filter your already transformed data a bit more and therefore
you have a very powerful way of modeling your data transformation.
Every stage here in this pipeline receives the output of the previous stage and therefore, you can have
a very structured way of having some input data and then slowly modifying it in the way you need it
in the end.
Now in this module, we'll have a look at a lot of stages of the aggregation pipeline and that is just
what this aggregation framework gives you, this pipeline you will build. Now we'll build this pipeline
together, no worries I'll show you in detail how it works
and as you can see in the official docs, there are loads of different stages you can have,
so these are basically all stages you can combine in the pipeline.
Now I'll dive into a lot of them in this module but it's impossible to cover all of them,
so I strongly encourage you to also go ahead and dive into these docs on your own and play around with
these steps, take some dummy data and simply see how you can transform it,
this is the best way of then learning more about the aggregation framework.
But of course, let's now first get started and let's understand how exactly the aggregation pipeline
works.