Skip to content

Commit ebbc070

Browse files
committed
Added supported types. Added annotation about JSON conversion
1 parent 0ac3e12 commit ebbc070

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/integrations/data-ingestion/kafka/kafka-clickhouse-connect-sink.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ Sink, use [Kafka Connect Transformations](https://docs.confluent.io/platform/cur
136136
| Kafka Connect Type | ClickHouse Type | Supported | Primitive |
137137
| --------------------------------------- |-----------------------| --------- | --------- |
138138
| STRING | String || Yes |
139+
| STRING | JSON (1) || Yes |
139140
| INT8 | Int8 || Yes |
140141
| INT16 | Int16 || Yes |
141142
| INT32 | Int32 || Yes |
@@ -148,11 +149,16 @@ Sink, use [Kafka Connect Transformations](https://docs.confluent.io/platform/cur
148149
| STRUCT | Variant(T1, T2, ...) || No |
149150
| STRUCT | Tuple(a T1, b T2, ...) || No |
150151
| STRUCT | Nested(a T1, b T2, ...) || No |
152+
| STRUCT | JSON (1) (2) || No |
151153
| BYTES | String || No |
152154
| org.apache.kafka.connect.data.Time | Int64 / DateTime64 || No |
153155
| org.apache.kafka.connect.data.Timestamp | Int32 / Date32 || No |
154156
| org.apache.kafka.connect.data.Decimal | Decimal || No |
155157

158+
- (1) - JSON is supported only when ClickHouse settings has `input_format_binary_read_json_as_string=1`. This works only for RowBinary format family and the setting affects all columns in the insert request so they all should be a string. Connector will convert STRUCT to a JSON string in this case.
159+
160+
- (2) - When struct has unions like `oneof` then converter should be configured to NOT add prefix/suffix to a field names. There is `generate.index.for.unions=fals` setting for `ProtobufConverter`.
161+
156162
**Without a schema declared:**
157163

158164
A record is converted into JSON and sent to ClickHouse as a value in [JSONEachRow](../../../sql-reference/formats.mdx#jsoneachrow) format.

0 commit comments

Comments
 (0)