$project lab, getting error "A pipeline stage specification object must contain exactly one field."

Hi @Ramone_Granston,

I think you are missing a { before the $project.

I suggest you use the Aggregation Pipeline Builder in MongoDB Compass to avoid all this mess :wink: !


How do i connect to the database with compass, the connection string I used in the command line isn’t working

Could you provide just a bit more information about how it isn’t working?

wheni run the commands from the lab I don’t get a figure I get the error in the pic above

that the error message i get

The word mongosh and the double quotes is not part of the connection string.

The connection string is what it is inside the double quotes that starts with mongodb://.

i got another error

Try with the modern version which is:

1 Like

it worked, thanks…appreciate the assistance


How do i load the validatelab 2 file in compass

Hi @Ramone_Granston, the steps to load are mentioned in the Lectures and Labs themselves.

In case you have any doubts, please feel free to reach out to us.

Thanks and Regards.
Sourabh Bagrecha,