Instead of depending on process.args inside both writeSQL and readCSV functions, we can simply pass necessary CLI arguments as function parameters.
This will make it easier to maintain and it will also give priority to the function arguments over the CLI argument which can be useful in case (in a future update) we want to dynamically change the output file name (ex: splitting big data into multiple files such as output_1.sql, output_2.sql...)
Instead of depending on
process.args
inside bothwriteSQL
andreadCSV
functions, we can simply pass necessary CLI arguments as function parameters. This will make it easier to maintain and it will also give priority to the function arguments over the CLI argument which can be useful in case (in a future update) we want to dynamically change the output file name (ex: splitting big data into multiple files such as output_1.sql, output_2.sql...)