flink-cdc
flink-cdc copied to clipboard
Expose MySQL transaction id as metadata column
Is your feature request related to a problem? Please describe.
Unable get transaction.id
from MySQL CDC while the underlying Debezium provides it
Describe the solution you'd like Something like below would work
CREATE TABLE products (
transtaction_id STRING METADATA FROM 'transaction_id' VIRTUAL,
order_id INT,
order_date TIMESTAMP(0),
customer_name STRING,
price DECIMAL(10, 5),
product_id INT,
order_status BOOLEAN,
PRIMARY KEY(order_id) NOT ENFORCED
) WITH (
'connector' = 'mysql-cdc',
'hostname' = 'localhost',
'port' = '3306',
'username' = 'root',
'password' = '123456',
'database-name' = 'mydb',
'table-name' = 'orders'
);
Describe alternatives you've considered No alternative