Skip to content

Commit 775a766

Browse files
destination-snowflake: bump CDK version (#38568)
1 parent af42c24 commit 775a766

File tree

8 files changed

+24
-17
lines changed

8 files changed

+24
-17
lines changed

airbyte-integrations/connectors/destination-snowflake/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins {
33
}
44

55
airbyteJavaConnector {
6-
cdkVersionRequired = '0.34.4'
6+
cdkVersionRequired = '0.35.7'
77
features = ['db-destinations', 's3-destinations', 'typing-deduping']
88
useLocalCdk = false
99
}

airbyte-integrations/connectors/destination-snowflake/metadata.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ data:
55
connectorSubtype: database
66
connectorType: destination
77
definitionId: 424892c4-daac-4491-b35d-c6688ba547ba
8-
dockerImageTag: 3.8.0
8+
dockerImageTag: 3.8.1
99
dockerRepository: airbyte/destination-snowflake
1010
documentationUrl: https://docs.airbyte.com/integrations/destinations/snowflake
1111
githubIssueLabel: destination-snowflake

airbyte-integrations/connectors/destination-snowflake/src/main/java/io/airbyte/integrations/destination/snowflake/typing_deduping/SnowflakeDestinationHandler.java

+4
Original file line numberDiff line numberDiff line change
@@ -361,4 +361,8 @@ private String toJdbcTypeName(final AirbyteProtocolType airbyteProtocolType) {
361361
};
362362
}
363363

364+
public void createNamespaces(Set<String> schemas) {
365+
// do nothing?
366+
}
367+
364368
}

airbyte-integrations/connectors/destination-snowflake/src/main/java/io/airbyte/integrations/destination/snowflake/typing_deduping/SnowflakeSqlGenerator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import static io.airbyte.integrations.base.destination.typing_deduping.Sql.concat;
88
import static io.airbyte.integrations.base.destination.typing_deduping.Sql.transactionally;
9-
import static io.airbyte.integrations.base.destination.typing_deduping.TypeAndDedupeTransaction.SOFT_RESET_SUFFIX;
9+
import static io.airbyte.integrations.base.destination.typing_deduping.TyperDeduperUtil.SOFT_RESET_SUFFIX;
1010
import static java.util.stream.Collectors.joining;
1111

1212
import com.google.common.annotations.VisibleForTesting;

airbyte-integrations/connectors/destination-snowflake/src/main/java/io/airbyte/integrations/destination/snowflake/typing_deduping/SnowflakeV2TableMigrator.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import io.airbyte.cdk.integrations.destination.jdbc.TableDefinition;
1313
import io.airbyte.integrations.base.destination.typing_deduping.StreamConfig;
1414
import io.airbyte.integrations.base.destination.typing_deduping.StreamId;
15-
import io.airbyte.integrations.base.destination.typing_deduping.TypeAndDedupeTransaction;
15+
import io.airbyte.integrations.base.destination.typing_deduping.TyperDeduperUtil;
1616
import io.airbyte.integrations.base.destination.typing_deduping.V2TableMigrator;
1717
import io.airbyte.protocol.models.v0.DestinationSyncMode;
1818
import java.sql.SQLException;
@@ -64,7 +64,7 @@ public void migrateIfNecessary(final StreamConfig streamConfig) throws Exception
6464
"Executing upcasing migration for {}.{}",
6565
streamConfig.getId().getOriginalNamespace(),
6666
streamConfig.getId().getOriginalName());
67-
TypeAndDedupeTransaction.executeSoftReset(generator, handler, streamConfig);
67+
TyperDeduperUtil.executeSoftReset(generator, handler, streamConfig);
6868
}
6969
}
7070

airbyte-integrations/connectors/destination-snowflake/src/test-integration/java/io/airbyte/integrations/destination/snowflake/typing_deduping/SnowflakeSqlGeneratorIntegrationTest.java

+9-9
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import io.airbyte.integrations.base.destination.typing_deduping.DestinationInitialStatus;
2626
import io.airbyte.integrations.base.destination.typing_deduping.Sql;
2727
import io.airbyte.integrations.base.destination.typing_deduping.StreamId;
28-
import io.airbyte.integrations.base.destination.typing_deduping.TypeAndDedupeTransaction;
28+
import io.airbyte.integrations.base.destination.typing_deduping.TyperDeduperUtil;
2929
import io.airbyte.integrations.destination.snowflake.OssCloudEnvVarConsts;
3030
import io.airbyte.integrations.destination.snowflake.SnowflakeDatabase;
3131
import io.airbyte.integrations.destination.snowflake.SnowflakeSourceOperations;
@@ -570,7 +570,7 @@ public void dst_test_oldSyncRunsThroughTransition_thenNewSyncRuns_dedup() throws
570570
}
571571
""")));
572572

573-
TypeAndDedupeTransaction.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalDedupStream(),
573+
TyperDeduperUtil.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalDedupStream(),
574574
initialState.initialRawTableStatus().getMaxProcessedTimestamp(), "");
575575

576576
getDIFFER().diffFinalTableRecords(
@@ -664,7 +664,7 @@ public void dst_test_oldSyncRunsBeforeTransition_thenNewSyncRunsThroughTransitio
664664
}
665665
""")));
666666

