【问题标题】:use already existing table for Confluent JDBC Sink Connector为 Confluent JDBC Sink Connector 使用现有的表
【发布时间】:2020-07-03 10:02:43
【问题描述】:

根据 confluent docs (https://docs.confluent.io/3.1.1/connect/connect-jdbc/docs/sink_connector.html) 中的示例,我正在尝试找到一个可行的解决方案,在该解决方案中,我可以从以前的遗留系统中重用我已经存在的表,并且来自某个主题的所有消息都应通过“心烦意乱”来编写"进去。

因此,一般而言,基于 confluent 的示例,我如何将主题订单中的所有消息写入名为“myOrders”(已经存在)的表中,而不是在我的数据库中自动创建一个同名的新表主题名称?

【问题讨论】:

    标签: apache-kafka confluent-platform


    【解决方案1】:

    如果表不存在,可以通过在配置中设置 auto.create 为 true 来自动创建表。

    但是,开箱即用的 JDBC Sink 连接器可以重用您的“myOrders”表。

    请看https://docs.confluent.io/current/connect/kafka-connect-jdbc/sink-connector/index.html#auto-creation-and-auto-evoluton

    这适用于当前文档和您链接的 Confluent Platform 3.1.1 版本。

    【讨论】:

      猜你喜欢
      • 2020-12-11
      • 2018-11-02
      • 2021-04-12
      • 2020-03-21
      • 2021-12-21
      • 2020-07-14
      • 2021-09-27
      • 2022-07-12
      • 2018-09-26
      相关资源
      最近更新 更多