CaptureChangeMySQL 2025.10.2.19¶
捆绑包¶
com.snowflake.openflow.runtime | runtime-database-cdc-processors-nar
描述¶
Reads CDC events from a MySQL database. The processor continuously reads events from binary log files, filtering those related to the tables provided by the TableStateService, and discarding the rest. The processor outputs two types of FlowFiles: - DDLs containing the schema of a table (the initial schema and a new schema on every schema change). - DMLs with records representing changes to the data in the table. One FlowFile always represents data related to a single table. The DDL with the schema is written to the FlowFile content as a JSON object: { "columns": [ { "name": "<columnName>", "type": "<snowflakeType>", "nullable": <true|false>, "scale": <scale>, "precision": <precision> }, ... ], "primaryKeys": ["<primaryKey1>", "<primaryKey2>", ...] } Structure of the FlowFiles containing the DML records: { "primaryKeys": { "<column>": <value>, ... }, "payload": { "<column>": <value>, ... }, "metadata": { "<column>": <value>, ... }
输入要求¶
FORBIDDEN
支持敏感的动态属性¶
false
属性¶
属性 |
描述 |
|---|---|
列筛选存储 |
存储每个表列筛选设置的服务。 |
连接超时 |
与源数据库的连接超时 |
JDBC 驱动程序位置 |
以逗号分隔的文件/文件夹列表和/或 URLs,包含驱动程序 JAR 及其依赖项(如果有)。例如“/var/tmp/mariadb-java-client-3.4.1.jar” |
JDBC URL |
数据库连接的 JDBC URL,即 jdbc:mariadb://localhost:3306/mysql |
最大批处理大小 |
单次迭代中要处理的最大记录数。当最后一个二进制日志事件包含多行时,记录数可能会超过最大批处理大小。 |
最长批处理等待时间 |
等待数据出现在二进制日志中的最长时间。 |
最大队列规模 |
读取器线程等待 onTrigger 之前从二进制日志中读取的最大元素数 |
密码 |
访问 MySQL 数据库的密码 |
记录写入器 |
用于序列化 DML 事件的记录写入器 |
SSL Context Service |
支持加密套接字通信的 SSL Context Service |
SSL 模式 |
SSL Context Service 配置支持证书验证选项时所用的 SSL 模式 |
服务器 ID |
服务器 ID(在 1 到 2^32 – 1 的范围内)。该值在整个复制组中 MUST 是唯一的(即,不同于任何主服务器或从属服务器所用的任何其他服务器 ID)。请记住,每个二进制日志客户端都应被视为简化的从属服务器,因此 MUST 使用不同的服务器 ID。 |
服务器 ID 策略 |
确定如何选择服务器 ID |
表状态存储 |
保存复制表状态的共享存储。 |
用户名 |
访问 MySQL 数据库的用户名 |
状态管理¶
范围 |
描述 |
|---|---|
CLUSTER |
该处理器会存储数据库中当前 CDC 事件的“pointer”等信息,以便在重新启动时从同一位置继续运行。 |
关系¶
名称 |
描述 |
|---|---|
success |
通过 CDC 流活动成功创建 FlowFile |
写入属性¶
名称 |
描述 |
|---|---|
source.schema.name |
事件来源表的架构名称 |
source.table.name |
事件来源表的名称 |
cdc.event.type |
Type of event carried by the FlowFile: ddl or dml |
cdc.most.significant.position |
Ddl 在 cdc 流中最重要的位置 |
cdc.least.significant.position |
Ddl 在 cdc 流中最不重要的位置 |
cdc.event.seen.at |
处理器读取 ddl 事件的时间戳 |