Skip to content

Commit 1268c2b

Browse files
committed
tweak snowflake to hide INSERT load method
1 parent 581f389 commit 1268c2b

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

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

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ public class SnowflakeDestination extends SwitchingDestination<SnowflakeDestinat
1818
private static final Logger LOGGER = LoggerFactory.getLogger(SnowflakeDestination.class);
1919

2020
enum DestinationType {
21-
INSERT,
2221
COPY_S3,
2322
COPY_GCS,
2423
INTERNAL_STAGING
@@ -28,7 +27,7 @@ public SnowflakeDestination() {
2827
super(DestinationType.class, SnowflakeDestination::getTypeFromConfig, getTypeToDestination());
2928
}
3029

31-
public static DestinationType getTypeFromConfig(final JsonNode config) {
30+
private static DestinationType getTypeFromConfig(final JsonNode config) {
3231
if (isS3Copy(config)) {
3332
return DestinationType.COPY_S3;
3433
} else if (isGcsCopy(config)) {
@@ -38,11 +37,6 @@ public static DestinationType getTypeFromConfig(final JsonNode config) {
3837
}
3938
}
4039

41-
public static boolean isInternalStaging(final JsonNode config) {
42-
return config.has("loading_method") && config.get("loading_method").isObject()
43-
&& config.get("loading_method").get("method").asText().equals("Internal Staging");
44-
}
45-
4640
public static boolean isS3Copy(final JsonNode config) {
4741
return config.has("loading_method") && config.get("loading_method").isObject() && config.get("loading_method").has("s3_bucket_name");
4842
}
@@ -51,14 +45,12 @@ public static boolean isGcsCopy(final JsonNode config) {
5145
return config.has("loading_method") && config.get("loading_method").isObject() && config.get("loading_method").has("project_id");
5246
}
5347

54-
public static Map<DestinationType, Destination> getTypeToDestination() {
55-
final SnowflakeInsertDestination insertDestination = new SnowflakeInsertDestination();
48+
private static Map<DestinationType, Destination> getTypeToDestination() {
5649
final SnowflakeCopyS3Destination copyS3Destination = new SnowflakeCopyS3Destination();
5750
final SnowflakeCopyGcsDestination copyGcsDestination = new SnowflakeCopyGcsDestination();
5851
final SnowflakeInternalStagingDestination internalStagingDestination = new SnowflakeInternalStagingDestination();
5952

6053
return ImmutableMap.of(
61-
DestinationType.INSERT, insertDestination,
6254
DestinationType.COPY_S3, copyS3Destination,
6355
DestinationType.COPY_GCS, copyGcsDestination,
6456
DestinationType.INTERNAL_STAGING, internalStagingDestination);

airbyte-integrations/connectors/destination-snowflake/src/main/resources/spec.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@
9494
}
9595
},
9696
{
97-
"title": "Standard Inserts",
97+
"title": "Please select another option",
9898
"additionalProperties": false,
99-
"description": "Uses <pre>INSERT</pre> statements to send batches of records to Snowflake. Easiest (no setup) but not recommended for large production workloads due to slow speed.",
99+
"description": "Please select another option",
100100
"required": ["method"],
101101
"properties": {
102102
"method": {

0 commit comments

Comments
 (0)