Skip to content

Commit

Permalink
Catch all amount keys
Browse files Browse the repository at this point in the history
  • Loading branch information
hawyar committed Sep 12, 2022
1 parent 3578539 commit 6917c1a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions common/data/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@ export function schemaToGlueColumns(jsonSchema: JsonSchema): glue.Column[] {

let type: glue.Type = glue.Schema[typeKey]

if (name.endsWith('_at')) type = glue.Schema.DATE
if (name.endsWith('at')) type = glue.Schema.DATE

if (name === 'candidate_list') type = glue.Schema.array(glue.Schema.STRING)

if (name === 'amount') type = glue.Schema.BIG_INT

if (name === 'total_staked_amount') type = glue.Schema.BIG_INT
if (name.endsWith('amount')) type = glue.Schema.BIG_INT

const comment = property.description
return { name, type, comment }
Expand Down

0 comments on commit 6917c1a

Please sign in to comment.