💾 Archived View for freeshell.de › tldr › mongoimport.gmi captured on 2022-06-11 at 22:12:47. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-04-28)

-=-=-=-=-=-=-

mongoimport

Imports content from a JSON, CSV, or TSV file into a MongoDB database.

More information.

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).

CC-BY