Flink插入MySQL最新数据行
我在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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
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/