Hi,
I'm completely stuck.
I tried to import data from an MSSQL2012 database to elasticsearch, but it's not working.
Here are the steps I've done:
- Started Elasticsearch 2.2.0
- Downloaded Logstash-all-plugins-2.2.0
- Downloaded Elasticsearch-jdbc-2.2.0 from GitHub
- Created a .conf file like this:
input {
jdbc {
jdbc_driver_library => "D:\temp\sqljdbc\sqljdbc_4.2\enu\sqljdbc42.jar"
jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
jdbc_connection_string => "jdbc:sqlserver://DBSVR_NAME;user=;password=;"
jdbc_user => ""
jdbc_password => ""
statement => "SELECT *
FROM [DB].[SCHEMA].[TABLE]"
}
}
filter {
}
output {
elasticsearch {
host => "localhost"
index => "INDEX_NAME"
document_type => "DOCUMENT_TYPE"
document_id => "%{id}"
protocol => "http"
}
stdout { codec => rubydebug }
}
- Started Logstash with the command "logstash -f db.conf"
- Got an error message that said: "Java::net.sourceforge.jtds.jdbc.Driver not loaded, try install jdbc-jtds gem"
- Downloaded the latest jtds .jar and now I don't know what to do.
I've tried other drivers an they didn't work either.
I don't know if this is necessary but the system is a Windows 7 Professional x64.
I'm thankful for any help or alternatives that help me to get my sql data to elasticsearch.