- Introduction
- The Java Database Connection (JDBC) plugin allows to fetch data from JDBC sources for indexing into Elasticsearch
- Installation
- cd $ES_HOME
- ./bin/plugin --install jdbc --url http://xbib.org/repository/org/xbib/elasticsearch/plugin/elasticsearch-river-jdbc/1.3.0.4/elasticsearch-river-jdbc-1.3.0.4-plugin.zip
- cd
- curl -o mysql-connector-java-5.1.28.zip -L 'http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.28.zip/from/http://cdn.mysql.com/'
- unzip mysql-connector-java-5.1.28.zip
- cd mysql-connector-java-5.1.28
- cp mysql-connector-java-5.1.28-bin.jar $ES_HOME/plugins/jdbc/
- start / restart ES
- create a JDBC river instance. For example,
curl -XPUT 'localhost:9200/_river/my_jdbc_river/_meta' -d '{ "type" : "jdbc", "jdbc" : { "url" : "jdbc:mysql://localhost:3306/test", "user" : "", "password" : "", "sql" : "select * from orders" } }'
- reference
Friday, January 2, 2015
JDBC
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.