Skip to content
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

Merged
merged 13 commits into from
Sep 26, 2024
Merged

Conversation

Tang8330
Copy link
Contributor

@Tang8330 Tang8330 commented Sep 25, 2024

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.

@Tang8330 Tang8330 changed the title [WIP] Support truncating values [Redshift] Support truncating values Sep 25, 2024
@Tang8330 Tang8330 marked this pull request as ready for review September 26, 2024 00:00
@Tang8330 Tang8330 requested a review from a team as a code owner September 26, 2024 00:00
}
{
// 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))
Copy link
Contributor

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?

Copy link
Contributor Author

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?)

@Tang8330 Tang8330 merged commit fb58dbc into master Sep 26, 2024
3 checks passed
@Tang8330 Tang8330 deleted the support-truncating-values branch September 26, 2024 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants