input {
jdbc {
jdbc_driver_library => "*********/mysql-connector-java-5.1.47.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://localhost:3306/testdata"
jdbc_user => "root"
jdbc_password => "123456"
parameters => { "id" => 1}
statement => "SELECT * FROM tb_table WHERE id > :id"
}
}
output {
jdbc {
driver_jar_path => "*****\mysql-connector-java\5.1.40\mysql-connector-java-5.1.47.jar"
driver_class => "com.mysql.jdbc.Driver"
connection_string => "jdbc:mysql://localhost:3306/testdata2"
jdbc_user => "root"
jdbc_password => "123456"
statement => ["INSERT INTO tbtable(name,age) VALUES (?,?)","name","age"]
}
stdout {}
}
网友评论