Last active
May 11, 2023 09:47
-
-
Save wbarcovsky/19b198e280dae8a11cbd40b345a5081b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fs = require('fs'); | |
| const path = require('path'); | |
| const data = await db.query(`SELECT * FROM table`); | |
| let result = ''; | |
| for (let row of data) { | |
| result += await processData(row); | |
| } | |
| fs.writeFileSync(path.join(__dirname, 'tmp.csv'), result); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment