-
Notifications
You must be signed in to change notification settings - Fork 998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Kafka debezium json supports automatic discovery of primary keys #2815
Conversation
c341796
to
5ba8031
Compare
1d483f3
to
6b0aa0d
Compare
dd5d186
to
138732c
Compare
Provide a demo of cdc to kafka to automatically retrieve the table primary key from MySQL and add the pkNames node to the binlog |
@jiangjin-f When Debezium's data is written into Kafka, the primary key will be automatically stored in the key. When Paimon parses Kafka messages, the data in the key will be attached to the ’pkNames‘ field in the value . There are some demos in unit testing |
0944bbe
to
71890b5
Compare
71890b5
to
2232472
Compare
Seemed that still not committed into master branch, i hope it could get the primary key from kafka key , not from the kafka value, because the Debezium format doesn't contain the pknames |
我尝试实现DebeziumDeserializationSchema, 在deserialize 重载方法中获取keys ,按照Canal format 在payload嵌入pkNames,然后使用paimon的kafka_sync_database可以实现从Debezium-json获得主键建表
|
Purpose
Linked issue: close #2802
Tests
API and Format
Documentation