All apps/mongoimport

mongoimport

mongoimport

Import data from a JSON, CSV, or TSV file into a MongoDB instance.

Runs as mongoimport|macOS, Linux, Windows|www.mongodb.com

Command form

ai-draft · 2 tasks · 12 fields

Import a JSON, CSV or TSV file into a collection. Credentials, TLS and Kerberos options are left out; put credentials in a connection URI or config file instead.

Opens the form; the finished command lands at your prompt, unrun
otty gui mongoimport
Import dataExample values, fixed in this page — nothing here reaches a terminal
Basic
Connection URI
string
Database*
string
Collection*
string
Input file*
file
File type
csvstring
Advanced
First line is header
--headerline
TasksEach one presets the form for one job
Import a CSV with header
uridbcollectionfiletypeheaderline
Import a JSON file
uridbcollectionfilemodedrop
ParametersOnly these flags are editable in the form
Connection URI
string
--urimongodb://localhost:27017
Host
string
--hostlocalhost:27017
Database
string
--db-d
Collection
string
--collection-c
Input file
path
--file
File type
string
--typejsoncsvtsv
First line is header
boolean
--headerline
Field names
Comma-separated, for CSV/TSV files without a header line.
string
--fields-f
Import mode
How to handle existing documents that match.
string
--modeinsertupsertmergedelete
Upsert fields
string
--upsertFields
Drop collection first
Drops the target collection before importing.
boolean
--drop
Stop on first error
boolean
--stopOnError
SourcesEvery flag above is checked against these
fig
completion

github.com

Before it fills your prompt, Otty checks the installed mongoimport against its version. A form that does not match your version is not offered.