<commit_before>.. image:: elasticsearch-river-jdbc/raw/master/src/site/origami.png

Elasticsearch JDBC river
========================

The Java Database Connection (JDBC) `river <http://www.elasticsearch.org/guide/reference/river/>`_  allows to fetch data from JDBC sources for indexing into `Elasticsearch <http://www.elasticsearch.org>`_. 

It is implemented as an `Elasticsearch plugin <http://www.elasticsearch.org/guide/reference/modules/plugins.html>`_.

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

Creating a JDBC river is easy::

    curl -XPUT 'localhost:9200/_river/my_jdbc_river/_meta' -d '{
        "type" : "jdbc",
        "jdbc" : {
            "driver" : "com.mysql.jdbc.Driver",
            "url" : "jdbc:mysql://localhost:3306/test",
            "user" : "",
            "password" : "",
            "sql" : "select * from orders"
        }
    }'

Installation
------------

Current version of the plugin: **2.0.2** (January 23, 2013)

Prerequisites:: 

  Elasticsearch 0.20.x
  JDBC driver jar

Bintray:

https://bintray.com/pkg/show/general/jprante/elasticsearch-plugins/elasticsearch-river-jdbc

`Direct download <http://dl.bintray.com/content/jprante/elasticsearch-plugins/release/org/xbib/elasticsearch/elasticsearch-river-jdbc/2.0.1/elasticsearch-river-jdbc-2.0.1.zip>`_

Command::

  ./bin/plugin -url http://bit.ly/U75w1N -install river-jdbc

Documentation
-------------

`Quickstart <elasticsearch-river-jdbc/wiki/Quickstart>`_

`JDBC river parameters <elasticsearch-river-jdbc/wiki/JDBC-River-parameters>`_

`Strategies <elasticsearch-river-jdbc/wiki/Strategies>`_

`Moving a table <elasticsearch-river-jdbc/wiki/Moving-a-table-into-Elasticsearch>`_

`Labeled columns <elasticsearch-river-jdbc/wiki/Labeled-columns>`_

`Structured objects <elasticsearch-river-jdbc/wiki/Structured-Objects>`_

`RiverSource, RiverMouth, RiverFlow <elasticsearch-river-jdbc/wiki/RiverSource,-RiverMouth,-and-RiverFlow>`_

`Bulk indexing <elasticsearch-river-jdbc/wiki/Bulk-indexing>`_

`Updates with versioning <elasticsearch-river-jdbc/wiki/Updates-with-versioning>`_

`Updates with database table <elasticsearch-river-jdbc/wiki/Updates-with-database-table>`_

`Setting up the river with PostgreSQL <elasticsearch-river-jdbc/wiki/Step-by-step-recipe-for-setting-up-the-river-with-PostgreSQL>`_

`Loading from CSV <elasticsearch-river-jdbc/wiki/Loading-CSV>`_

License<commit_msg>download links<commit_after>.. image:: elasticsearch-river-jdbc/raw/master/src/site/origami.png

Elasticsearch JDBC river
========================

The Java Database Connection (JDBC) `river <http://www.elasticsearch.org/guide/reference/river/>`_  allows to fetch data from JDBC sources for indexing into `Elasticsearch <http://www.elasticsearch.org>`_. 

It is implemented as an `Elasticsearch plugin <http://www.elasticsearch.org/guide/reference/modules/plugins.html>`_.

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

Creating a JDBC river is easy::

    curl -XPUT 'localhost:9200/_river/my_jdbc_river/_meta' -d '{
        "type" : "jdbc",
        "jdbc" : {
            "driver" : "com.mysql.jdbc.Driver",
            "url" : "jdbc:mysql://localhost:3306/test",
            "user" : "",
            "password" : "",
            "sql" : "select * from orders"
        }
    }'

Installation
------------

Current version of the plugin: **2.0.2** (January 23, 2013)

Prerequisites:: 

  Elasticsearch 0.20.x
  JDBC driver jar

Bintray:

https://bintray.com/pkg/show/general/jprante/elasticsearch-plugins/elasticsearch-river-jdbc

`Direct download <http://dl.bintray.com/content/jprante/elasticsearch-plugins/release/org/xbib/elasticsearch/elasticsearch-river-jdbc/2.0.2/elasticsearch-river-jdbc-2.0.2.zip>`_

Command::

  ./bin/plugin -url http://bit.ly/10FJhEd -install river-jdbc

Documentation
-------------

`Quickstart <elasticsearch-river-jdbc/wiki/Quickstart>`_

`JDBC river parameters <elasticsearch-river-jdbc/wiki/JDBC-River-parameters>`_

`Strategies <elasticsearch-river-jdbc/wiki/Strategies>`_

`Moving a table <elasticsearch-river-jdbc/wiki/Moving-a-table-into-Elasticsearch>`_

`Labeled columns <elasticsearch-river-jdbc/wiki/Labeled-columns>`_

`Structured objects <elasticsearch-river-jdbc/wiki/Structured-Objects>`_

`RiverSource, RiverMouth, RiverFlow <elasticsearch-river-jdbc/wiki/RiverSource,-RiverMouth,-and-RiverFlow>`_

`Bulk indexing <elasticsearch-river-jdbc/wiki/Bulk-indexing>`_

`Updates with versioning <elasticsearch-river-jdbc/wiki/Updates-with-versioning>`_

`Updates with database table <elasticsearch-river-jdbc/wiki/Updates-with-database-table>`_

`Setting up the river with PostgreSQL <elasticsearch-river-jdbc/wiki/Step-by-step-recipe-for-setting-up-the-river-with-PostgreSQL>`_

`Loading from CSV <elasticsearch-river-jdbc/wiki/Loading-CSV>`_

License
{'fraction_non_alphanumeric': 0.14903069466882068, 'fraction_numerical': 0.011510500807754443, 'mean_word_length': 4.023326572008114, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, 'https://': 2, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2513866', 'n_tokens_mistral': 1672, 'n_tokens_neox': 1569, 'n_words': 294}