Chapter 1: Basic Aggregation - $match and $project - Lab1

Hi,

Sorry, I really don’t understand how to even get the lab started. I see I am supposed to create a variable named “pipeline”… where do I do that? what saves that variable? ( I understand that I am supposed to fill the match … with my code that performs the match)

What I am not understanding is what / where / how to edit/save that code.

Help .

The mongo shell is a JS interpreter. You are meant to declare you variable pipline in the shell, and then run the validation script.
I would use my favourite text editor to write out the code for defining pipeline then copy and paste that into the mongo shell. Rather than trying to declare it straight in the shell, but that is just a preference and not a requirement.

Hi @Michael_Tantos,

We recommend our users to do the same. It is easier to create complex pipelines in your preferred text editor. You can also use MongoDB Compass or MongoDB Atlas to create Aggregation pipelines.

Hi @Michael_Liss,

Please feel free to reach out if you need any assistance in the set up.

Thanks,
Sonali