You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[2019-01-04 17:15:20,005] ERROR WorkerSourceTask{id=jdbc_source_mysql_zz-0} Task threw an uncaught and unrecoverable exception (org.apache.kafka.connect.runtime.WorkerTask)
org.apache.kafka.connect.errors.DataException: UPDATE_TS is not a valid field name
at org.apache.kafka.connect.data.Struct.lookupField(Struct.java:254)
at org.apache.kafka.connect.data.Struct.get(Struct.java:74)
at io.confluent.connect.jdbc.source.TimestampIncrementingCriteria.extractOffsetTimestamp(TimestampIncrementingCriteria.java:211)
at io.confluent.connect.jdbc.source.TimestampIncrementingCriteria.extractValues(TimestampIncrementingCriteria.java:181)
at io.confluent.connect.jdbc.source.TimestampIncrementingTableQuerier.extractRecord(TimestampIncrementingTableQuerier.java:185)
at io.confluent.connect.jdbc.source.JdbcSourceTask.poll(JdbcSourceTask.java:309)
at org.apache.kafka.connect.runtime.WorkerSourceTask.poll(WorkerSourceTask.java:244)
at org.apache.kafka.connect.runtime.WorkerSourceTask.execute(WorkerSourceTask.java:220)
at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:175)
at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:219)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
The JDBC source connector should not mandate that the field is present, if the query can successfully execute without it.
The text was updated successfully, but these errors were encountered:
@rmoff the timestamp value must be included in the SELECT so that we know the timestamp value of each record. I agree that the error message should be a lot more clear about this requirement.
@rmoff The final query that connector would fire will be:
SELECT FIRST_NAME, LAST_NAME, GENDER, COMMENTS FROM demo.customers where UPDATE_TS > '<last_saved_offset_timestamp> || 1970-01-01 00:00:00'
The important aspect is that the timestamp column or increment column actually build the WHERE clause. See this class for Timestamp+Incrementing mode (last 3 methods). For other modes there are other classes.
Given a table:
It is valid to run a query with the predicate column not present in the
SELECT
criteria:However the JDBC connector throws an error if the
timestamp.column.name
is not included in theSELECT
.Config:
Error:
The JDBC source connector should not mandate that the field is present, if the query can successfully execute without it.
The text was updated successfully, but these errors were encountered: