publishing-csv-reader-file-example
v1.0.0
Published
An example file to allow user to read a csv file as input and store in db
Downloads
1
Readme
This package enables you to read a csv file and print that data to console CMD for doing same is :node index.js --file=SampleData.csv SampleData.csv file is combindly provided with it Here we make use of npm packages like : csv-parse , minimist ,fs for parsing the data . SampleData.csv currently only comprise of two fields - email and name , Hence code has been accordingly designed for reading two field only currently, but code can be altred accordingly further as per requirment by just altering the columns to be read in index.js.
Sample Data OUTPUT looks like:
SampleData.csv {"email":"[email protected]","name":"aaaaa"} {"email":"[email protected]","name":"bbbbb"} {"email":"[email protected]","name":"ccccc"}