You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If using json, there is also schema per message. It would appear as name of a type (not to be confused as name of a field). See the example below. We are also ignoring this name field in source right now. And only added partial support for it in the sink part recently kafka-cdc-sink: Missing name field in debezium json #13450
Having schema per json message is costly. So debezium does recommend avro or allow disabling schema in json. In the latter case unit info would be unavailable, and we would end up with the same problem here. There is also an existing sink issue requesting the ability to disable. sink message of debezium json without schema field #11539
Not debezium but our upsert json sink does not include schema by default but it can be turned on.
We will focus on the second case here. Below is a message from debezium 2.4 MySQL connector:
xiangjinwu
changed the title
bug: parse timestamp correctly
feat: support kafka-connect schema guided parsing
May 21, 2024
xiangjinwu
changed the title
feat: support kafka-connect schema guided parsing
feat(source): support kafka-connect schema guided debezium parsing
May 21, 2024
When consuming from debezium, the unit info is actually available as part of the schema:
connect.name
extension field. Right now we are ignoring this field, and there is an existing issue for it Add support for Avro schemas using some common Kafka Connect schema names/types #14703schema
per message. It would appear asname
of a type (not to be confused asname
of a field). See the example below. We are also ignoring thisname
field in source right now. And only added partial support for it in the sink part recently kafka-cdc-sink: Missingname
field in debezium json #13450schema
per json message is costly. So debezium does recommend avro or allow disablingschema
in json. In the latter case unit info would be unavailable, and we would end up with the same problem here. There is also an existing sink issue requesting the ability to disable. sink message of debezium json without schema field #11539schema
by default but it can be turned on.We will focus on the second case here. Below is a message from debezium 2.4 MySQL connector:
The relevant part is here:
and
Note the field
after.at
has"type": "int64"
and"name": "io.debezium.time.MicroTimestamp"
The structure of this
schema
field is actually from Java classorg.apache.kafka.connect.json.JsonConverter
:https://github.com/apache/kafka/blob/3.7.0/connect/json/src/main/java/org/apache/kafka/connect/json/JsonConverter.java#L313
Originally posted by @xiangjinwu in #16097 (comment)
The text was updated successfully, but these errors were encountered: