【发布时间】:2021-06-27 23:19:06
【问题描述】:
我正在使用 JDBC 接收器连接器将数据写入 postgresql。
连接器工作正常,但似乎连接器只能将数据写入名为 public 的默认 postgresql 模式
这是 postgresql 的常用 JDBC URL 格式。
jdbc:postgresql://<host>:<port5432>/<database>
是否可以明确定义我需要 postgresql 接收器连接器写入的模式名称?
更新:
谢谢@Laurenz Albe 的提示。我可以在 jdbc 连接 URL 中定义 search_path,如下所示:
jdbc:postgresql://<host>:<port>/<database>?options=-c%20search_path=myschema,public
jdbc:postgresql://<host>:<port>/<database>?currentSchema=myschema
【问题讨论】:
标签: postgresql jdbc apache-kafka-connect