1
votes

I try to import a CSV file into mongoDB with the mongoimport utility like so

C:\Program Files\MongoDB\Server\3.2\bin>mongoimport --db vijay --type csv --headerline --file H:\all lab work\mongo\sampledata.csv

But the above command results in the following error

error validating settings only one positional argument is allowed when input is .csv

1
Pls answer i have spent hours for this stupid thing.. - Vijay Reddy

1 Answers

1
votes

I guess you have to pass the file in quotes due to the space in the path like so

C:\Program Files\MongoDB\Server\3.2\bin>mongoimport --db vijay --type csv --headerline --file "H:\all lab work\mongo\sampledata.csv"