-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
当同步mysql binlog日志时,sql方式无配置项指定从数据的最开始位置(即全量)开始同步;每次启动作业都是默认从最新的binlog位置开始同步,有无配置项控制binlog的消费位置?
binlog_mysql.sql:
CREATE TABLE source
(
id int,
name varchar(20),
sex varchar(10),
ts timestamp
) WITH (
'connector' = 'binlog-x'
,'username' = 'root'
,'password' = '123456'
,'cat' = 'insert,delete,update'
,'url' = 'jdbc:mysql://localhost:3306/test_cdc?useSSL=false'
,'host' = 'localhost'
,'port' = '3306'
,'table' = 'test_cdc.cdc_flink'
,'timestamp-format.standard' = 'SQL'
);
CREATE TABLE sink
(
id int,
name varchar(20),
sex varchar(10),
ts timestamp
) WITH (
'connector' = 'stream-x',
'print' = 'true'
);
insert into sink
select id,name,sex,ts
from source u;
Metadata
Metadata
Assignees
Labels
No labels