定义
Data Source 是 用来访问元数据以及从外部系统读取变更数据的组件。 一个 Data Source 可以同时访问多个表。
参数
为了定义一个 Data Source,需要提供以下参数:
| 参数 | 含义 | optional/required |
|---|---|---|
| type | source 的类型,例如 mysql。 | required |
| name | source 的名称,允许用户配置(提供了一个默认值)。 | optional |
| configurations of Data Source | 用于构建 source 组件的配置,例如连接参数或者表属性的配置。 | optional |
示例
我们可以使用 yaml 文件来定义一个 mysql source:
source:
type: mysql
name: mysql-source #optional,description information
host: localhost
port: 3306
username: admin
password: pass
tables: adb.*, bdb.user_table_[0-9]+, [app|web]_order_\.*
Copyright © 2026 The Apache Software Foundation. Apache Flink, Flink, and the Flink logo are trademarks of The Apache Software Foundation.