How to "Load Reviews Dataset"

Hello team,

Does anyone know how to successfully load Reviews Dataset? I have been trying to with the following syntax but it does not work: 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/video?replicaSet=Cluster0-shard-0” --authenticationDatabase admin --ssl --username m001-student --password m001-mongodb-basics loadReviewsDataset.js

Any guidance would e greatly appreciated.

Thanks!

Hi!
I loaded the script file with load() method after I connected to cluster.
Like this: load("/Users/user/Downloads/loadReviewsDataset.js")

3 Likes

Hi,
Make sure the loadReviewDataset.js is located in the same folder from you are executing the mongo shell. if not then, first navigate to the directory where the dataset file is located, then execute the mongo shell by first connecting and then executing the load command through the mongoDB shell prompt.

Hope that helps

2 Likes

@Young_90491 DOes the download file have to be located in the same folder as the loadMovieDetailsDataset (M001) we created at the beginning of chapter 2? Or should it be a different folder?

It does not have to be in the same location. You just have to make sure that you either A) run the mongo shell from inside the directory where the file is, or B) provide the full file-path to the load command.

2 Likes

Just like @Tess_Sluijter said, the location doesn’t matter. But if the downloaded file is in the same location as the location mongo shell runs, it becomes easier to type the path than the case when the file is in the other location.

2 Likes