Skip to content

About

convert csv file to mongoDB collection

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

Repository files navigation

csv To MongoDB

HitCount

convert csv file to mongoDB collection

Getting Started

Linux Prerequisites

install mongoDB Server and nodejs

$ sudo apt-get update
$ sudo apt-get install mongodb-org mongodb-org-server nodejs

Win Prerequisites

install

Usage

first time run

$ sudo npm install

if you run on linux change line 13 of package.json from

$ "start": "node index.js > out.query && mongo csv out.query && del out.query"

to

$ "start": "node index.js > out.query && mongo csv out.query && rm out.query"

change first line of index.js with database name that you want

now you can put csv file into 'csv' directory and then run

$ npm start

the script create new db and add collection for every csv in directory

About

convert csv file to mongoDB collection

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages