Lab - Read Concern and Read Preferences

I am trying to run the below query to import the date for my final lab for this chapter

mongoimport --drop --host m103-repl/192.168.103.100:27002,192.168.103.100:27001,m103:27003 -u “m103-admin” -p “m103-pass” -authenticationDatabase “admin” --db applicationData --collection products /dataset/products.json

But my mongoshell takes it as below and throws an error

mongoimport --drop --host m103-repl/192.168.103.100:27002,192.168.103.100:27001,m103:27003 -u “m103-admin” -p “m103-pass” -authenticationDatabase “admin” --db applicationData --collection products /dataset/products.json

There’s no difference between the first and second command.

I can see that you’re missing a character in one of the options, so I suggest that you copy exactly what’s in the lab and run that. Or try finding the missing character.

I had an extra character and so edited the same in notepad++ before i could run this . Thanks

Hi @Parsurama_Reddy_84828,

I’m glad your issue got resolved.

Just a small clarification for any other users who might face the same issue, you are supposed to run this command in your terminal and not in the mongo shell.

mongoimport --drop /dataset/products.json --port 26000 -u "m103-admin" \ -p "m103-pass" --authenticationDatabase "admin" \ --db m103 --collection products

If you have any other query, then please feel free to get back to us.

Happy Learning :slight_smile:

Thanks,
Shubham Ranjan
Curriculum Support Engineer