Load data with Mongo Shell

Unable to load data in the cluster.

I am getting an error loading the JS file.


Does the file exist in your dir
In the snapshot i don’t see it
What does the video instruction says about the command to be used to load data

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

you have not included .js
try with complete extension as:


and wait for a while until it returns

I am facing similar issue since last few hours

The directory is exactly same as told by Shannon. Don’t know why I am getting this error. Someone please help.

Most probably you are issuing load command from a different directory

Go to that dir connect to mongo and issue load
Show us the snapshot
quit() then show pwd or dir

Hi Ram,

Which directory are you talking about ? Sorry but couldn’t get you. I am issuing the load command from MongoDB Enterprise Sandbox-shard-0:PRIMARY>

Once I enter quit() >> I will be in in my home dir (C:\Users\deepa>)

I am able to find the js file in below command:-

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

28-02-2019 18:54 .
28-02-2019 18:54 …
28-02-2019 18:54 1,381,666 loadMovieDetailsDataset.js
1 File(s) 1,381,666 bytes
2 Dir(s) 305,777,037,312 bytes free

Please let me know from which directory I should issue the load command ?

I got it now. i should have issued the load command from the below directory:-

Glad you got it working!!