Failed to load data into Sandbox Cluster

Hi, any clue on error - Failed to load data (loadMovieDetailsDataset.js) into Sandbox Cluster.
The error message detail says - not authorized on video to execute command

Q. Is it because the video DB already exists ? or something else ?
Please help.

Found similar existing unanswered query @

MongoDB Enterprise Cluster0-shard-0:PRIMARY> show dbs
100YWeatherSmall 0.128GB
admin 0.000GB
aggregations 0.067GB
citibike 0.363GB
city 0.002GB
config 0.000GB
coursera-agg 0.083GB
local 1.043GB
mflix 0.292GB
results 0.000GB
ships 0.001GB
video 0.458GB

MongoDB Enterprise Cluster0-shard-0:PRIMARY> load(“loadMovieDetailsDataset.js”)
2019-03-02T18:18:13.048+0530 E QUERY [js] [src/mongo/shell/utils.js:25:13] Error: drop failed: {
“operationTime” : Timestamp(1551530882, 1),
“ok” : 0,
“errmsg” : “not authorized on video to execute command { drop: “movieDetails”, lsid: { id: UUID(“78172960-bb99-46e1-bfd7-2628dec7f943”) }, $clusterTime: { clusterTime: Timestamp(1551530872, 1), signature: { hash: BinData(0, 565967B590AB319DCFD120EA4F6D40CD67890A44), keyId: 6627672121604571137 } }, $db: “video” }”,
“code” : 13,
“codeName” : “Unauthorized”,
“$clusterTime” : {
“clusterTime” : Timestamp(1551530882, 1),
“signature” : {
“hash” : BinData(0,“KQl6exAOCdv81L7TyiYJlIX6DSA=”),
“keyId” : NumberLong(“6627672121604571137”)
Stack trace:

2019-03-02T18:18:13.049+0530 E QUERY [js] Error: error loading js file: loadMovieDetailsDataset.js @(shell):1:1
MongoDB Enterprise Cluster0-shard-0:PRIMARY> loadMovieDetailsDataset.js

Please double check which cluster you connected
Looking at the DBs appears to me you connected to class cluster which is read only
What command/connect string you used
Can you paste that?

1 Like

I have used the following command to connect to the class Atlas cluster. It is mentioned in the course M001- Chapter 2: The MongoDB Query Language + Atlas - Connecting to Our Class Atlas Cluster from the mongo Shell

Command string:

mongo “mongodb://,,” --authenticationDatabase admin --ssl --username m001-student --password m001-mongodb-basics

You cannot load into class cluster
Title of this issue says “Failed to load into Sandbox cluster”
Try to connect to Sandbox and load
As i mentioned before Class cluster(RO) and Sandbox are two different(RW)

The class cluster is Read Only. You need the write access to write something.
That’s why you are getting that error.

You need to follow this lesson to create your own sandbox cluster.
Follow this link to reach out the lesson.

Thanks Guys, was able to connect with command string available in my sandbox cluster.
Thanks once again.