Loading Data into Sandbox Cluster

I am getting error when i am trying to load data into sandbo cluster.I am not able to change my directory from M001 to loadMovieDetailsDataset.The command prompt shows me an error saying that the system cannot find the path specified.I have already created a folder named M001 and extracted the .rar file in it in my home directory.What should i do?

You should be able to cd to the directory and see the file
After creating the folder unzip the file

Directory of C:\Users\ramrt\M001

01/10/2019 04:35 PM .
01/10/2019 04:35 PM …
01/10/2019 04:33 PM 757 insertMany-ordered.js
01/10/2019 04:34 PM 740 insertMany-unordered.js
01/10/2019 01:56 PM loadMovieDetailsDataset
01/10/2019 01:51 PM 1,381,816 loadMovieDetailsDataset.zip
3 File(s) 1,383,313 bytes
3 Dir(s) 177,355,497,472 bytes free

C:\Users\ramrt\M001>cd loadMovieDetailsDataset

Volume in drive C is OS
Volume Serial Number is FCFB-3D6A

Directory of C:\Users\ramrt\M001\loadMovieDetailsDataset

01/10/2019 01:56 PM .
01/10/2019 01:56 PM …
01/10/2019 01:56 PM 1,381,666 loadMovieDetailsDataset.js
1 File(s) 1,381,666 bytes
2 Dir(s) 177,355,485,184 bytes free


This is what i am getting

Why you are cd to a file?
I see the file already exists under M001
Did you unzip it in a different location and copied it?

1.dnload the zip file
2.copy the zip file to M001 dir
3.unzip zip file
Once you unzip it creates a dir by name loadMovieDetailsDataset
In this dir you will find the .js file which you will be using to load
Hope it is clear

Hi @Saurabh_54405, you are already in the directory where js file is located. So, you don’t need to do any more cd.

From M001 directory, run mongo command and continue loading the script using:

 C:\..\M001> mongo ....
 > load("loadMovieDetailsDataset.js") 


1 Like

@Kanika Thank you for the help.My issue is resolved now.

I’m having the same problem on Mac.
I have created M001 (in my Home Directory) containing LoadMovieDetailsDataset.js
When I attempt to connect to Mongo, I get "Mongo command not found, which makes me think my .bash_profile is not setup correctly.

export PATH

Not sure if it is or not.

I believe you’ve defined not complete path to mongo: “mongodb-osx-x86_64-4.0.5/bin”. Try defining it from your home directory e.g. ~/folder1/folder2/folder3/mongodb-osx-x86_64-4.0.5/bin

That’s it. Thanks a bunch.

Hi, I’m having trouble loading movies dataset using js file .


Does the .js file exist?
Please check your path

Hi @Ramachandra_37567, yes the file exists. I get this error “user is not allowed to do action [getLog] on [admin. ]”. I think because of that error I can’t load js file.


From which dir you are issuing the command?
Go to the dir where file exists
start mongo
Then load as below
The warning you are seeing can be ignored.It says user cannot modify/work on admin DB
Error while trying to show server startup warnings: user is not allowed to do action [getLog] on [admin.]
MongoDB Enterprise Cluster0-shard-0:PRIMARY> load(“loadMovieDetailsDataset.js”)
MongoDB Enterprise Cluster0-shard-0:PRIMARY> show dbs
admin 0.000GB
local 1.500GB
video 0.000GB

Great! Thanks @Ramachandra_37567! It works now! I was trying to load js file before going to dir where file exists.

Using the load (“loadMovieDetailsDataset”) is not supporting in windows command prompt. I am getting an error load is not recognized as an internal or external command

This is very old post
Post in latest thread or open a new

How you are running the command?
Please run at mongo prompt