-
Notifications
You must be signed in to change notification settings - Fork 30
Added getNULL check on type check and convertNumberToText as a optional command line parameter #6
base: master
Are you sure you want to change the base?
Conversation
Added convertNumberToText or convert-numbers-to-text as a command line parameter that allows numbers to be stored as string in postgress. This is to address an issue where javascript numbers were stored as a string in DynamoDB. Also prevents the creation of an additional columns where they are not needed. Eg. amount = 0. Will create column "amount" but amount = "0" will create another column "amount_numeric". When starting podyn with convert-numbers-to-text all numeric fields will be treated as strings. |
I also created docker image that will account for this new command line args |
} else if (typedValue.getS() != null) { | ||
return TableColumnType.text; | ||
} else if (typedValue.getSS() != null) { | ||
return TableColumnType.jsonb; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR is longer open, but if someone sometime will use it please think about:
In columnValueFromDynamoValue TableColumnType.text is used for StringSet (SS) value, but column type is jsonb. So podyn will add jsonb column, but try to write text inside. In our case this lead to empty values and some debugging time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Want me to close this PR? This solved my issue
No description provided.