Skip to content

Commit

Permalink
destination-snowflake: bump CDK version
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane-airbyte committed May 22, 2024
1 parent af42c24 commit d3bc50d
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

airbyteJavaConnector {
cdkVersionRequired = '0.34.4'
cdkVersionRequired = '0.35.7'
features = ['db-destinations', 's3-destinations', 'typing-deduping']
useLocalCdk = false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ data:
connectorSubtype: database
connectorType: destination
definitionId: 424892c4-daac-4491-b35d-c6688ba547ba
dockerImageTag: 3.8.0
dockerImageTag: 3.8.1
dockerRepository: airbyte/destination-snowflake
documentationUrl: https://docs.airbyte.com/integrations/destinations/snowflake
githubIssueLabel: destination-snowflake
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,4 +361,8 @@ private String toJdbcTypeName(final AirbyteProtocolType airbyteProtocolType) {
};
}

public void createNamespaces(Set<String> schemas) {
// do nothing?
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import static io.airbyte.integrations.base.destination.typing_deduping.Sql.concat;
import static io.airbyte.integrations.base.destination.typing_deduping.Sql.transactionally;
import static io.airbyte.integrations.base.destination.typing_deduping.TypeAndDedupeTransaction.SOFT_RESET_SUFFIX;
import static io.airbyte.integrations.base.destination.typing_deduping.TyperDeduperUtil.SOFT_RESET_SUFFIX;
import static java.util.stream.Collectors.joining;

import com.google.common.annotations.VisibleForTesting;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import io.airbyte.cdk.integrations.destination.jdbc.TableDefinition;
import io.airbyte.integrations.base.destination.typing_deduping.StreamConfig;
import io.airbyte.integrations.base.destination.typing_deduping.StreamId;
import io.airbyte.integrations.base.destination.typing_deduping.TypeAndDedupeTransaction;
import io.airbyte.integrations.base.destination.typing_deduping.TyperDeduperUtil;
import io.airbyte.integrations.base.destination.typing_deduping.V2TableMigrator;
import io.airbyte.protocol.models.v0.DestinationSyncMode;
import java.sql.SQLException;
Expand Down Expand Up @@ -64,7 +64,7 @@ public void migrateIfNecessary(final StreamConfig streamConfig) throws Exception
"Executing upcasing migration for {}.{}",
streamConfig.getId().getOriginalNamespace(),
streamConfig.getId().getOriginalName());
TypeAndDedupeTransaction.executeSoftReset(generator, handler, streamConfig);
TyperDeduperUtil.executeSoftReset(generator, handler, streamConfig);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import io.airbyte.integrations.base.destination.typing_deduping.DestinationInitialStatus;
import io.airbyte.integrations.base.destination.typing_deduping.Sql;
import io.airbyte.integrations.base.destination.typing_deduping.StreamId;
import io.airbyte.integrations.base.destination.typing_deduping.TypeAndDedupeTransaction;
import io.airbyte.integrations.base.destination.typing_deduping.TyperDeduperUtil;
import io.airbyte.integrations.destination.snowflake.OssCloudEnvVarConsts;
import io.airbyte.integrations.destination.snowflake.SnowflakeDatabase;
import io.airbyte.integrations.destination.snowflake.SnowflakeSourceOperations;
Expand Down Expand Up @@ -570,7 +570,7 @@ public void dst_test_oldSyncRunsThroughTransition_thenNewSyncRuns_dedup() throws
}
""")));

TypeAndDedupeTransaction.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalDedupStream(),
TyperDeduperUtil.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalDedupStream(),
initialState.initialRawTableStatus().getMaxProcessedTimestamp(), "");

getDIFFER().diffFinalTableRecords(
Expand Down Expand Up @@ -664,7 +664,7 @@ public void dst_test_oldSyncRunsBeforeTransition_thenNewSyncRunsThroughTransitio
}
""")));

TypeAndDedupeTransaction.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalDedupStream(),
TyperDeduperUtil.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalDedupStream(),
initialState.initialRawTableStatus().getMaxProcessedTimestamp(), "");

getDIFFER().diffFinalTableRecords(
Expand Down Expand Up @@ -739,7 +739,7 @@ public void dst_test_oldSyncRunsBeforeTransition_thenNewSyncRunsBeforeTransition
}
""")));

TypeAndDedupeTransaction.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalDedupStream(),
TyperDeduperUtil.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalDedupStream(),
initialState.initialRawTableStatus().getMaxProcessedTimestamp(), "");

getDIFFER().diffFinalTableRecords(
Expand Down Expand Up @@ -794,7 +794,7 @@ public void dst_test_oldSyncRunsBeforeTransition_thenNewSyncRunsBeforeTransition
}
""")));

TypeAndDedupeTransaction.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalDedupStream(),
TyperDeduperUtil.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalDedupStream(),
initialState2.initialRawTableStatus().getMaxProcessedTimestamp(), "");

getDIFFER().diffFinalTableRecords(
Expand Down Expand Up @@ -946,7 +946,7 @@ public void dst_test_oldSyncRunsThroughTransition_thenNewSyncRuns_append() throw
}
""")));

TypeAndDedupeTransaction.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalAppendStream(),
TyperDeduperUtil.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalAppendStream(),
initialState.initialRawTableStatus().getMaxProcessedTimestamp(), "");

getDIFFER().diffFinalTableRecords(
Expand Down Expand Up @@ -1085,7 +1085,7 @@ public void dst_test_oldSyncRunsBeforeTransition_thenNewSyncRunsThroughTransitio
}
""")));

TypeAndDedupeTransaction.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalAppendStream(),
TyperDeduperUtil.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalAppendStream(),
initialState.initialRawTableStatus().getMaxProcessedTimestamp(), "");

getDIFFER().diffFinalTableRecords(
Expand Down Expand Up @@ -1182,7 +1182,7 @@ public void dst_test_oldSyncRunsBeforeTransition_thenNewSyncRunsBeforeTransition
}
""")));

TypeAndDedupeTransaction.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalAppendStream(),
TyperDeduperUtil.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalAppendStream(),
initialState.initialRawTableStatus().getMaxProcessedTimestamp(), "");

getDIFFER().diffFinalTableRecords(
Expand Down Expand Up @@ -1259,7 +1259,7 @@ public void dst_test_oldSyncRunsBeforeTransition_thenNewSyncRunsBeforeTransition
}
""")));

TypeAndDedupeTransaction.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalAppendStream(),
TyperDeduperUtil.executeTypeAndDedupe(this.getGenerator(), this.getDestinationHandler(), this.getIncrementalAppendStream(),
initialState2.initialRawTableStatus().getMaxProcessedTimestamp(), "");

getDIFFER().diffFinalTableRecords(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ void columnCollision() {
assertEquals(
new StreamConfig(
new StreamId("BAR", "FOO", "airbyte_internal", "bar_raw__stream_foo", "bar", "foo"),
SyncMode.INCREMENTAL,
DestinationSyncMode.APPEND,
emptyList(),
Optional.empty(),
Expand All @@ -88,7 +87,10 @@ void columnCollision() {
put(new ColumnId("_CURRENT_DATE_1", "current_date", "_CURRENT_DATE_1"), AirbyteProtocolType.INTEGER);
}

}),
},
0,
0,
0),
parser.toStreamConfig(new ConfiguredAirbyteStream()
.withSyncMode(SyncMode.INCREMENTAL)
.withDestinationSyncMode(DestinationSyncMode.APPEND)
Expand Down
3 changes: 2 additions & 1 deletion docs/integrations/destinations/snowflake.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ desired namespace.
## Changelog

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

0 comments on commit d3bc50d

Please sign in to comment.