File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed
indexer/services/roundtable/src Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ import {
2
+ getAthenaTableCreationStatement ,
3
+ getExternalAthenaTableCreationStatement ,
4
+ } from '../../helpers/sql' ;
5
+
6
+ const TABLE_NAME : string = 'subaccount_usernames' ;
7
+ const RAW_TABLE_COLUMNS : string = `
8
+ \`username\` string,
9
+ \`subaccountId\` string
10
+ ` ;
11
+ const TABLE_COLUMNS : string = `
12
+ "username",
13
+ "subaccountId"
14
+ ` ;
15
+
16
+ export function generateRawTable ( tablePrefix : string , rdsExportIdentifier : string ) : string {
17
+ return getExternalAthenaTableCreationStatement (
18
+ tablePrefix ,
19
+ rdsExportIdentifier ,
20
+ TABLE_NAME ,
21
+ RAW_TABLE_COLUMNS ,
22
+ ) ;
23
+ }
24
+
25
+ export function generateTable ( tablePrefix : string ) : string {
26
+ return getAthenaTableCreationStatement (
27
+ tablePrefix ,
28
+ TABLE_NAME ,
29
+ TABLE_COLUMNS ,
30
+ ) ;
31
+ }
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ import * as athenaOrders from '../lib/athena-ddl-tables/orders';
33
33
import * as athenaPerpetualMarkets from '../lib/athena-ddl-tables/perpetual_markets' ;
34
34
import * as athenaPerpetualPositions from '../lib/athena-ddl-tables/perpetual_positions' ;
35
35
import * as athenaPnlTicks from '../lib/athena-ddl-tables/pnl_ticks' ;
36
+ import * as athenaSubaccountUsernames from '../lib/athena-ddl-tables/subaccount_usernames' ;
36
37
import * as athenaSubaccounts from '../lib/athena-ddl-tables/subaccounts' ;
37
38
import * as athenaTendermintEvents from '../lib/athena-ddl-tables/tendermint_events' ;
38
39
import * as athenaTradingRewardAggregations from '../lib/athena-ddl-tables/trading_reward_aggregations' ;
@@ -64,6 +65,7 @@ export const tablesToAddToAthena: { [table: string]: AthenaTableDDLQueries } = {
64
65
affiliate_info : athenaAffiliateInfo ,
65
66
affiliate_referred_users : athenaAffiliateReferredUsers ,
66
67
vaults : athenaVaults ,
68
+ subaccount_usernames : athenaSubaccountUsernames ,
67
69
} ;
68
70
69
71
const statStart : string = `${ config . SERVICE_NAME } .update_research_environment` ;
You can’t perform that action at this time.
0 commit comments