Табличные апельсины Debezium пустые

#debezium

Вопрос:

Запуск debezium с curl со следующей конфигурацией

 curl -i -X POST -H "Accept:application/json" -H "Content-Type:application/json" localhost:8083/connectors/ 
-d '{ "name": "transactions-connector", 
"config": { "connector.class": "io.debezium.connector.mysql.MySqlConnector", 
"tasks.max": "1", 
"database.hostname":"localhost", 
"database.port": "3306", "database.user": "root",
 "database.password": "*****", "database.server.id": "1", "database.server.name":"*****", "database.include.list": "*****", "database.history.kafka.bootstrap.servers": "localhost:9092", "database.history.kafka.topic": "dbhistory.transactions",
"table.include.list": "transactions,customers",
"database.dbname": "******",
"snapshot.mode": "initial",
"snapshot.locking.mode": "none",
"key.converter": "org.apache.kafka.connect.json.JsonConverter",
"value.converter": "org.apache.kafka.connect.json.JsonConverter",
"key.converter.schemas.enable": "false",
"value.converter.schemas.enable": "false",
"internal.key.converter": "org.apache.kafka.connect.json.JsonConverter",
"internal.value.converter": "org.apache.kafka.connect.json.JsonConverter",
"internal.key.converter.schemas.enable": "false",
"internal.value.converter.schemas.enable": "false",
"transforms": "unwrap",
"transforms.unwrap.add.source.fields": "ts_ms",
"tombstones.on.delete": "false",
"transforms.unwrap.type": "io.debezium.transforms.ExtractNewRecordState"
 } }'```

in kafka consumer response, all schema level changes are coming but row level data is missing. 

```{
  "source" : {
    "server" : "C02F5AZSMD6M"
  },
  "position" : {
    "ts_sec" : 1628625011,
    "file" : "binlog.000010",
    "pos" : 1473,
    "snapshot" : true
  },
  "databaseName" : "meesho_test",
  "ddl" : "CREATE TABLE `transactions` (n  `id` bigint NOT NULL AUTO_INCREMENT,n  `amount` double NOT NULL,n  `callback_url_id` int DEFAULT NULL,n  `client_id` int DEFAULT NULL,n  `client_transaction_id` varchar(63) NOT NULL,n  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,n  `error_code` varchar(63) DEFAULT NULL,n  `error_message` varchar(255) DEFAULT NULL,n  `iso_country_code` varchar(3) DEFAULT 'IN',n  `md` text,n  `parent_pg_transaction_id` varchar(63) DEFAULT NULL,n  `parent_transaction_id` varchar(63) DEFAULT NULL,n  `mode` varchar(16) NOT NULL,n  `pg_transaction_id` varchar(63) DEFAULT NULL,n  `profile` varchar(63) DEFAULT NULL,n  `status` varchar(63) NOT NULL,n  `transaction_id` varchar(63) NOT NULL,n  `type` varchar(16) NOT NULL,n  `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,n  PRIMARY KEY (`id`),n  UNIQUE KEY `UK_transaction_id` (`transaction_id`),n  UNIQUE KEY `UK_client_transaction_id` (`client_transaction_id`)n) ENGINE=InnoDB AUTO_INCREMENT=10003 DEFAULT CHARSET=utf8mb3",
  "tableChanges" : [ ]
}
 

Операции вставки, обновления, удаления на уровне строк не фиксируются.
поле изменений таблицы пустое в объекте ответа

Ответ №1:

Добавьте префикс базы данных в белый список таблицы

 "table.include.list": "DBNAME.transactions,DBNAME.customers",