Skip to content

Commit

Permalink
Destination Clickhouse: enable normalization for Secure connections (#…
Browse files Browse the repository at this point in the history
…10754)

* Clickhouse Destination: enable normalization for Secure connections

* bump normalization version

* run mypy check

* add lib

* install stubs running mypy

* rollback gradlew command

Co-authored-by: marcosmarxm <marcosmarxm@gmail.com>
  • Loading branch information
kzzzr and marcosmarxm committed Mar 5, 2022
1 parent fbe084f commit e34c357
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion airbyte-integrations/bases/base-normalization/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ WORKDIR /airbyte
ENV AIRBYTE_ENTRYPOINT "/airbyte/entrypoint.sh"
ENTRYPOINT ["/airbyte/entrypoint.sh"]

LABEL io.airbyte.version=0.1.68
LABEL io.airbyte.version=0.1.69
LABEL io.airbyte.name=airbyte/normalization
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ def transform_clickhouse(config: Dict[str, Any]):
"port": config["port"],
"schema": config["database"],
"user": config["username"],
"secure": config["ssl"],
}
if "password" in config:
dbt_config["password"] = config["password"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,23 @@ def test_transform_mssql(self):
# DBT schema is equivalent to MySQL database
assert extract_schema(actual) == "my_db"

def test_transform_clickhouse(self):
input = {"host": "airbyte.io", "port": 9440, "database": "default", "username": "ch", "password": "password1234", "ssl": True}

actual = TransformConfig().transform_clickhouse(input)
expected = {
"type": "clickhouse",
"host": "airbyte.io",
"port": 9440,
"schema": "default",
"user": "ch",
"password": "password1234",
"secure": True,
}

assert expected == actual
assert extract_schema(actual) == "default"

# test that the full config is produced. this overlaps slightly with the transform_postgres test.
def test_transform(self):
input = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
public class NormalizationRunnerFactory {

public static final String BASE_NORMALIZATION_IMAGE_NAME = "airbyte/normalization";
public static final String NORMALIZATION_VERSION = "0.1.68";
public static final String NORMALIZATION_VERSION = "0.1.69";

static final Map<String, ImmutablePair<String, DefaultNormalizationRunner.DestinationType>> NORMALIZATION_MAPPING =
ImmutableMap.<String, ImmutablePair<String, DefaultNormalizationRunner.DestinationType>>builder()
Expand Down

0 comments on commit e34c357

Please sign in to comment.