From 367f706d6cf34bc8e0ae94e3494f3d2352cf0d8a Mon Sep 17 00:00:00 2001 From: Edward Gao Date: Thu, 22 Aug 2024 08:59:33 -0700 Subject: [PATCH] Destinations CDK: add test for mixed-case stream name (#44505) --- airbyte-cdk/java/airbyte-cdk/README.md | 2 + .../src/main/resources/version.properties | 2 +- .../BaseSqlGeneratorIntegrationTest.kt | 45 +++++++++++++------ 3 files changed, 34 insertions(+), 15 deletions(-) diff --git a/airbyte-cdk/java/airbyte-cdk/README.md b/airbyte-cdk/java/airbyte-cdk/README.md index df2628e21c8d..da8adc9ce3da 100644 --- a/airbyte-cdk/java/airbyte-cdk/README.md +++ b/airbyte-cdk/java/airbyte-cdk/README.md @@ -174,6 +174,8 @@ corresponds to that version. | Version | Date | Pull Request | Subject | |:-----------|:-----------|:-------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 0.44.16 | 2024-08-22 | [\#44505](https://github.com/airbytehq/airbyte/pull/44505) | Destinations: add sqlgenerator testing for mixed-case stream name | +| 0.44.15 | ?????????? | [\#?????](https://github.com/airbytehq/airbyte/pull/?????) | ????? | | 0.44.14 | 2024-08-19 | [\#42503](https://github.com/airbytehq/airbyte/pull/42503) | Destinations (refreshes) - correctly detect existing raw/final table of the correct generation during truncate sync | | 0.44.13 | 2024-08-14 | [\#42579](https://github.com/airbytehq/airbyte/pull/42579) | S3 destination - OVERWRITE: keep files until successful sync of same generationId | | 0.44.5 | 2024-08-09 | [\#43374](https://github.com/airbytehq/airbyte/pull/43374) | S3 destination V2 fields, conversion improvements, bugfixes | diff --git a/airbyte-cdk/java/airbyte-cdk/core/src/main/resources/version.properties b/airbyte-cdk/java/airbyte-cdk/core/src/main/resources/version.properties index d388d2f9c7d8..e42b83d0c73d 100644 --- a/airbyte-cdk/java/airbyte-cdk/core/src/main/resources/version.properties +++ b/airbyte-cdk/java/airbyte-cdk/core/src/main/resources/version.properties @@ -1 +1 @@ -version=0.44.15 +version=0.44.16 diff --git a/airbyte-cdk/java/airbyte-cdk/typing-deduping/src/testFixtures/kotlin/io/airbyte/integrations/base/destination/typing_deduping/BaseSqlGeneratorIntegrationTest.kt b/airbyte-cdk/java/airbyte-cdk/typing-deduping/src/testFixtures/kotlin/io/airbyte/integrations/base/destination/typing_deduping/BaseSqlGeneratorIntegrationTest.kt index 25a9ad48fa2a..30bb00b8fee5 100644 --- a/airbyte-cdk/java/airbyte-cdk/typing-deduping/src/testFixtures/kotlin/io/airbyte/integrations/base/destination/typing_deduping/BaseSqlGeneratorIntegrationTest.kt +++ b/airbyte-cdk/java/airbyte-cdk/typing-deduping/src/testFixtures/kotlin/io/airbyte/integrations/base/destination/typing_deduping/BaseSqlGeneratorIntegrationTest.kt @@ -521,18 +521,39 @@ abstract class BaseSqlGeneratorIntegrationTest + if (i % 2 == 0) { + c + } else { + c.uppercase() + } + } + .joinToString(separator = "") + val streamId = + sqlGenerator.buildStreamId( + namespace = streamId.originalNamespace, + name = toMixedCase(streamId.originalName), + rawNamespaceOverride = streamId.rawNamespace, + ) + val streamConfig = incrementalDedupStream.copy(id = streamId) + // Add case-sensitive columnName to test json path querying - incrementalDedupStream.columns!![generator.buildColumnId("IamACaseSensitiveColumnName")] = + streamConfig.columns[generator.buildColumnId("IamACaseSensitiveColumnName")] = AirbyteProtocolType.STRING createRawTable(streamId) - createFinalTable(incrementalDedupStream, "") + createFinalTable(streamConfig, "") insertRawTableRecords( streamId, BaseTypingDedupingTest.readRecords( @@ -540,21 +561,18 @@ abstract class BaseSqlGeneratorIntegrationTest