What is the correct instance of the mflix database/collection for this "Aggregation" course?

It appears my instance of mflix collection has different data and is producing different results than the assignment answers suggest. Is there are specific hostname, database and collection name to be using for this course?


‘mflix’ is not part of this course; it was used in another course. Use the supplied connection string and you will have the correct database.

Thanks, but I can not find where these details are provided. The first assignment states to use the validate.js in Mongo Shell, but not what shell connection details to connect to;

Chapter 1: Basic Aggregation - $match and $project

Lab - $match

Help MongoDB pick a movie our next movie night! Based on employee polling, we’ve decided that potential movies must meet the following criteria.

imdb.rating is at least 7
genres does not contain “Crime” or “Horror”
rated is either “PG” or “G”
languages contains “English” and “Japanese”
Assign the aggregation to a variable named pipeline, like:

var pipeline = [ { $match: { … } } ]
As a hint, your aggregation should return 23 documents. You can verify this by typing db.movies.aggregate(pipeline).itcount()
Load validateLab1.js into mongo shell
And run the validateLab1 validation method
What is the answer?


That is provided in Chapter 0, in the Lecture Notes for “Atlas Requirement” which is actually the first requirement that you need for the course.

OK, thank you! Found it.

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

Perhaps worth reiterating when the page for the labs show up. I watched the lecture and clicked through to the next page without scrolling down to the lecture notes.


Glad you found it. FWIW, note that the Lecture Notes are an essential part of the course materials, as they can be updated easily and regularly, while the video lectures are more difficult to update – so you want to be sure to check out any Lecture Notes to ensure you get the best and latest information. Good luck.

I am confused. I used the above connection string and then issued “use aggregations”. If I list movies that have an award, the awards string is of the form “1 win” or “3 wins” which is not the same as is suggested inthe lab, i.e. “Won 13 Oscars”. Am I using the wrong movies collection?