Flink插入MySQL最新数据行

发布于 2025-02-11 07:42:30 字数 169 浏览 1 评论 0原文

我在MySQL中得到了一个建议表,该表中有3列:user_id,item_id,stark,Flink将计算一些建议并在用户单击项目时将结果插入mySQL,我只希望MySQL存储由用户触发的建议。最新点击。我该如何实现这一目标,因为Flink MySQL连接器不删除支持?如果需要大数据计算,在这种情况下,这种框架是否常用?

I got a recommendation table defined in mysql which has 3 columns: user_id, item_id, rank, flink will compute some recommendations and insert the results into mysql when an user clicks an item, I only want the mysql to store the recommendations triggered by the users latest click. How can I achieve that since flink mysql connector doesn's support delete? Is this kind of framework common used in such scenario if big data computing is required?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

苏佲洛 2025-02-18 07:42:30

Flink的MySQL连接器确实支持删除[1]。您必须定义一个主键,然后将执行更新/删除。如果您不提供主键,则连接器将在附录模式下运行。

[1] https:https://nightlies.apace。 org/flink/flink-docs-Master/doc/connectors/table/jdbc/

Flink's MySQL connector does support deletes [1]. You'll have to define a primary key, then it will perform UPDATE/DELETES. If you don't supply a primary key, the connector operates in append mode.

[1] https://nightlies.apache.org/flink/flink-docs-master/docs/connectors/table/jdbc/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文