Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- input {
- jdbc {
- jdbc_connection_string => "jdbc:sqlserver://localhost:1433;databaseName=test"
- # The user we wish to execute our statement as
- jdbc_user => "sa"
- jdbc_password => "sasa"
- # The path to our downloaded jdbc driver
- jdbc_driver_library => "C:Usersabhijitb.m2repositorycommicrosoftsqlservermssql-jdbc6.2.2.jre8mssql-jdbc-6.2.2.jre8.jar"
- jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
- #clean_run => true
- schedule => "* * * * *"
- #query
- statement => "SELECT * FROM Student where studentid > :sql_last_value"
- use_column_value => true
- tracking_column => "studentid"
- }
- }
- output {
- #stdout { codec => json_lines }
- elasticsearch {
- "hosts" => "localhost:9200"
- "index" => "student"
- "document_type" => "data"
- "document_id" => "%{studentid}"
- }
- }
Add Comment
Please, Sign In to add comment