Skip to main content
Version: 2.1.0

Jdbc

Source plugin : Jdbc [Flink]

Description​

Read data through jdbc

Options​

nametyperequireddefault value
driverstringyes-
urlstringyes-
usernamestringyes-
passwordstringno-
querystringyes-
fetch_sizeintno-
common-optionsstringno-
parallelismintno-

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"
}