跳到主要内容
版本:1.x

Jdbc

Output plugin : Jdbc

Description

Write Rows to an external data source via JDBC.

Options

nametyperequireddefault value
driverstringyes-
passwordstringyes-
save_modestringnoappend
tablestringyes-
urlstringyes-
userstringyes-
driver [string]

Class name of jdbc driver.

password [string]

Password.

save_mode [string]

Save mode, supports overwrite, append, ignore and error. The detail of save_mode see save-modes.

table [string]

Table name.

url [string]

The url of JDBC. For example: jdbc:postgresql://localhost/test

user [string]

Username.

Example

jdbc {
driver = "com.mysql.jdbc.Driver"
url = "jdbc:mysql://localhost:3306/info"
table = "access"
user = "username"
password = "password"
save_mode = "append"
}

write data to mysql with jdbc output.