Requirements: NodeJS envoirnment MySQL Database Text Editor Database File(.txt, csv, sql or any)
Tasks Done: The txt.file is converted to csv file. This file is parsed. The data is stored in MYSQL database. NodeJs is used to parse the csv file and stored it in database.
Steps:
- Read the CSV file via fs node module.
- Make connections to the Mysql database.
- Parse the csv file.
- Write a query to create table ‘zuri’ in Zuri database.
- Write a query to push the parsed csv file values to the database.
Running the program:
- Extract the folder
- Save it in a particular location
- Have your NodeJS envoirnment running.
- Go the location you saved the extracted folder.
- Run the following commands: npm init npm install express npm install csvjson npm install mysql node main.js That’s it
Command Prompt Output:
Database Output: