Skip to content

Commit

Permalink
bump versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jbfbell committed Apr 10, 2024
1 parent 7ecb1d3 commit 4c6c8cc
Show file tree
Hide file tree
Showing 15 changed files with 392 additions and 106 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ plugins {
}

airbyteJavaConnector {
cdkVersionRequired = '0.2.0'
features = ['db-destinations']
cdkVersionRequired = '0.29.10'
features = ['db-destinations', 's3-destinations', 'typing-deduping']
useLocalCdk = false
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,23 @@ data:
connectorSubtype: database
connectorType: destination
definitionId: 3986776d-2319-4de9-8af8-db14c0996e72
dockerImageTag: 0.2.0
dockerImageTag: 1.0.0
dockerRepository: airbyte/destination-oracle-strict-encrypt
githubIssueLabel: destination-oracle
icon: oracle.svg
license: ELv2
name: Oracle
normalizationConfig:
normalizationIntegrationType: oracle
normalizationRepository: airbyte/normalization-oracle
normalizationTag: 0.4.1
releaseStage: alpha
releases:
breakingChanges:
1.0.0:
upgradeDeadline: "2024-05-01"
message: >
This version removes the option to use "normalization" with Oracle. It also changes
the schema and database of Airbyte's "raw" tables to be compatible with the new
[Destinations V2](https://docs.airbyte.com/release_notes/upgrading_to_destinations_v2/#what-is-destinations-v2)
format. These changes will likely require updates to downstream dbt / SQL models.
Selecting `Upgrade` will upgrade **all** connections using this destination at their next sync.
documentationUrl: https://docs.airbyte.com/integrations/destinations/oracle
supportsDbt: true
tags:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@
import io.airbyte.cdk.db.jdbc.DefaultJdbcDatabase;
import io.airbyte.cdk.db.jdbc.JdbcDatabase;
import io.airbyte.cdk.db.jdbc.JdbcUtils;
import io.airbyte.cdk.integrations.base.JavaBaseConstants;
import io.airbyte.cdk.integrations.destination.StandardNameTransformer;
import io.airbyte.cdk.integrations.standardtest.destination.DestinationAcceptanceTest;
import io.airbyte.commons.json.Jsons;
import io.airbyte.commons.string.Strings;
import io.airbyte.integrations.destination.oracle.OracleDestination;
import io.airbyte.integrations.destination.oracle.OracleNameTransformer;
import java.sql.SQLException;
import java.time.Duration;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
Expand Down Expand Up @@ -73,7 +74,7 @@ protected List<JsonNode> retrieveRecords(final TestDestinationEnv env,
return retrieveRecordsFromTable(namingResolver.getRawTableName(streamName), namespace)
.stream()
.map(r -> Jsons.deserialize(
r.get(OracleDestination.COLUMN_NAME_DATA.replace("\"", "")).asText()))
r.get(JavaBaseConstants.COLUMN_NAME_DATA).asText()))
.collect(Collectors.toList());
}

