Reputation: 11
I am trying to import a simple CSV file using mongoimport. The command I used was
mongoimport --db mydb --collection Test --type csv --file C:\Users\Jawahir\Des ktop/Test.csv
where I created the collection named Test.Also, I created a csv file named Test.CSV which has the following details
FirstName LastName Age Position Experience Jawahir Junaith 27 SE 4.2 Javeed A 24 Network Admin 1 Abdul Waheed 54 Teacher 23 7
I am getting error lie "Javascript Ececution Failed: Syntax error
What is the issue here ?
Upvotes: 1
Views: 51
Reputation: 61
You're running this in the mongo shell. Mongoimport is a separate executable. Exit the shell then try the command again.
Upvotes: 1