Skip to content

Commit 7727b86

Browse files
Include tcp port in Clickhouse destination configuration for normalization (#9340)
* Include tcp port in Clickhouse destination configuration for normalization * revert custom dbt on clickhouse * Bumpversion of destination connector * Format code
1 parent 5ffc880 commit 7727b86

File tree

11 files changed

+58
-113
lines changed

11 files changed

+58
-113
lines changed

airbyte-config/init/src/main/resources/seed/destination_definitions.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
- name: Clickhouse
3838
destinationDefinitionId: ce0d828e-1dc4-496c-b122-2da42e637e48
3939
dockerRepository: airbyte/destination-clickhouse
40-
dockerImageTag: 0.1.1
40+
dockerImageTag: 0.1.2
4141
documentationUrl: https://docs.airbyte.io/integrations/destinations/clickhouse
4242
- name: DynamoDB
4343
destinationDefinitionId: 8ccd8909-4e99-4141-b48d-4984b70b2d89

airbyte-config/init/src/main/resources/seed/destination_specs.yaml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@
646646
supported_destination_sync_modes:
647647
- "overwrite"
648648
- "append"
649-
- dockerImage: "airbyte/destination-clickhouse:0.1.1"
649+
- dockerImage: "airbyte/destination-clickhouse:0.1.2"
650650
spec:
651651
documentationUrl: "https://docs.airbyte.io/integrations/destinations/clickhouse"
652652
connectionSpecification:
@@ -675,28 +675,38 @@
675675
examples:
676676
- "8123"
677677
order: 1
678+
tcp-port:
679+
title: "Native Port"
680+
description: "Native port (not the JDBC) of the database."
681+
type: "integer"
682+
minimum: 0
683+
maximum: 65536
684+
default: 9000
685+
examples:
686+
- "9000"
687+
order: 2
678688
database:
679689
title: "DB Name"
680690
description: "Name of the database."
681691
type: "string"
682-
order: 2
692+
order: 3
683693
username:
684694
title: "User"
685695
description: "Username to use to access the database."
686696
type: "string"
687-
order: 3
697+
order: 4
688698
password:
689699
title: "Password"
690700
description: "Password associated with the username."
691701
type: "string"
692702
airbyte_secret: true
693-
order: 4
703+
order: 5
694704
ssl:
695705
title: "SSL Connection"
696706
description: "Encrypt data using SSL."
697707
type: "boolean"
698708
default: false
699-
order: 5
709+
order: 6
700710
tunnel_method:
701711
type: "object"
702712
title: "SSH Tunnel Method"

airbyte-integrations/bases/base-normalization/normalization/transform_config/transform.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,8 @@ def transform_clickhouse(config: Dict[str, Any]):
277277
"user": config["username"],
278278
"password": config["password"],
279279
}
280+
if "tcp-port" in config:
281+
dbt_config["port"] = config["tcp-port"]
280282
return dbt_config
281283

282284
@staticmethod

airbyte-integrations/connectors/destination-bigquery-denormalized/src/main/java/io/airbyte/integrations/destination/bigquery/formatter/DefaultBigQueryDenormalizedRecordFormatter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ private JsonNode getObjectNode(final FieldList fields, final JsonNode root) {
191191

192192
@Override
193193
public Schema getBigQuerySchema(final JsonNode jsonSchema) {
194-
final List<Field> fieldList = getSchemaFields(namingResolver, jsonSchema);
194+
final List<Field> fieldList = getSchemaFields(namingResolver, jsonSchema);
195195
if (fieldList.stream().noneMatch(f -> f.getName().equals(JavaBaseConstants.COLUMN_NAME_AB_ID))) {
196196
fieldList.add(Field.of(JavaBaseConstants.COLUMN_NAME_AB_ID, StandardSQLTypeName.STRING));
197197
}

airbyte-integrations/connectors/destination-clickhouse/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ ENV APPLICATION destination-clickhouse
1616

1717
COPY --from=build /airbyte /airbyte
1818

19-
LABEL io.airbyte.version=0.1.1
19+
LABEL io.airbyte.version=0.1.2
2020
LABEL io.airbyte.name=airbyte/destination-clickhouse

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

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,31 +27,41 @@
2727
"examples": ["8123"],
2828
"order": 1
2929
},
30+
"tcp-port": {
31+
"title": "Native Port",
32+
"description": "Native port (not the JDBC) of the database.",
33+
"type": "integer",
34+
"minimum": 0,
35+
"maximum": 65536,
36+
"default": 9000,
37+
"examples": ["9000"],
38+
"order": 2
39+
},
3040
"database": {
3141
"title": "DB Name",
3242
"description": "Name of the database.",
3343
"type": "string",
34-
"order": 2
44+
"order": 3
3545
},
3646
"username": {
3747
"title": "User",
3848
"description": "Username to use to access the database.",
3949
"type": "string",
40-
"order": 3
50+
"order": 4
4151
},
4252
"password": {
4353
"title": "Password",
4454
"description": "Password associated with the username.",
4555
"type": "string",
4656
"airbyte_secret": true,
47-
"order": 4
57+
"order": 5
4858
},
4959
"ssl": {
5060
"title": "SSL Connection",
5161
"description": "Encrypt data using SSL.",
5262
"type": "boolean",
5363
"default": false,
54-
"order": 5
64+
"order": 6
5565
}
5666
}
5767
}

airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/streams.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,4 +644,4 @@ def request_params(
644644
return params
645645

646646
def parse_response(self, response: requests.Response, stream_state: Mapping[str, Any], **kwargs) -> Iterable[Mapping]:
647-
yield from response.json().get(self.data_field, {}).get("shippingLabels", [])
647+
yield from response.json().get(self.data_field, {}).get("shippingLabels", [])

airbyte-integrations/connectors/source-github/unit_tests/test_stream.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#
22
# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
33
#
4+
45
from http import HTTPStatus
56
from unittest.mock import patch
67

airbyte-integrations/connectors/source-jira/source_jira/source.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def streams(self, config: Mapping[str, Any]) -> List[Stream]:
107107
**incremental_args,
108108
additional_fields=config.get("additional_fields", []),
109109
expand_changelog=config.get("expand_issue_changelog", False),
110-
render_fields=render_fields
110+
render_fields=render_fields,
111111
)
112112
issue_fields_stream = IssueFields(**args)
113113
experimental_streams = []

0 commit comments

Comments
 (0)