проблема с использованием увеличения в соединителе jdbc - PullRequest
1 голос
/ 29 апреля 2019

Я пытаюсь использовать возрастающую загрузку, чтобы создать сообщение для темы об обновлении таблицы в mysql.Он работает с использованием метки времени, но, похоже, не работает в режиме увеличения столбца.Когда я вставляю новую строку в таблицу, я не вижу сообщений, опубликованных в теме.

{
            "_comment": " --- JDBC-specific configuration below here  --- ",
            "_comment": "JDBC connection URL. This will vary by RDBMS. Consult your manufacturer's handbook for more information",
            "connection.url": "jdbc:mysql://localhost:3306/lte?user=root&password=tiger",

            "_comment": "Which table(s) to include",
            "table.whitelist": "candidate_score",

            "_comment": "Pull all rows based on an timestamp column. You can also do bulk or incrementing column-based extracts. For more information, see http://docs.confluent.io/current/connect/connect-jdbc/docs/source_config_options.html#mode",
            "mode": "incrementing",

            "_comment": "Which column has the timestamp value to use?  ",
            "incrementing.column.name": "attempt_id",

            "_comment": "If the column is not defined as NOT NULL, tell the connector to ignore this  ",
            "validate.non.null": "true",

            "_comment": "The Kafka topic will be made up of this prefix, plus the table name  ",
            "topic.prefix": "mysql-"
    }

attempt_id - это автоматически увеличивающийся ненулевой столбец, который также является первичным ключом.

1 Ответ

0 голосов
/ 29 апреля 2019

На самом деле, это моя вина.Я слушал не ту тему.

...