Skip to content

Commit

Permalink
Update athena table name in analytics endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
ccali11 committed Jul 27, 2023
1 parent 1b6b15a commit d106d44
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
22 changes: 19 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions services/users/src/routes/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ router.get('/', verifySession(), async (req: SessionRequest, res: express.Respon
const user = await getUserById(userId)
const { accounts } = user
const addresses = accounts.map((account) => account.address)
const database = 'casimir_analytics_event_table_dev1'
const database = 'casimir_analytics_action_table_dev1'
const opt = {
profile: process.env.AWS_PROFILE as string,
database,
Expand All @@ -37,7 +37,7 @@ router.get('/', verifySession(), async (req: SessionRequest, res: express.Respon
* gas_fee
*/
const stmt = `
SELECT * FROM casimir_analytics_database_dev.casimir_analytics_wallet_table_dev1
SELECT * FROM casimir_analytics_database_dev.${database}
WHERE wallet_address IN (${addresses.map((address) => `'${address}'`).join(',')})
ORDER BY received_at DESC
LIMIT 100
Expand Down

0 comments on commit d106d44

Please sign in to comment.