Skip to content

Instantly share code, notes, and snippets.

@mshakhomirov
Created November 28, 2021 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mshakhomirov/b689f77578ed527b4dd0dfca6008fc36 to your computer and use it in GitHub Desktop.
Save mshakhomirov/b689f77578ed527b4dd0dfca6008fc36 to your computer and use it in GitHub Desktop.
const processEvent = async(event, tables, bucket, key) => {
... // Maybe evaulte query size, etc.
... // add some other queries and tables to your ./config.json maybe?
for (const table of tables) {
try {
const result = await queryDbAndSave(connection, veryBiqSqlResult, size, ts, s3key, bucket, table.output, table.dryRun);
} catch (e) {
console.log(`ERROR: ${e.code} ${e.sqlMessage}`);
}
}
return console.log({ 'Finished processing tables': `${tables.length}` });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment