-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mysql binlog方式同步,如何从最开始位置开始同步 #913
Comments
this is binlog document:https://github.com/DTStack/chunjun/blob/master/docs/connectors/binlog/binlog-source.md |
thx,i mean sql mode,not json config mode,I didn't find the config options in sql mode,can you help me point it out? |
yes,sql parameters are also included in this document. |
…ecify binlog file read
当同步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;
The text was updated successfully, but these errors were encountered: