Jdbc
Source plugin : Jdbc [Flink]
Descriptionâ
Read data through jdbc
Optionsâ
name | type | required | default value |
---|---|---|---|
driver | string | yes | - |
url | string | yes | - |
username | string | yes | - |
password | string | no | - |
query | string | yes | - |
fetch_size | int | no | - |
common-options | string | no | - |
parallelism | int | no | - |
driver [string]â
Driver name, such as com.mysql.cj.jdbc.Driver
for MySQL.
Warn: for license compliance, you have to provide MySQL JDBC driver yourself, e.g. copy mysql-connector-java-xxx.jar
to $FLINK_HOME/lib
for Standalone.
url [string]â
The URL of the JDBC connection. Such as: jdbc:mysql://localhost:3306/test
username [string]â
username
password [string]â
password
query [string]â
Query statement
fetch_size [int]â
fetch size
parallelism [int]â
The parallelism of an individual operator, for JdbcSource.
common options [string]â
Source plugin common parameters, please refer to Source Plugin for details
Examplesâ
JdbcSource {
driver = com.mysql.jdbc.Driver
url = "jdbc:mysql://localhost/test"
username = root
query = "select * from test"
}