Destination Oracle: use airbyte default column name + correct ci tests (#5746)
* column name + ci tests * bump version
This commit is contained in:
@@ -2,6 +2,6 @@
|
||||
"destinationDefinitionId": "3986776d-2319-4de9-8af8-db14c0996e72",
|
||||
"name": "Oracle (Alpha)",
|
||||
"dockerRepository": "airbyte/destination-oracle",
|
||||
"dockerImageTag": "0.1.6",
|
||||
"dockerImageTag": "0.1.7",
|
||||
"documentationUrl": "https://docs.airbyte.io/integrations/destinations/oracle"
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
- destinationDefinitionId: 3986776d-2319-4de9-8af8-db14c0996e72
|
||||
name: Oracle (Alpha)
|
||||
dockerRepository: airbyte/destination-oracle
|
||||
dockerImageTag: 0.1.6
|
||||
dockerImageTag: 0.1.7
|
||||
documentationUrl: https://docs.airbyte.io/integrations/destinations/oracle
|
||||
- destinationDefinitionId: 9f760101-60ae-462f-9ee6-b7a9dafd454d
|
||||
name: Kafka
|
||||
|
||||
@@ -8,5 +8,5 @@ COPY build/distributions/${APPLICATION}*.tar ${APPLICATION}.tar
|
||||
|
||||
RUN tar xf ${APPLICATION}.tar --strip-components=1
|
||||
|
||||
LABEL io.airbyte.version=0.1.6
|
||||
LABEL io.airbyte.version=0.1.7
|
||||
LABEL io.airbyte.name=airbyte/destination-oracle
|
||||
|
||||
@@ -40,9 +40,9 @@ public class OracleDestination extends AbstractJdbcDestination implements Destin
|
||||
|
||||
public static final String DRIVER_CLASS = "oracle.jdbc.OracleDriver";
|
||||
|
||||
public static final String COLUMN_NAME_AB_ID = JavaBaseConstants.COLUMN_NAME_AB_ID.substring(1).toUpperCase();
|
||||
public static final String COLUMN_NAME_DATA = JavaBaseConstants.COLUMN_NAME_DATA.substring(1).toUpperCase();
|
||||
public static final String COLUMN_NAME_EMITTED_AT = JavaBaseConstants.COLUMN_NAME_EMITTED_AT.substring(1).toUpperCase();
|
||||
public static final String COLUMN_NAME_AB_ID = "\"" + JavaBaseConstants.COLUMN_NAME_AB_ID.toUpperCase() + "\"";
|
||||
public static final String COLUMN_NAME_DATA = "\"" + JavaBaseConstants.COLUMN_NAME_DATA.toUpperCase() + "\"";
|
||||
public static final String COLUMN_NAME_EMITTED_AT = "\"" + JavaBaseConstants.COLUMN_NAME_EMITTED_AT.toUpperCase() + "\"";
|
||||
|
||||
public OracleDestination() {
|
||||
super(DRIVER_CLASS, new OracleNameTransformer(), new OracleOperations("users"));
|
||||
|
||||
@@ -69,7 +69,7 @@ public class OracleIntegrationTest extends DestinationAcceptanceTest {
|
||||
protected List<JsonNode> retrieveRecords(TestDestinationEnv env, String streamName, String namespace, JsonNode streamSchema) throws Exception {
|
||||
return retrieveRecordsFromTable(namingResolver.getRawTableName(streamName), namespace)
|
||||
.stream()
|
||||
.map(r -> Jsons.deserialize(r.get(OracleDestination.COLUMN_NAME_DATA).asText()))
|
||||
.map(r -> Jsons.deserialize(r.get(OracleDestination.COLUMN_NAME_DATA.replace("\"", "")).asText()))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@@ -111,10 +111,10 @@ public class OracleIntegrationTest extends DestinationAcceptanceTest {
|
||||
}
|
||||
|
||||
private List<JsonNode> retrieveRecordsFromTable(String tableName, String schemaName) throws SQLException {
|
||||
List<org.jooq.Record> result = getDatabase().query(ctx -> ctx
|
||||
.fetch(String.format("SELECT * FROM %s.%s ORDER BY %s ASC", schemaName, tableName, OracleDestination.COLUMN_NAME_EMITTED_AT))
|
||||
.stream()
|
||||
.collect(Collectors.toList()));
|
||||
List<org.jooq.Record> result = getDatabase()
|
||||
.query(ctx -> ctx.fetch(String.format("SELECT * FROM %s.%s ORDER BY %s ASC", schemaName, tableName, OracleDestination.COLUMN_NAME_EMITTED_AT))
|
||||
.stream()
|
||||
.collect(Collectors.toList()));
|
||||
return result
|
||||
.stream()
|
||||
.map(r -> r.formatJSON(JSON_FORMAT))
|
||||
@@ -165,7 +165,6 @@ public class OracleIntegrationTest extends DestinationAcceptanceTest {
|
||||
|
||||
final Database database = getDatabase();
|
||||
var tables = getAllTables(database);
|
||||
tables.removeAll(allTables);
|
||||
try {
|
||||
for (String table : tables) {
|
||||
database.query(ctx -> {
|
||||
|
||||
@@ -62,6 +62,7 @@ You should now have all the requirements needed to configure Oracle as a destina
|
||||
## Changelog
|
||||
| Version | Date | Pull Request | Subject |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| 0.1.7 | 2021-08-30 | [#5746](https://github.com/airbytehq/airbyte/pull/5746) | Use default column name for raw tables |
|
||||
| 0.1.6 | 2021-08-23 | [#5542](https://github.com/airbytehq/airbyte/pull/5542) | Remove support for Oracle 11g to allow normalization |
|
||||
| 0.1.5 | 2021-08-10 | [#5307](https://github.com/airbytehq/airbyte/pull/5307) | 🐛 Destination Oracle: Fix destination check for users without dba role |
|
||||
| 0.1.4 | 2021-07-30 | [#5125](https://github.com/airbytehq/airbyte/pull/5125) | Enable `additionalPropertities` in spec.json |
|
||||
|
||||
Reference in New Issue
Block a user