Skip to content

Commit

Permalink
🐛 Destination Redshift and Postgres handle custom namespace with '-' (#…
Browse files Browse the repository at this point in the history
…11729)

* fix for jdk 17

* add CHANGELOG

* JdbcBufferedConsumerFactory resolve namespace with dash

* add CHANGELOG

* bump versions

* bump postgres version

* update destination-jdbc version

Co-authored-by: vmaltsev <vitalii.maltsev@globallogic.com>
  • Loading branch information
VitaliiMaltsev and vmaltsev authored Apr 7, 2022
1 parent b25c0de commit a0b7dd0
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
- name: Postgres
destinationDefinitionId: 25c5221d-dce2-4163-ade9-739ef790f503
dockerRepository: airbyte/destination-postgres
dockerImageTag: 0.3.15
dockerImageTag: 0.3.17
documentationUrl: https://docs.airbyte.io/integrations/destinations/postgres
icon: postgresql.svg
- name: Pulsar
Expand All @@ -191,7 +191,7 @@
- name: Redshift
destinationDefinitionId: f7a7d195-377f-cf5b-70a5-be6b819019dc
dockerRepository: airbyte/destination-redshift
dockerImageTag: 0.3.28
dockerImageTag: 0.3.29
documentationUrl: https://docs.airbyte.io/integrations/destinations/redshift
icon: redshift.svg
resourceRequirements:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2985,7 +2985,7 @@
supported_destination_sync_modes:
- "overwrite"
- "append"
- dockerImage: "airbyte/destination-postgres:0.3.15"
- dockerImage: "airbyte/destination-postgres:0.3.17"
spec:
documentationUrl: "https://docs.airbyte.io/integrations/destinations/postgres"
connectionSpecification:
Expand Down Expand Up @@ -3400,7 +3400,7 @@
supported_destination_sync_modes:
- "overwrite"
- "append"
- dockerImage: "airbyte/destination-redshift:0.3.28"
- dockerImage: "airbyte/destination-redshift:0.3.29"
spec:
documentationUrl: "https://docs.airbyte.io/integrations/destinations/redshift"
connectionSpecification:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ ENV APPLICATION destination-jdbc

COPY --from=build /airbyte /airbyte

LABEL io.airbyte.version=0.3.11
LABEL io.airbyte.version=0.3.12
LABEL io.airbyte.name=airbyte/destination-jdbc
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ private static Function<ConfiguredAirbyteStream, WriteConfig> toWriteConfig(

final String defaultSchemaName = schemaRequired ? namingResolver.getIdentifier(config.get("schema").asText())
: namingResolver.getIdentifier(config.get("database").asText());
final String outputSchema = getOutputSchema(abStream, defaultSchemaName);
final String outputSchema = getOutputSchema(abStream, defaultSchemaName, namingResolver);

final String streamName = abStream.getName();
final String tableName = namingResolver.getRawTableName(streamName);
Expand All @@ -107,12 +107,12 @@ private static Function<ConfiguredAirbyteStream, WriteConfig> toWriteConfig(
* The logic here matches the logic in the catalog_process.py for Normalization. Any modifications
* need to be reflected there and vice versa.
*/
private static String getOutputSchema(final AirbyteStream stream, final String defaultDestSchema) {
final String sourceSchema = stream.getNamespace();
if (sourceSchema != null) {
return sourceSchema;
}
return defaultDestSchema;
private static String getOutputSchema(final AirbyteStream stream,
final String defaultDestSchema,
final NamingConventionTransformer namingResolver) {
return stream.getNamespace() != null
? namingResolver.getNamespace(stream.getNamespace())
: namingResolver.getNamespace(defaultDestSchema);
}

private static OnStartFunction onStartFunction(final JdbcDatabase database,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ ENV APPLICATION destination-postgres

COPY --from=build /airbyte /airbyte

LABEL io.airbyte.version=0.3.15
LABEL io.airbyte.version=0.3.17
LABEL io.airbyte.name=airbyte/destination-postgres
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ ENV APPLICATION destination-redshift

COPY --from=build /airbyte /airbyte

LABEL io.airbyte.version=0.3.28
LABEL io.airbyte.version=0.3.29
LABEL io.airbyte.name=airbyte/destination-redshift
1 change: 1 addition & 0 deletions docs/integrations/destinations/postgres.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ Therefore, Airbyte Postgres destination will create tables and schemas using the

| Version | Date | Pull Request | Subject |
|:--------| :--- | :--- |:----------------------------------------------------------------------------------------------------|
| 0.3.17 | 2022-04-05 | [11729](https://github.com/airbytehq/airbyte/pull/11729) | Fixed bug with dashes in schema name |
| 0.3.15 | 2022-02-25 | [10421](https://github.com/airbytehq/airbyte/pull/10421) | Refactor JDBC parameters handling |
| 0.3.14 | 2022-02-14 | [10256](https://github.com/airbytehq/airbyte/pull/10256) | (unpublished) Add `-XX:+ExitOnOutOfMemoryError` JVM option |
| 0.3.13 | 2021-12-01 | [8371](https://github.com/airbytehq/airbyte/pull/8371) | Fixed incorrect handling "\n" in ssh key |
Expand Down
1 change: 1 addition & 0 deletions docs/integrations/destinations/redshift.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ All Redshift connections are encrypted using SSL

| Version | Date | Pull Request | Subject |
|:--------| :-------- | :----- | :------ |
| 0.3.29 | 2022-04-05 | [11729](https://github.com/airbytehq/airbyte/pull/11729) | Fixed bug with dashes in schema name | |
| 0.3.28 | 2022-03-18 | [\#11254](https://github.com/airbytehq/airbyte/pull/11254) | Fixed missing records during S3 staging |
| 0.3.27 | 2022-02-25 | [10421](https://github.com/airbytehq/airbyte/pull/10421) | Refactor JDBC parameters handling |
| 0.3.25 | 2022-02-14 | [#9920](https://github.com/airbytehq/airbyte/pull/9920) | Updated the size of staging files for S3 staging. Also, added closure of S3 writers to staging files when data has been written to an staging file. |
Expand Down

0 comments on commit a0b7dd0

Please sign in to comment.