Skip to content

Commit

Permalink
Destination Snowflake: edit schema name which contains the character - (
Browse files Browse the repository at this point in the history
#9743)

* fix for jdk 17

* added heartbeat interval to Apache Mina settings

* fixed checkstyle

* bump versions

Co-authored-by: vmaltsev <vitalii.maltsev@globallogic.com>
  • Loading branch information
VitaliiMaltsev and vmaltsev authored Jan 24, 2022
1 parent 62f2afb commit 5a091b1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"destinationDefinitionId": "424892c4-daac-4491-b35d-c6688ba547ba",
"name": "Snowflake",
"dockerRepository": "airbyte/destination-snowflake",
"dockerImageTag": "0.4.3",
"dockerImageTag": "0.4.4",
"documentationUrl": "https://docs.airbyte.io/integrations/destinations/snowflake",
"icon": "snowflake.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
- name: Snowflake
destinationDefinitionId: 424892c4-daac-4491-b35d-c6688ba547ba
dockerRepository: airbyte/destination-snowflake
dockerImageTag: 0.4.3
dockerImageTag: 0.4.4
documentationUrl: https://docs.airbyte.io/integrations/destinations/snowflake
icon: snowflake.svg
- name: MariaDB ColumnStore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ COPY build/distributions/${APPLICATION}*.tar ${APPLICATION}.tar

RUN tar xf ${APPLICATION}.tar --strip-components=1

LABEL io.airbyte.version=0.4.3
LABEL io.airbyte.version=0.4.4
LABEL io.airbyte.name=airbyte/destination-snowflake
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private static Function<ConfiguredAirbyteStream, WriteConfig> toWriteConfig(
Preconditions.checkNotNull(stream.getDestinationSyncMode(), "Undefined destination sync mode");
final AirbyteStream abStream = stream.getStream();

final String outputSchema = getOutputSchema(abStream, namingResolver.getIdentifier(config.get("schema").asText()));
final String outputSchema = getOutputSchema(abStream, config.get("schema").asText(), namingResolver);

final String streamName = abStream.getName();
final String tableName = namingResolver.getRawTableName(streamName);
Expand All @@ -94,12 +94,10 @@ private static Function<ConfiguredAirbyteStream, WriteConfig> toWriteConfig(
};
}

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, NamingConventionTransformer namingResolver) {
return stream.getNamespace() != null
? namingResolver.getIdentifier(stream.getNamespace())
: namingResolver.getIdentifier(defaultDestSchema);
}

private static OnStartFunction onStartFunction(final JdbcDatabase database,
Expand Down
1 change: 1 addition & 0 deletions docs/integrations/destinations/snowflake.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ Finally, you need to add read/write permissions to your bucket with that email.

| Version | Date | Pull Request | Subject |
|:--------|:-----------| :----- | :------ |
| 0.4.4 | 2022-01-24 | [#9743](https://github.com/airbytehq/airbyte/pull/9743) | Fixed bug with dashes in schema name |
| 0.4.3 | 2022-01-20 | [#9531](https://github.com/airbytehq/airbyte/pull/9531) | Start using new S3StreamCopier and expose the purgeStagingData option |
| 0.4.2 | 2022-01-10 | [#9141](https://github.com/airbytehq/airbyte/pull/9141) | Fixed duplicate rows on retries |
| 0.4.1 | 2021-01-06 | [#9311](https://github.com/airbytehq/airbyte/pull/9311) | Update сreating schema during check |
Expand Down

0 comments on commit 5a091b1

Please sign in to comment.