pramodbhn / elasticsearch-river-jdbc

JDBC river for Elasticsearch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

../../../elasticsearch-river-jdbc/raw/master/src/site/resources/database-128.png

Image by icons8 Creative Commons Attribution-NoDerivs 3.0 Unported.

Elasticsearch JDBC river

The Java Database Connection (JDBC) river allows to fetch data from JDBC sources for indexing into Elasticsearch.

It is implemented as an Elasticsearch plugin.

The relational data is internally transformed into structured JSON objects for the schema-less indexing model in Elasticsearch.

Creating a JDBC river is easy. Install the plugin. Download a JDBC driver jar from your vendor's site (here MySQL) and put the jar into the folder of the plugin $ES_HOME/plugins/river-jdbc. Then issue this simple command:

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",
        "index" : "my_jdbc_index",
        "type" : "my_jdbc_type"
    }
}'

Installation

https://travis-ci.org/jprante/elasticsearch-river-jdbc.png

Prerequisites

  • a JDBC driver jar for your database (download from vendor site and put into JDBC river plugin folder)
ES version Plugin Release date Command
0.90.3 0.90.3.1 Jan 31, 2014 ./bin/plugin -install river-jdbc -url http://bit.ly/1emqDH9
0.90.10 0.90.10.2 Jan 31, 2014 ./bin/plugin -install river-jdbc -url http://bit.ly/1a8Mcve
1.0.0 1.0.0.1 Feb 13, 2014 ./bin/plugin --install river-jdbc --url http://bit.ly/1jyXrR9

Do not forget to restart the node after installing.

Project docs

The Maven project site is available at Github

Binaries

Binaries are available at Bintray

Documentation

Attention: working on the documentation for 1.0.0.x is still in progress!

Quickstart

JDBC river parameters

Strategies

Moving a table

Labeled columns

Structured objects

RiverSource, RiverMouth, RiverFlow

Bulk indexing

Setting up the river with PostgreSQL

License

Elasticsearch JDBC River Plugin

Copyright (C) 2012,2013 Jörg Prante

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

JDBC river for Elasticsearch


Languages

Language:Java 99.6%Language:Shell 0.4%