-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Given a simple table to test the things out
CREATE TABLE `users` (
`id` int NOT NULL AUTO_INCREMENT,
`name` text NOT NULL,
`registered_at` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
PRIMARY KEY (`id`)
) ENGINE = InnoDB;
and the following connector config
const mysqlConnectorConfig = {
options: {
host: env.DB_HOST,
dialect: 'mysql',
pool: {
max: 5,
min: 0,
idle: 10000,
},
},
database: env.DB_DATABASE,
user: env.DB_USERNAME,
password: env.DB_PASSWORD,
maxPollCount: 100,
incrementingColumnName: 'id',
timestampColumnName: 'registered_at',
fetchMode: 'timestamp',
table: `users`,
initTimestamp: env.KAFKA_CONNECT_USERS_INIT_TIMESTAMP,
};
the following error pops up in the console when the application and the polling are started:
Executing (default): SELECT * FROM 'users' ORDER BY 'id' LIMIT 100 OFFSET 0
[09:25:11.892] ERROR (SequelizeDatabaseError): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''users' ORDER BY 'id' LIMIT 100 OFFSET 0' at line 1
SequelizeDatabaseError: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''users' ORDER BY 'id' LIMIT 100 OFFSET 0' at line 1
this seems to be the culprit: https://github.com/nodefluent/sequelize-kafka-connect/blob/master/lib/source/SequelizeSourceTask.js#L41
as I remove the escaping here, that select works as expected without errors.
Metadata
Metadata
Assignees
Labels
No labels