-
Feature Request
-
Resolution: Done
-
Critical
-
1.8.1.Final
-
None
-
False
-
None
-
False
Feature request or enhancement
For feature requests or enhancements, provide this information, please:
Which use case/requirement will be addressed by the proposed feature?
As truncate command are use on MySQL table, this "command" has to be also store as a message into the topic of the table in KAfka.
This message will be consumed by the Consumer and allow to enable a flow to manage this change on the source database and action into the destination store (e.g. Analytic database)
Implementation ideas (optional)
Notes from Jiri Pechanec:
In general it is necessary to detect the TRUNCATE TABLE in io.debezium.connector.mysql.MySqlStreamingChangeEventSource.handleQueryEvent(MySqlPartition, MySqlOffsetContext, Event) and extend io.debezium.connector.mysql.MySqlChangeRecordEmitter so it can emit the data message with truncate. The data message will be emitted from handleQueryEvent but I'd prefer to emit it in addition to the current behaviour.
Also skipped.operations docs and config code should be extended with truncate support - see PostgresConnectorConfig with t as the default value.
My notes:
if the command is store as a message in the table topic with a specific "Op" that tells this is a message for a TRUNCATE --> "Op" = "T".
so when Consumer and other Apps check the Op, it could build some flow to manage this.
Regards,
Eric