Skip to content

Commit

Permalink
Source-oracle: fixed checkstyle and added a changelog info
Browse files Browse the repository at this point in the history
  • Loading branch information
etsybaev committed Jun 22, 2022
1 parent cdecf7b commit 6db554f
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 22 deletions.
Expand Up @@ -76,7 +76,7 @@ public JsonNode toJdbcConfig(final JsonNode config) {
.put("schema", schema);

if (config.has(JDBC_URL_PARAMS_KEY)) {
//configBuilder.put("connection_properties", config.get(JDBC_URL_PARAMS_KEY));
// configBuilder.put("connection_properties", config.get(JDBC_URL_PARAMS_KEY));
configBuilder.put(JDBC_URL_PARAMS_KEY, config.get(JDBC_URL_PARAMS_KEY));
}

Expand Down
Expand Up @@ -191,24 +191,24 @@ void testExtraParams() {

private JsonNode buildConfigNoJdbcParameters() {
return Jsons.jsonNode(com.google.common.collect.ImmutableMap.of(
"ssl_method", "ssl_method",
"host", "localhost",
"port", "1773",
"database", "db",
"username", "username",
"password", "verysecure"));
"ssl_method", "ssl_method",
"host", "localhost",
"port", "1773",
"database", "db",
"username", "username",
"password", "verysecure"));
}

private JsonNode buildConfigWithExtraJdbcParameters(String extraParam) {

return Jsons.jsonNode(com.google.common.collect.ImmutableMap.of(
"ssl_method", "ssl_method",
"host", "localhost",
"port", "1773",
"database", "db",
"username", "username",
"password", "verysecure",
"jdbc_url_params", extraParam));
"ssl_method", "ssl_method",
"host", "localhost",
"port", "1773",
"database", "db",
"username", "username",
"password", "verysecure",
"jdbc_url_params", extraParam));
}

}
Expand Up @@ -33,7 +33,6 @@
import java.util.Map;
import java.util.Set;
import java.util.UUID;

import org.joda.time.DateTime;

public class SnowflakeGcsStagingSqlOperations extends SnowflakeSqlOperations implements StagingOperations {
Expand Down
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-dockerhub/main.py
@@ -1,5 +1,5 @@
#
# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
# Copyright (c) 2022 Airbyte, Inc., all rights reserved.
#


Expand Down
@@ -1,6 +1,7 @@
#
# Copyright (c) 2022 Airbyte, Inc., all rights reserved.
#

import logging
from typing import Any, Iterable, List, Mapping, Optional, Tuple
from urllib.parse import urlparse
Expand Down
@@ -1,5 +1,5 @@
#
# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
# Copyright (c) 2022 Airbyte, Inc., all rights reserved.
#

from unittest.mock import MagicMock
Expand All @@ -9,7 +9,9 @@

def test_check_connection():
source = SourceDockerhub()
logger_mock, config_mock = MagicMock(), {"docker_username": "airbyte"} # shouldnt actually ping network request in test but we will skip for now
logger_mock, config_mock = MagicMock(), {
"docker_username": "airbyte"
} # shouldnt actually ping network request in test but we will skip for now
assert source.check_connection(logger_mock, config_mock) == (True, None)


Expand Down
Expand Up @@ -88,7 +88,7 @@
}
}
},
"bid_strategy" : {
"bid_strategy": {
"type": ["null", "string"]
},
"bid_amount": {
Expand Down
@@ -1,10 +1,10 @@
{
"start_date": "2021-08-01",
"account_ids": [1,2],
"account_ids": [1, 2],
"credentials": {
"auth_method": "oAuth2.0",
"client_id": "client_id",
"client_secret": "client_secret",
"refresh_token": "refresh_token"
}
}
}
Expand Up @@ -100,7 +100,8 @@ public void setup() throws Exception {

protected void incrementalDateCheck() throws Exception {
// https://stackoverflow.com/questions/47712930/resultset-meta-data-return-timestamp-instead-of-date-oracle-jdbc
// Oracle DATE is a java.sql.Timestamp (java.sql.Types.TIMESTAMP) as far as JDBC (and the SQL standard) is concerned as it has both a date and time component.
// Oracle DATE is a java.sql.Timestamp (java.sql.Types.TIMESTAMP) as far as JDBC (and the SQL
// standard) is concerned as it has both a date and time component.
incrementalCursorCheck(
COL_UPDATED_AT,
"2005-10-18T00:00:00.000000Z",
Expand Down
1 change: 1 addition & 0 deletions docs/integrations/sources/oracle.md
Expand Up @@ -132,6 +132,7 @@ Airbite has the ability to connect to the Oracle source with 3 network connectiv

| Version | Date | Pull Request | Subject |
|:--------| :--- | :--- |:------------------------------------------------|
| 0.3.16 | 2022-06-22 | [13997](https://github.com/airbytehq/airbyte/pull/13997) | Fixed tests |
| 0.3.15 | 2022-04-29 | [12480](https://github.com/airbytehq/airbyte/pull/12480) | Query tables with adaptive fetch size to optimize JDBC memory consumption |
| 0.3.14 | 2022-02-21 | [10242](https://github.com/airbytehq/airbyte/pull/10242) | Fixed cursor for old connectors that use non-microsecond format. Now connectors work with both formats |
| 0.3.13 | 2022-02-18 | [10242](https://github.com/airbytehq/airbyte/pull/10242) | Updated timestamp transformation with microseconds |
Expand Down

0 comments on commit 6db554f

Please sign in to comment.