Import and export
JSON, CSV, Excel and NDJSON in and out, plus copying a collection between instances.
Checked against v1.11.0 Updated
Importing a file
- Import JSON (array, Extended JSON, NDJSON, gzip) and CSV/TSV with a delimiter choice of comma, tab, semicolon or pipe, header configuration, and one type-inference switch that is on by default
- Excel (.xlsx/.xls) import on Pro. It reads the first sheet and takes row one as the column names
- JSON, NDJSON, CSV, and TSV are streamed rather than read whole, so import memory does not grow with file size and there is no practical size ceiling
- Choosing a file sets the format from its extension, suggests the collection name, and picks the tab delimiter for a .tsv
- Write strategies: Insert, Upsert by identity, or Drop & Insert
- Drop & Insert into a write-protected target requires confirmation before the drop
- Stop on the first error or skip invalid records and continue
- Type inference for numbers, booleans, null, and cells holding a JSON object or array. An empty cell imports as null
- Dates only from an ISO-style leading YYYY-MM-DD, so order-1, sku-2, and Q1-2024 stay text
- Import an entire database from a directory, one collection per file, with the file count reported up front (Pro)
Exporting
- Export Extended JSON (canonical or relaxed, array or NDJSON, optional formatting and gzip) or CSV (custom delimiter, array flattening, gzip)
- Excel export on Pro. Like CSV, it carries no BSON typing: values are written as text and dates as ISO strings
- CSV and Excel columns are the union of fields in a sample of the export, so a field only some documents carry still gets one
- A field that first appears after that sample gets no column, and the export reports which fields those were
- Export scope narrowed by a document limit and a MongoDB filter
Copying between databases
- Copy a collection to another database or connection, with Insert, Upsert, or Insert Only (Pro)
- Collection copy can carry non-identity indexes and preserve their supported options (Pro)
- Export or duplicate a whole database with indexes, over every collection or ones picked from a searchable list (Pro)
- A database export writes one Extended JSON or CSV file per collection into a directory you choose (Pro)
- Long transfers report progress and cancel from the footer. A cancelled COLLECTION export removes its incomplete file; a cancelled database export, import, copy or duplication keeps what it already wrote