我有一个已配置的源连接器,可从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要求where子句中的最后一项内容是“ with UR”。有谁知道操纵这样的where子句是否可行?我目前不知道时间戳记模式和“与UR”如何共存。