$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: !

Cheers,
Maxime.

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

image
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://.

image
i got another error

Try with the modern version which is:

mongodb+srv://m121:aggregations@cluster0-jxeqq.mongodb.net/aggregations
1 Like

it worked, thanks…appreciate the assistance

2 Likes

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,
MongoDB