Skip to content

A simple demo project that reads a csv file with unlimited size using stream and saves each line to MongoDB database.

Notifications You must be signed in to change notification settings

galloaleonardo/read-csv-stream-put-mongodb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Read CSV as Stream and Put Data in MongoDB

A simple demo project that reads a csv file with unlimited size using stream and saves each line to MongoDB database.


Requirements

  • NodeJS >= 18.
  • Docker >= 20.
  • Docker Compose >= 2.16.

Install

  • Install dependencies:
yarn install
  • Place a .csv file named data.csv (unlimited size) in the data/ folder.

Usage

  • Start MongoDB database:
docker compose up -d
  • Start service:
yarn start

Check the data being imported in your preferred MongoDB interface.


Enjoy yourself! =)

About

A simple demo project that reads a csv file with unlimited size using stream and saves each line to MongoDB database.

Resources

Stars

Watchers

Forks