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

fix postgres integration tests for stream casing/special characters #916

Merged
merged 3 commits into from
Nov 11, 2020

Conversation

jrhizor
Copy link
Contributor

@jrhizor jrhizor commented Nov 11, 2020

Fixes all case handling and special characters except ".

@@ -20,4 +20,5 @@ dependencies {
integrationTestImplementation "org.testcontainers:postgresql:1.15.0-rc2"

implementation files(project(':airbyte-integrations:bases:base-java').airbyteDocker.outputs)
integrationTestImplementation files(project(':airbyte-integrations:bases:base-normalization').airbyteDocker.outputs)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add this to the integrations you're working on

@@ -215,7 +216,7 @@ private static void writeStreamsWithNRecords(int minRecords,
int batchSize,
CloseableQueue<byte[]> writeBuffer,
String tmpTableName) {
InsertValuesStep3<Record, String, JSONB, OffsetDateTime> step = ctx.insertInto(table(tmpTableName), field("ab_id", String.class),
InsertValuesStep3<Record, String, JSONB, OffsetDateTime> step = ctx.insertInto(table(name(tmpTableName)), field("ab_id", String.class),
Copy link
Contributor Author

@jrhizor jrhizor Nov 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name adds escaping. This is really what we should be doing everywhere if we also want to be able to handle quotes.

@jrhizor jrhizor marked this pull request as ready for review November 11, 2020 21:38
@jrhizor jrhizor merged commit d92cd47 into master Nov 11, 2020
@jrhizor jrhizor deleted the jrhizor/fix-postgres-int-test branch November 11, 2020 21:55
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.

3 participants