Routine Load处理Flink CDC debezium格式的删除的情况 #52942
Unanswered
liuxuzxx
asked this question in
A - General / Q&A
Replies: 1 comment
-
|
目前想到了一个方案: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Flink CDC 3在做同步的时候,能够获取到数据库的:insert,update,delete操作。目前发现debezium对应的三种格式如下
{ "before": null, "after": { "user_id": 5859346, "enterprise_id": 192661, "timeinterval": 30, ......还有很多字段,省略 }, "op": "c", "source": { "db": null, "table": "kafka_gsms_user_info" } }{ "before": { "user_id":5859346, "enterprise_id": 192661, "timeinterval": 90, ......省略 }, "after": { "user_id": 5859346, "enterprise_id": 192661, "timeinterval": 30, ......还有很多字段,省略 }, "op": "u", "source": { "db": null, "table": "kafka_gsms_user_info" } }{ "before": { "user_id":5859346, "enterprise_id": 192661, "timeinterval": 90, ......省略 }, "after": null, "op": "u", "source": { "db": null, "table": "kafka_gsms_user_info" } }对应给出的Routine Load为:
问题是:
这种Routine Load的写法,能够处理: insert和update操作,因为能够获取到$.after .但是无法处理delete的操作,因为delete的时候 $.after是null,会报错
但是insert/update/delete的CDC都会投递到同一个Topic,这种怎么处理?我翻了下Doris的官方文档,没有看到能够兼容处理insert/update和delete的事件
Beta Was this translation helpful? Give feedback.
All reactions