-1

I'm facing a problem in importing a CSV file to my db. I tried this command:

mongoimport --db meteor -h localhost:3001 -c TollPlaza -d meteor --headerline --type csv --file TollPlaza.csv

I referred to this question but am still having a problem.

Community
  • 1
  • 1
  • What's the nature of the problem? An error? Incorrect data being imported? – Michel Floyd Oct 27 '15 at 04:44
  • What problem? Are you running your application and therefore the server when doing this? Have you confirmed the server is being run on port `3001`. Check to see whhat port the server is running on with `ps aux | grep mongod` – Blakes Seven Oct 27 '15 at 04:50

2 Answers2

-1

Try this query :

mongoimport --db meteor --host localhost --port 3001 -c TollPlaza -d meteor --headerline --type csv --file TollPlaza.csv

Maybe seperate host and port

Fariz Aghayev
  • 649
  • 5
  • 17
  • This is just a copy of what the OP says they are already doing in their question and does not attempt to address the possible issues. – Blakes Seven Oct 27 '15 at 06:54
-1

The query is perfectly fine.

Follow the instructions

  1. run the meteor project
  2. Open a one more command prompt in same location
  3. make sure that csv file present in the same directory.
  4. run the query.
  5. check the DB (show collections).