Why ClickHouseSinkConnector with Debezium PostgresConnector can not sink for JSONB to Nested field in Clickhouse? #415
-
Hi I get this issue from Kafka connect sink: create table test
(
id bigserial
primary key,
status varchar(16) not null,
items jsonb not null
); this table in Clickhouse create or replace table testing.`demo_db.public.test`(
`before.id` Nullable(Int64),
`before.items` Nested(guid UUID,
product_name String,
product_id Nullable(String)),
`after.id` Nullable(Int64),
`after.status` Nullable(String),
`after.items` Nested(guid UUID,
product_name String,
product_id Nullable(String)),
ts_ms Int64,
op LowCardinality(String)
)
engine MergeTree
order by tuple(); and this is kafka connect sink clickhouse config:
When I try to insert new data in Postgres, they can not sink to Clickhouse because Clickhouse cannot insert null into Nested field. Any suggestion for me? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
As a quick aid, can you flatten those fields? |
Beta Was this translation helpful? Give feedback.
As a quick aid, can you flatten those fields?
For example
before.items.product_name
andbefore.items.product_id
maybe usingIf you are getting an error from Connect, please open an issue with detailed info so we can reproduce and fix it.