Jdbc 如何编写Kafka Connect查询以使用时间戳模式在两个特定日期之间查询数据

Jdbc 如何编写Kafka Connect查询以使用时间戳模式在两个特定日期之间查询数据,jdbc,apache-kafka,apache-kafka-connect,confluent-platform,Jdbc,Apache Kafka,Apache Kafka Connect,Confluent Platform,我正在编写一个Kakfa JDBC源连接器来查询Postgres表中的两个日期开始日期和结束日期,并希望连接器从结束日期到开始日期每天都运行查询。是否可能? 从日期介于“2020-08-01”和“2020-10-31”之间的表中选择*您可以通过定义filter.condition使用 链接中提供了一个示例,如下所示: transforms=filterDateExample # Use the 'io.confluent.connect.transforms.Filter$Value' as t

我正在编写一个Kakfa JDBC源连接器来查询Postgres表中的两个日期开始日期和结束日期,并希望连接器从结束日期到开始日期每天都运行查询。是否可能? 从日期介于“2020-08-01”和“2020-10-31”之间的表中选择*您可以通过定义filter.condition使用

链接中提供了一个示例,如下所示:

transforms=filterDateExample
# Use the 'io.confluent.connect.transforms.Filter$Value' as the source (record 'value') on which
# 'filter.condition' shall be applied.
transforms.filterDateExample.type=io.confluent.connect.transforms.Filter$Value
transforms.filterDateExample.filter.condition=$.key[?(@.date >= "2020-08-01" && @.date <= "2020-10-31")]
# Use 'include' to pass through all records that match the predicate.
transforms.filterDateExample.filter.type=include
# Use the 'fail' behavior to throw an exception and fail the connector task when the record does
# not have the field(s) used in the 'filter.condition'.
transforms.filterDateExample.missing.or.null.behavior=fail

它看起来无法识别日期类型,因此您可能还需要查看。

您正在编写自己的,或配置现有的??当前将此查询提供给连接器时会发生什么情况?