667-
TypeAndDedupeTransaction.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalDedupStream(),
667+
TyperDeduperUtil.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalDedupStream(),
668668
initialState.initialRawTableStatus().getMaxProcessedTimestamp(), "");
669669

670670
getDIFFER().diffFinalTableRecords(
@@ -739,7 +739,7 @@ public void dst_test_oldSyncRunsBeforeTransition_thenNewSyncRunsBeforeTransition
739739
}
740740
""")));
741741

742-
TypeAndDedupeTransaction.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalDedupStream(),
742+
TyperDeduperUtil.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalDedupStream(),
743743
initialState.initialRawTableStatus().getMaxProcessedTimestamp(), "");
744744

745745
getDIFFER().diffFinalTableRecords(
@@ -794,7 +794,7 @@ public void dst_test_oldSyncRunsBeforeTransition_thenNewSyncRunsBeforeTransition
794794
}
795795
""")));
796796

797-
TypeAndDedupeTransaction.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalDedupStream(),
797+
TyperDeduperUtil.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalDedupStream(),
798798
initialState2.initialRawTableStatus().getMaxProcessedTimestamp(), "");
799799

800800
getDIFFER().diffFinalTableRecords(
@@ -946,7 +946,7 @@ public void dst_test_oldSyncRunsThroughTransition_thenNewSyncRuns_append() throw
946946
}
947947
""")));
948948

949-
TypeAndDedupeTransaction.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalAppendStream(),
949+
TyperDeduperUtil.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalAppendStream(),
950950
initialState.initialRawTableStatus().getMaxProcessedTimestamp(), "");
951951

952952
getDIFFER().diffFinalTableRecords(
@@ -1085,7 +1085,7 @@ public void dst_test_oldSyncRunsBeforeTransition_thenNewSyncRunsThroughTransitio
10851085
}
10861086
""")));
10871087

1088-
TypeAndDedupeTransaction.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalAppendStream(),
1088+
TyperDeduperUtil.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalAppendStream(),
10891089
initialState.initialRawTableStatus().getMaxProcessedTimestamp(), "");
10901090

10911091
getDIFFER().diffFinalTableRecords(
@@ -1182,7 +1182,7 @@ public void dst_test_oldSyncRunsBeforeTransition_thenNewSyncRunsBeforeTransition
11821182
}
11831183
""")));
11841184

1185-
TypeAndDedupeTransaction.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalAppendStream(),
1185+
TyperDeduperUtil.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalAppendStream(),
11861186
initialState.initialRawTableStatus().getMaxProcessedTimestamp(), "");
11871187

11881188
getDIFFER().diffFinalTableRecords(
@@ -1259,7 +1259,7 @@ public void dst_test_oldSyncRunsBeforeTransition_thenNewSyncRunsBeforeTransition
12591259
}
12601260
""")));
12611261

1262-
TypeAndDedupeTransaction.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalAppendStream(),
1262+
TyperDeduperUtil.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalAppendStream(),
12631263
initialState2.initialRawTableStatus().getMaxProcessedTimestamp(), "");
12641264

12651265
getDIFFER().diffFinalTableRecords(

airbyte-integrations/connectors/destination-snowflake/src/test/java/io/airbyte/integrations/destination/snowflake/typing_deduping/SnowflakeSqlGeneratorTest.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ void columnCollision() {
7777
assertEquals(
7878
new StreamConfig(
7979
new StreamId("BAR", "FOO", "airbyte_internal", "bar_raw__stream_foo", "bar", "foo"),
80-
SyncMode.INCREMENTAL,
8180
DestinationSyncMode.APPEND,
8281
emptyList(),
8382
Optional.empty(),
@@ -88,7 +87,10 @@ void columnCollision() {
8887
put(new ColumnId("_CURRENT_DATE_1", "current_date", "_CURRENT_DATE_1"), AirbyteProtocolType.INTEGER);
8988
}
9089

91-
}),
90+
},
91+
0,
92+
0,
93+
0),
9294
parser.toStreamConfig(new ConfiguredAirbyteStream()
9395
.withSyncMode(SyncMode.INCREMENTAL)
9496
.withDestinationSyncMode(DestinationSyncMode.APPEND)

docs/integrations/destinations/snowflake.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,8 @@ desired namespace.
275275
## Changelog
276276

277277
| Version | Date | Pull Request | Subject |
278-
| :-------------- | :--------- | :--------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------- |
278+
|:----------------|:-----------| :--------------------------------------------------------- |:-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
279+
| 3.8.1 | 2024-05-22 | [\#38568](https://github.com/airbytehq/airbyte/pull/38568) | Adopt latest CDK |
279280
| 3.8.0 | 2024-05-08 | [\#37715](https://github.com/airbytehq/airbyte/pull/37715) | Remove option for incremental typing and deduping |
280281
| 3.7.4 | 2024-05-07 | [\#38052](https://github.com/airbytehq/airbyte/pull/38052) | Revert problematic optimization |
281282
| 3.7.3 | 2024-05-07 | [\#34612](https://github.com/airbytehq/airbyte/pull/34612) | Adopt CDK 0.33.2 |

0 commit comments

Comments
 (0)