Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
64 lines (63 sloc) 1.61 KB
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
.TH MONGOIMPORT "1" "January 2010" "10gen" "Mongo Database"
mongoimport \- the Mongo import tool
\fBmongoimport [\fIOPTIONS\fR]\fR
is a tool to import a MongoDB collection from JSON, CSV, or TSV. The query can be filtered or a list of fields to input can be given.
.\".B mongoimport -d test -c test1 --csv -f "name,num"
.\"import documents from test.test1 in CSV format
show usage information
.B \-h, \-\-host HOST
server to connect to (default HOST=localhost)
.B \-d, \-\-db DATABASE
database to use
.B \-c, \-\-c COLLECTION
collection to use (some commands)
.B \-\-dbpath PATH
directly access mongod data files in this path,
instead of connecting to a mongod instance
.B \-v, \-\-verbose
be more verbose (include multiple times for more
verbosity e.g. \fB\-vvvvv\fR)
.B \-f, \-\-fields NAMES
comma seperated list of field names e.g. \fB\-f\fR name,age
.B \-\-fieldFile FILE
file with fields names \- 1 per line
.B \-\-ignoreBlanks
if given, empty fields in csv and tsv will be ignored
.B \-\-type TYPE
type of file to import. default: json (json,csv,tsv)
.B \-\-file FILE
file to import from; if not specified stdin is used
.B \-\-drop
drop collection first
.B \-\-headerline
CSV,TSV only \- use first line as headers
Copyright 2007\-2009 10gen
For more information, please refer to the MongoDB wiki, available at
Kristina Chodorow
Something went wrong with that request. Please try again.