csv-to-sql-insert
csv-to-sql-insert copied to clipboard
Provide table data as a CSV (comma-separated values) file and output a SQL insert statement for a table with the same name as the file.
I think adding a prettier and eslint config for the project would be ideal since varying configs of users can make it difficult for changes to be analyzed in PRs.
Would like to add a counter to report at the end how many rows were processed from the file, along with how long it took to complete the processing.
The CSV file can get very huge. So, depending on the size of your CSV file, we might want to consider streaming the file instead of reading the entire content...
When I created this Node.js script, I just ran it from the command line with: `node . csvFileName` It would be nice to have `start` and `dev` scripts in the...
The code for constructing the SQL statement could be extracted into a separate function to avoid duplication. This can make our code more modular and easier to maintain
Hello, I have added start and dev script in this csv-to-sql-insert project.
You're using process.argv directly within your functions. It might be a good idea to use a library like yargs for more structured and easier handling of command line arguments.