Search code examples
mongodbmongoimport

MongoDB - validating settings error


I'm trying to import a CSV file into MongoDB using the following command;

mongoimport -db results --collection socialogy --type csv --file "F:\Projects\pandas\results.csv" --headerline

MongoDB gives the following error message;

error validating settings: incompatible options: --file and positional argument(s)

What am I doing wrong?


Solution

  • You seem to have typo in your query. See -db option part, it should be --db. This way your really mix arguments as error message says.