jprante / elasticsearch-jdbc

JDBC importer for Elasticsearch
Apache License 2.0
2.84k stars 710 forks source link

how to add new jdbc data base like Exasol, Redshift, Vertica #470

Open oferoh opened 9 years ago

jprante commented 9 years ago

Add JDBC drivers to the plugin/jdbc folder. The driver must implement the JDBC 4 standard.

oferoh commented 9 years ago

I tried this one but im getting error PUT _river/atlas_events/_meta { "type" : "jdbc", "jdbc": { "url":"jdbc:exa//156.14.33.51..58:8563", "user":"user", "password":"user", "sql":"select 222 a", "index" : "exasol", "type" : "exasol" } }

im getting this error ,

[2015-02-20 21:44:34,156][ERROR][org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverSource] while opening read connection: jdbc:exa//156.14.33.51..58:8563 No suitable driver found for jdbc:exa//156.14.33.51..58:8563 java.sql.SQLException: No suitable driver found for jdbc:exa//156.14.33.51..58:8563 at java.sql.DriverManager.getConnection(DriverManager.java:689) at java.sql.DriverManager.getConnection(DriverManager.java:247) at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverSource.connectionForReading(SimpleRiverSource.java:134) at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverSource.execute(SimpleRiverSource.java:253) at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverSource.fetch(SimpleRiverSource.java:228) at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverFlow.move(SimpleRiverFlow.java:129) at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverFlow.run(SimpleRiverFlow.java:88) at java.lang.Thread.run(Thread.java:745)

oferoh commented 9 years ago

there is way to add jdbc class com.exasol.jdbc.EXADriver

jprante commented 9 years ago

The JDBC URL is wrong: jdbc:exa//156.14.33.51..58:8563

It must be something like jdbc:exa:...

oferoh commented 9 years ago

PUT _river/atlas_events/_meta { "type" : "jdbc", "jdbc": { "url":"jdbc:exa:156.14.33.51..58:8563", "user":"user", "password":"user", "sql":"select 222 a", "index" : "exasol", "type" : "exasol" } }

still getting [2015-02-20 21:59:53,330][ERROR][org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverSource] while opening read connection: jdbc:exa:156.14.33.51..58:8563 No suitable driver found for jdbc:exa:156.14.33.51..58:8563 java.sql.SQLException: No suitable driver found for jdbc:exa:156.14.33.51..58:8563 at java.sql.DriverManager.getConnection(DriverManager.java:689) at java.sql.DriverManager.getConnection(DriverManager.java:247) at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverSource.connectionForReading(SimpleRiverSource.java:134) at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverSource.execute(SimpleRiverSource.java:253) at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverSource.fetch(SimpleRiverSource.java:228) at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverFlow.move(SimpleRiverFlow.java:129) at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverFlow.run(SimpleRiverFlow.java:88) at java.lang.Thread.run(Thread.java:745)

oferoh commented 9 years ago

image

jprante commented 9 years ago

Is the driver a JDBC4 driver?

Why do you use such an old JDBC plugin?

oferoh commented 9 years ago

Hi Install the latest version image

still getting the same error,

i will check with exasol support about the JDBC4 driver if this a standard is there a way that i can check this ?

one of the problem that i known when i using this jdbc is required setup a new class call, com.exasol.jdbc.EXADriver

jprante commented 9 years ago

Ask Exasol for JDBC4 driver.

Asimov4 commented 9 years ago

Did anyone try this for Redshift?

mklaber commented 9 years ago

@Asimov4 yep, the bundled PostgreSQL driver works just fine for Redshift:

jdbc:postgresql://my-redshift:5432/dev?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory