input {
jdbc {
# the user we wish to excute our statement as
jdbc_user => "xxxx"
jdbc_password => "xxxx"
# the path to our downloaded jdbc driver
jdbc_driver_library => "/home/admin/data/mysql-connector-java-5.1.36/mysql-connector-java-5.1.36-bin.jar"
# the name of the driver class for mysql
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_paging_enabled => "true"
jdbc_page_size => "50000"
#statement_filepath => "jdbc.sql"
statement => "SELECT * from mytable WHERE field = xx"
type => "jdbc"
}
}
output {
http {
url => "http://ip:port/xxxx"
http_method => "post"
format => "form"
mapping => {"uid"=>"%{follwer_id}" "following_uid"=>"%{following_id}" "follow_source"=>1000}
}
stdout {
codec => json_lines
}
}
jdbc {
# mysql jdbc connection string to our backup databse
jdbc_connection_string => "jdbc:mysql://ip:port/database?zeroDateTimeBehavior=convertToNull"
jdbc_user => "xxxx"
jdbc_password => "xxxx"
# the path to our downloaded jdbc driver
jdbc_driver_library => "/home/admin/data/mysql-connector-java-5.1.36/mysql-connector-java-5.1.36-bin.jar"
# the name of the driver class for mysql
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_paging_enabled => "true"
jdbc_page_size => "50000"
#statement_filepath => "jdbc.sql"
statement => "SELECT * from mytable WHERE field = xx"
type => "jdbc"
}
}
output {
http {
url => "http://ip:port/xxxx"
http_method => "post"
format => "form"
mapping => {"uid"=>"%{follwer_id}" "following_uid"=>"%{following_id}" "follow_source"=>1000}
}
stdout {
codec => json_lines
}
}