Answer of $unwind lab not matching the pipeline result

I failed in this lab and when copy pasting the answer aggregation pipeline into my mongo shell as well as in compass I get the exact same answer I got with my own pipeline and yet very different from the lab answer. For instance I got Robert de Niro and not John Wayne.
For information my movies collection has 23530 documents. Is there an issue with the collection?

Thanks

1 Like

Hi @Ricardo_Soares,

Are you sure you are using the atlas cluster provided for the course? The movies collection contains 44488 documents.

I just tested the aggregation pipeline against the movies collection and its returning the correct answer. Can you please verify that you are using the correct cluster which is supplied in the 2nd lesson of Chapter 0 in the course.

I hope this helps.

Cheers,
Giuliano

2 Likes

I have the same problem. My database seems too small. 23530 documents also.
@Ricardo_Soares , you are working on sandbox created in first course (M001).
@giulianocelani We have made our request on sample_mflix.movies instead of shared cluster.
So on the M001 Robert De Niro is the right answer.

Yes I am working on the sandbox created on course M001. Now I am wondering if during one of the exercises we deleted some records but I dont believe so.
I did the M001 basics 6 weeks ago.
I also had Robert De Niro as a result with the correct query.

Hello, I have the same problem. My database seems too small. 23530 documents also (sandbox created in first course (M001)).

Aren’t you supposed to use the aggregations database from the M121 course specific cluster?

Here is the good database to use :

mongo "mongodb://cluster0-shard-00-00-jxeqq.mongodb.net:27017,cluster0-shard-00-01-jxeqq.mongodb.net:27017,cluster0-shard-00-02-jxeqq.mongodb.net:27017/aggregations?replicaSet=Cluster0-shard-0" --authenticationDatabase admin --ssl -u m121 -p aggregations --norc

It will be cool if it will possible to use it in Atlas instead of cmommand line.

This is an Atlas cluster. Nothing stops you from using Compass.

Thanks for that, i am not sure where I failed/missed to get this DB while doing the course. Very useful!!