Expand Down Expand Up @@ -113,16 +114,15 @@ protected List<String> resolveIdentifier(final String identifier) {

private List<JsonNode> retrieveRecordsFromTable(final String tableName, final String schemaName)
throws SQLException {
final String query = String.format("SELECT * FROM %s.%s ORDER BY %s ASC", schemaName, tableName, OracleDestination.COLUMN_NAME_EMITTED_AT);

try (final DSLContext dslContext = getDslContext(config)) {
final List<org.jooq.Record> result = getDatabase(dslContext).query(ctx -> ctx.fetch(query).stream().toList());
return result
.stream()
.map(r -> r.formatJSON(JSON_FORMAT))
.map(Jsons::deserialize)
.collect(Collectors.toList());
}
final String query =
String.format("SELECT * FROM %s.%s ORDER BY %s ASC", schemaName, tableName, JavaBaseConstants.COLUMN_NAME_AB_EXTRACTED_AT.toUpperCase());
final DSLContext dslContext = getDslContext(config);
final List<org.jooq.Record> result = getDatabase(dslContext).query(ctx -> ctx.fetch(query).stream().toList());
return result
.stream()
.map(r -> r.formatJSON(JSON_FORMAT))
.map(Jsons::deserialize)
.collect(Collectors.toList());
}

private static Database getDatabase(final DSLContext dslContext) {
Expand Down Expand Up @@ -151,15 +151,13 @@ protected void setup(final TestDestinationEnv testEnv, final HashSet<String> TES
db.start();

config = getConfig(db);
final DSLContext dslContext = getDslContext(config);
final Database database = getDatabase(dslContext);
database.query(
ctx -> ctx.fetch(String.format("CREATE USER %s IDENTIFIED BY %s", schemaName, schemaName)));
database.query(ctx -> ctx.fetch(String.format("GRANT ALL PRIVILEGES TO %s", schemaName)));

try (final DSLContext dslContext = getDslContext(config)) {
final Database database = getDatabase(dslContext);
database.query(
ctx -> ctx.fetch(String.format("CREATE USER %s IDENTIFIED BY %s", schemaName, schemaName)));
database.query(ctx -> ctx.fetch(String.format("GRANT ALL PRIVILEGES TO %s", schemaName)));

((ObjectNode) config).put(JdbcUtils.SCHEMA_KEY, dbName);
}
((ObjectNode) config).put(JdbcUtils.SCHEMA_KEY, dbName);
}

@Override
Expand All @@ -182,7 +180,8 @@ public void testEncryption() throws SQLException {
config.get(JdbcUtils.PORT_KEY).asInt(),
config.get("sid").asText()),
JdbcUtils.parseJdbcParameters("oracle.net.encryption_client=REQUIRED;" +
"oracle.net.encryption_types_client=( " + algorithm + " )", ";"));
"oracle.net.encryption_types_client=( " + algorithm + " )", ";"),
Duration.ofMinutes(5));
final JdbcDatabase database = new DefaultJdbcDatabase(dataSource);

final String networkServiceBanner =
Expand All @@ -208,7 +207,8 @@ public void testCheckProtocol() throws SQLException {
config.get(JdbcUtils.PORT_KEY).asInt(),
config.get("sid").asText()),
JdbcUtils.parseJdbcParameters("oracle.net.encryption_client=REQUIRED;" +
"oracle.net.encryption_types_client=( " + algorithm + " )", ";"));
"oracle.net.encryption_types_client=( " + algorithm + " )", ";"),
Duration.ofMinutes(5));
final JdbcDatabase database = new DefaultJdbcDatabase(dataSource);

