【发布时间】:2020-02-29 22:19:18
【问题描述】:
我有一个已配置的源连接器,从 DB2 检索并使用时间戳模式。例如:
"name": "my-jdbc-connector",
"config": {
"connector.class": "io.confluent.connect.jdbc.JdbcSourceConnector",
"connection.url": "jdbc:db2://db2server.mycompany.com:4461/myDB",
"connection.user: "dbUser",
"connection.password": "dbPass",
"dialect.name": "Db2DatabaseDialect",
"mode": "timestamp",
"query": "select fname, lname, custId, custRegion, lastUpdate from CustomerMaster",
"timestamp.column.name": "lastUpdate",
"table.types": "TABLE",
"topic.prefix": "master.customer"
}
}
我需要使用“with UR”(未提交的读取,又名“脏读取”)作为选择的一部分,以免锁定我正在查询的表。
但是,当使用时间戳模式时,Kafka Connect 会附加到 where 子句的末尾,如
where lastUpdate between '10/12/2019' and '10/14/2019';
DB2 要求“with UR”是 where 子句中的最后一件事。有谁知道是否可以像这样操作 where 子句?我目前看不到时间戳模式和“with UR”如何共存。
【问题讨论】:
-
也许你可以使用“query.suffix”
标签: jdbc apache-kafka db2 apache-kafka-connect