Chapter 01 Lab : Importing a Dataset

I ran this command

mongoimport --drop --port 27000 -u "m103-application-user" -p "m103-application-pass" -- 
authenticationDatabase "admin" --db applicationData --collection products /dataset/products.json

I got this error

2021-06-28T05:58:42.733+0000 E QUERY [js] SyntaxError: missing ; before statement @(shell):1:14

What’s wrong?

Hi @Junaid_Shaikh, :wave:
It seems like you are running the command from the mongo shell, I would recommend you to type exit and press return/enter to close the mongo shell, after which you can execute the mongoimport command in your terminal/command prompt.

Also, checkout this FAQ topic.

In case you have any doubts, please feel free to reach out to us.

Thanks and Regards.
Sourabh Bagrecha,
Curriculum Services Engineer

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.