-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add subaccount usernames table to list of tables to export. (backport #…
…2677) (#2697) Co-authored-by: vincentwschau <[email protected]>
- Loading branch information
1 parent
43a22ec
commit 0721293
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
indexer/services/roundtable/src/lib/athena-ddl-tables/subaccount_usernames.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { | ||
getAthenaTableCreationStatement, | ||
getExternalAthenaTableCreationStatement, | ||
} from '../../helpers/sql'; | ||
|
||
const TABLE_NAME: string = 'subaccount_usernames'; | ||
const RAW_TABLE_COLUMNS: string = ` | ||
\`username\` string, | ||
\`subaccountId\` string | ||
`; | ||
const TABLE_COLUMNS: string = ` | ||
"username", | ||
"subaccountId" | ||
`; | ||
|
||
export function generateRawTable(tablePrefix: string, rdsExportIdentifier: string): string { | ||
return getExternalAthenaTableCreationStatement( | ||
tablePrefix, | ||
rdsExportIdentifier, | ||
TABLE_NAME, | ||
RAW_TABLE_COLUMNS, | ||
); | ||
} | ||
|
||
export function generateTable(tablePrefix: string): string { | ||
return getAthenaTableCreationStatement( | ||
tablePrefix, | ||
TABLE_NAME, | ||
TABLE_COLUMNS, | ||
); | ||
} |
This file contains 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