Skip to content

Simple script to fill a table database with large csv files

License

Notifications You must be signed in to change notification settings

garusis/cvs-to-db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple script to fill a table database with large csv files

This Node.js script was writted thinking in use large cvs files to fill postgresql databases using csvtojson and knex.


Instructions

  • Install npm modules with npm install.
  • run node migrate.js --option1 val1 --option2 val2 ... --optionN valN

Example

node migrate.js --host localhost --user userdb --password passdb --database test --table tabletest --file ./seeder.csv

options:

  • host: String (Default: localhost)
  • user: String (Default: admin)
  • password: String (Default: admin)
  • database: String (Default: test)
  • table: String (Default: test)
  • file: String (Default: ./test.csv)
  • maxRecords: Number (Default: 20)
  • maxTransactions: Number (Default: 10)

About

Simple script to fill a table database with large csv files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published