Skip to content

Import a CSV into a MongoDB collection

Notifications You must be signed in to change notification settings

AQUAOSOTech/csv-to-mongo-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

csv-to-mongo-tool

Quickly import a csv file to a MongoDB database.

Requirements:

  • Node.js v10.x.x
  • npm
  • mongodb

Example Usage

cd path/to/csv-to-mongo-tool
npm install
MONGO_URI=mongodb://localhost/petdb CSV_FILE=mypets.csv MODEL_NAME=Pets node import.js

About

Parsing and inserting happens per-line so it is slightly slower but a huge number of records can be imported using minimal memory.

About

Import a CSV into a MongoDB collection

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published