💾 Archived View for freeshell.de › tldr › mongoimport.gmi captured on 2023-11-14 at 10:01:02. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2022-04-28)
-=-=-=-=-=-=-
Imports content from a JSON, CSV, or TSV file into a MongoDB database.
mongoimport --file={path/to/file.json} --uri={mongodb_uri} --collection={collection_name}
mongoimport --type={csv} --file={path/to/file.csv} --db={database_name} --collection={collection_name}
mongoimport --jsonArray --file={path/to/file.json}
mongoimport --file={path/to/file.json} --mode={delete|merge|upsert} --upsertFields="{field1,field2,...}"
mongoimport --type={csv} --file={path/to/file.csv} --fieldFile={path/to/field_file.csv} --ignoreBlanks
mongoimport --help
Copyright © 2014—present the tldr-pages team and contributors.
This work is licensed under the Creative Commons Attribution 4.0 International License (CC-BY).