chunjun icon indicating copy to clipboard operation
chunjun copied to clipboard

bug

Open LY-GO opened this issue 4 years ago • 3 comments

``## General Question

Snipaste_2021-12-10_15-47-41 版本: flink 1.12.5 flinkx 12.0 Snipaste_2021-12-10_15-49-25

Question:

存到数据库的数据是rowData前三个字段,数据不对,因为rowData为8个元素; toExternalConverters这个数组只有三个元素

#json模板: mysql-binlog.txt

LY-GO avatar Dec 10 '21 07:12 LY-GO

{ "job": { "content": [ { "reader": { "parameter": { "schema" : "flink", "table": ["source"], "password": "root", "port": 3307, "cat": "insert,delete,update", "host": "192.168.193.1", "jdbcUrl": "jdbc:mysql://192.168.193.1:3307/flink?useSSL=false", "start" : {

      },
        "splitUpdate" : true,
        "pavingData": true,
        "username": "root",
        "column": [
          {
            "name": "id",
            "type": "VARCHAR"
          },
          {
            "name": "age",
            "type": "VARCHAR"
          },
          {
            "name": "username",
            "type": "VARCHAR"
          }
        ]

      },
      "name": "binlogreader"
    },

    "writer": {
      "name": "mysqlwriter",
      "parameter": {
        "username": "root",
        "password": "root",
        "connection": [
          {
            "jdbcUrl":  "jdbc:mysql://192.168.193.1:3307/flink?useSSL=false",
            "table": ["target"],
            "schema": "flink"
          }
        ],
        "writeMode": "insert",
        "column": [
          {
            "name": "id",
            "type": "VARCHAR"
          },
          {
            "name": "age",
            "type": "VARCHAR"
          },
          {
            "name": "username",
            "type": "VARCHAR"
          }
        ]
      }
    }
  }
],
"setting": {
  "speed": {
    "bytes": 0,
    "channel": 1
  }
}

} }

LY-GO avatar Dec 14 '21 03:12 LY-GO

image

binlog的数据结构较为特殊,它不像mysql reader那样解析出来的数据是key - value的形式,而是带有其他信息的event sink,所以不能直接对接mysql。 PS:这功能我们内部在开发中。

FlechazoW avatar Dec 14 '21 07:12 FlechazoW

image

binlog的数据结构较为特殊,它不像mysql reader那样解析出来的数据是key - value的形式,而是带有其他信息的event sink,所以不能直接对接mysql。 PS:这功能我们内部在开发中。

那支持mysql-binlog到hbase咩

LY-GO avatar Dec 14 '21 08:12 LY-GO