final String networkServiceBanner = "SELECT sys_context('USERENV', 'NETWORK_PROTOCOL') as network_protocol FROM dual";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,126 @@
"examples": ["airbyte"],
"default": "airbyte",
"order": 6
},
"raw_data_schema": {
"type": "string",
"description": "The schema to write raw tables into (default: airbyte_internal)",
"title": "Raw Table Schema Name",
"order": 7
},
"tunnel_method": {
"type": "object",
"title": "SSH Tunnel Method",
"description": "Whether to initiate an SSH tunnel before connecting to the database, and if so, which kind of authentication to use.",
"oneOf": [
{
"title": "No Tunnel",
"required": ["tunnel_method"],
"properties": {
"tunnel_method": {
"description": "No ssh tunnel needed to connect to database",
"type": "string",
"const": "NO_TUNNEL",
"order": 0
}
}
},
{
"title": "SSH Key Authentication",
"required": [
"tunnel_method",
"tunnel_host",
"tunnel_port",
"tunnel_user",
"ssh_key"
],
"properties": {
"tunnel_method": {
"description": "Connect through a jump server tunnel host using username and ssh key",
"type": "string",
"const": "SSH_KEY_AUTH",
"order": 0
},
"tunnel_host": {
"title": "SSH Tunnel Jump Server Host",
"description": "Hostname of the jump server host that allows inbound ssh tunnel.",
"type": "string",
"order": 1
},
"tunnel_port": {
"title": "SSH Connection Port",
"description": "Port on the proxy/jump server that accepts inbound ssh connections.",
"type": "integer",
"minimum": 0,
"maximum": 65536,
"default": 22,
"examples": ["22"],
"order": 2
},
"tunnel_user": {
"title": "SSH Login Username",
"description": "OS-level username for logging into the jump server host.",
"type": "string",
"order": 3
},
"ssh_key": {
"title": "SSH Private Key",
"description": "OS-level user account ssh key credentials in RSA PEM format ( created with ssh-keygen -t rsa -m PEM -f myuser_rsa )",
"type": "string",
"airbyte_secret": true,
"multiline": true,
"order": 4
}
}
},
{
"title": "Password Authentication",
"required": [
"tunnel_method",
"tunnel_host",
"tunnel_port",
"tunnel_user",
"tunnel_user_password"
],
"properties": {
"tunnel_method": {
"description": "Connect through a jump server tunnel host using username and password authentication",
"type": "string",
"const": "SSH_PASSWORD_AUTH",
"order": 0
},
"tunnel_host": {
"title": "SSH Tunnel Jump Server Host",
"description": "Hostname of the jump server host that allows inbound ssh tunnel.",
"type": "string",
"order": 1
},
"tunnel_port": {
"title": "SSH Connection Port",
"description": "Port on the proxy/jump server that accepts inbound ssh connections.",
"type": "integer",
"minimum": 0,
"maximum": 65536,
"default": 22,
"examples": ["22"],
"order": 2
},
"tunnel_user": {
"title": "SSH Login Username",
"description": "OS-level username for logging into the jump server host",
"type": "string",
"order": 3
},
"tunnel_user_password": {
"title": "Password",
"description": "OS-level password for logging into the jump server host",
"type": "string",
"airbyte_secret": true,
"order": 4
}
}
}
]
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ plugins {
}

airbyteJavaConnector {
cdkVersionRequired = '0.2.0'
features = ['db-destinations']
cdkVersionRequired = '0.29.10'
features = ['db-destinations', 's3-destinations', 'typing-deduping']
useLocalCdk = false
}

Expand Down
16 changes: 11 additions & 5 deletions airbyte-integrations/connectors/destination-oracle/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@ data:
connectorSubtype: database
connectorType: destination
definitionId: 3986776d-2319-4de9-8af8-db14c0996e72
dockerImageTag: 0.2.0
dockerImageTag: 1.0.0
dockerRepository: airbyte/destination-oracle
githubIssueLabel: destination-oracle
icon: oracle.svg
license: ELv2
name: Oracle
normalizationConfig:
normalizationIntegrationType: oracle
normalizationRepository: airbyte/normalization-oracle
normalizationTag: 0.4.3
registries:
cloud:
dockerRepository: airbyte/destination-oracle-strict-encrypt
Expand All @@ -21,6 +17,16 @@ data:
releaseStage: alpha
documentationUrl: https://docs.airbyte.com/integrations/destinations/oracle
supportsDbt: true
releases:
breakingChanges:
1.0.0:
upgradeDeadline: "2024-05-01"
message: >
This version removes the option to use "normalization" with Oracle. It also changes
the schema and database of Airbyte's "raw" tables to be compatible with the new
[Destinations V2](https://docs.airbyte.com/release_notes/upgrading_to_destinations_v2/#what-is-destinations-v2)
format. These changes will likely require updates to downstream dbt / SQL models.
Selecting `Upgrade` will upgrade **all** connections using this destination at their next sync.
tags:
- language:java
ab_internal:
Expand Down
Loading

0 comments on commit 4c6c8cc

Please sign in to comment.