-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Redshift] Support truncating values #928
Conversation
} | ||
{ | ||
// Struct and masked | ||
assert.Equal(r.T(), fmt.Sprintf(`{"key":"%s"}`, constants.ExceededValueMarker), replaceExceededValues(fmt.Sprintf(`{"foo": "%s"}`, stringutil.Random(int(maxRedshiftLength)+1)), typing.Struct, false)) |
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.
Should we add a test case where a struct value gets truncated?
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.
Should we add a test case where a struct value gets truncated?
They don't get truncated right now because it's unclear how we would actually truncate the struct (e.g. which key do we truncate and still maintain valid JSON?)
This PR adds the ability to truncate exceeded values instead of returning
__artie_exceeded_value
.This capability could be used for other destinations, however this PR adds it for just Redshift to start.