error validating settings: only one positional argument is allowed in mongodb

Published on Author Code Father

If you get this error while inserting fields with –fields, the probable reason might be you are using spaces to do that.

Both -f and –fields should work in those cases Using Mongo Version 3.0.6

mongoimport --db logs --collection action_logs --type tsv -f updated_at ,transaction_time ,origin  --file parsed.tsv
mongoimport --db logs --collection action_logs --type tsv -f updated_at,transaction_time,origin  --file parsed.tsv

Comments

comments