源数据库类型 | 源数据库版本 | 支持订阅的数据类型 |
MySQL | MySQL 5.5.x、5.6.x、5.7.x、8.0.x | 数据更新 结构更新 全实例 |
MariaDB | MariaDB 10.0.10、MariaDB 10.1.9 | 数据更新 结构更新 全实例 |
MariaDB(Percona) | MariaDB(Percona)5.6.x、5.7.x | 数据更新 结构更新 全实例 |
TDSQL MySQL | TDSQL MySQL 5.6.x、5.7.x、8.0.18 | 数据更新 结构更新 全实例 |
TDSQL-C MySQL | TDSQL-C MySQL 5.7.x、8.0.x | 数据更新 结构更新 全实例 |
TDSQL PostgreSQL 版 | PostgreSQL 版 | 数据更新 |
{"id":"38cecd93-a9c2-11ec-b952-******d8da53:16","type":"dts:MYSQL:INSERT","specversion":"1.0","source":"dts.cloud.tencent","subject":"cdb-xxxx","time":1648109734,"region":"ap-guangzhou","datacontenttype":"application/json;charset=utf-8","tags":null,"data":{"topic":"topic-subs-xxxx-cdb-xxxx","partition":3,"offset":16005,"partition_seq":16006,"event":{"dmlEvent":{"columns":[{"name":"string","originalType":"text"},{"name":"int","originalType":"tinyint(4)"},{"name":"time","originalType":"time"},{"name":"double","originalType":"double"},{"name":"id","originalType":"int(11)","isKey":true},{"name":"float","originalType":"float"},{"name":"longtext","originalType":"longtext"}],"rows":[{"newColumns":[{"dataType":13,"charset":"utf8","bv":"dG1w"},{},{},{"dataType":10,"sv":"1"},{"dataType":3,"sv":"3"},{},{}]}]}},"header":{"sourceType":1,"messageType":2,"timestamp":1648109734,"serverId":109741,"fileName":"mysql-bin.000005","position":2234587,"gtid":"38cecd93-a9c2-11ec-b952-******d8da53:16","schemaName":"dts","tableName":"dts_mysql","seqId":16017,"isLast":true},"eb_consumer_time":"2022-03-24 16:15:34.287359965 +0800 CST m=+1120.357657669","eb_connector":""}}
{"id":"38cecd93-a9c2-11ec-b952-******8da53:19","type":"dts:MYSQL:DDL","specversion":"1.0","source":"dts.cloud.tencent","subject":"cdb-xxxx","time":1648110060,"region":"ap-guangzhou","datacontenttype":"application/json;charset=utf-8","tags":null,"data":{"topic":"topic-subs-aniwxeewm4-cdb-xxxx","partition":0,"offset":16065,"partition_seq":16066,"event":{"ddlEvent":{"schemaName":"dts","sql":"ALTER TABLE `dts_mysql` ADD COLUMN `t` tinyint (0) NULL , ADD UNIQUE `t` USING btree (`t`)"}},"header":{"sourceType":1,"messageType":3,"timestamp":1648110060,"serverId":109741,"fileName":"mysql-bin.000005","position":2235430,"gtid":"38cecd93-a9c2-11ec-b952-******d8da53:19","seqId":16087,"isLast":true},"eb_consumer_time":"2022-03-24 16:21:01.19682088 +0800 CST m=+1447.267118604","eb_connector":""}}
参数 | 描述 |
id | 事件 ID,EB 自动生成,每条事件在 EB 内的唯一标识。 |
type | 事件类型,三段式形式,对 dts 连接器,格式为 dts:${数据库类型}:${操作类型} 。 |
specversion | Cloudevents 版本,默认 1.0,EB 自动生成。 |
source | 事件来源,对 dts 连接器,统一为 dts.cloud.tencent 。 |
subject | 事件产生具体实例,对 dts 连接器,为数据订阅绑定的数据库实例 ID。 |
time | 事件投递到 EB 的时间。 |
region | 事件产生地域。 |
tags | 资源标签。 |
data | 数据库实际 binlog 日志内容。 |
data.topic | 数据订阅实例信息。 |
data.partition | 消费 partition。 |
data.offset | 消费位点。 |
data.event | 分为 dmlEvent 和 ddlEvent,dmlEvent 介绍数据表的 schema 格式和更改内容,ddlEvent 介绍具体 sql 操作。 |
data.header | 操作日志头部信息,包含数据库名称、表名称、变更时间戳等具体信息。 |
本页内容是否解决了您的问题?