You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-zh@flink.apache.org by 王瑞冬 <18...@qq.com> on 2021/03/10 06:06:36 UTC
flinkx增量同步(多表)
您好!
我叫王瑞冬,是2021年即将毕业的应届生。对flinkx增量采集有点问题,没有在网上查询到想要的结果,发这封邮件咨询一下。
请问flnkx能通过配置json来完成多个表同时同步到多个表中吗?我的配置如下,执行结果之江begin1同步到end1中,没有begin2的reader和end2的writer。
期待您的回复!谢谢!
{
"job": {
"content": [
{
"reader": {
"parameter": {
"username": "root",
"password": "123456",
"connection": [{
"jdbcUrl": ["jdbc:mysql://localhost:3306/flinkx1?useUnicode=true&characterEncoding=utf8"],
"table": ["begin1","begin2"]
}],
"column": [
{
"name": "id",
"type": "int"
},
{
"name": "name",
"type": "varchar"
}
],
"customSql": "",
"splitPk": "id",
"queryTimeOut": 1000,
"requestAccumulatorInterval": 2,
"increColumn": "id",
"startLocation": ""
},
"name": "mysqlreader"
},
"writer": {
"name": "mysqlwriter",
"parameter": {
"username": "root",
"password": "123456",
"connection": [
{
"jdbcUrl": "jdbc:mysql://localhost:3306/flinkx1?useUnicode=true&characterEncoding=utf8",
"table": ["end1","end2"]
}
],
"writeMode": "insert",
"column": [
{
"name": "id",
"type": "int"
},
{
"name": "name",
"type": "varchar"
}
],
"batchSize": 1024
}
}
}
],
"setting": {
"speed": {
"channel": 2,
"bytes": 1000
},
"errorLimit": {
"record": 0
},
"restore": {
"maxRowNumForCheckpoint": 0,
"isRestore": false,
"restoreColumnName": "",
"restoreColumnIndex": 0
},
"log" : {
"isLogger": false,
"level" : "debug",
"path" : " /data/flinkx/flinkxconf/log/",
"pattern":""
}
}
}
}