-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into ddavydov/#12591-sou…
…rce-zendesk-support-upd-cdk-version
- Loading branch information
Showing
77 changed files
with
1,227 additions
and
305 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 0 additions & 69 deletions
69
.../main/java/io/airbyte/integrations/destination/snowflake/SnowflakeCopyGcsDestination.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +0,0 @@ | ||
/* | ||
* Copyright (c) 2022 Airbyte, Inc., all rights reserved. | ||
*/ | ||
|
||
package io.airbyte.integrations.destination.snowflake; | ||
|
||
import com.fasterxml.jackson.databind.JsonNode; | ||
import io.airbyte.db.jdbc.JdbcDatabase; | ||
import io.airbyte.integrations.base.AirbyteMessageConsumer; | ||
import io.airbyte.integrations.destination.ExtendedNameTransformer; | ||
import io.airbyte.integrations.destination.jdbc.SqlOperations; | ||
import io.airbyte.integrations.destination.jdbc.copy.CopyConsumerFactory; | ||
import io.airbyte.integrations.destination.jdbc.copy.CopyDestination; | ||
import io.airbyte.integrations.destination.jdbc.copy.gcs.GcsConfig; | ||
import io.airbyte.integrations.destination.jdbc.copy.gcs.GcsStreamCopier; | ||
import io.airbyte.protocol.models.AirbyteMessage; | ||
import io.airbyte.protocol.models.ConfiguredAirbyteCatalog; | ||
import java.util.function.Consumer; | ||
import javax.sql.DataSource; | ||
|
||
public class SnowflakeCopyGcsDestination extends CopyDestination { | ||
|
||
@Override | ||
public AirbyteMessageConsumer getConsumer(final JsonNode config, | ||
final ConfiguredAirbyteCatalog catalog, | ||
final Consumer<AirbyteMessage> outputRecordCollector) { | ||
final DataSource dataSource = getDataSource(config); | ||
return CopyConsumerFactory.create( | ||
outputRecordCollector, | ||
dataSource, | ||
getDatabase(dataSource), | ||
getSqlOperations(), | ||
getNameTransformer(), | ||
GcsConfig.getGcsConfig(config), | ||
catalog, | ||
new SnowflakeGcsStreamCopierFactory(), | ||
getConfiguredSchema(config)); | ||
} | ||
|
||
@Override | ||
public void checkPersistence(final JsonNode config) throws Exception { | ||
GcsStreamCopier.attemptWriteToPersistence(GcsConfig.getGcsConfig(config)); | ||
} | ||
|
||
@Override | ||
public ExtendedNameTransformer getNameTransformer() { | ||
return new SnowflakeSQLNameTransformer(); | ||
} | ||
|
||
@Override | ||
public DataSource getDataSource(final JsonNode config) { | ||
return SnowflakeDatabase.createDataSource(config); | ||
} | ||
|
||
@Override | ||
public JdbcDatabase getDatabase(final DataSource dataSource) { | ||
return SnowflakeDatabase.getDatabase(dataSource); | ||
} | ||
|
||
@Override | ||
public SqlOperations getSqlOperations() { | ||
return new SnowflakeSqlOperations(); | ||
} | ||
|
||
private String getConfiguredSchema(final JsonNode config) { | ||
return config.get("schema").asText(); | ||
} | ||
|
||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.