Elasticsearch: [X-Pack] Elasticsearch SQL using JDBC : missing information in official documentation

Created on 15 Jun 2018  路  12Comments  路  Source: elastic/elasticsearch

I would try to use Elasticsearch SQL via JDBC, but I miss some information in official documentation :
https://www.elastic.co/guide/en/elasticsearch/reference/6.3/sql-jdbc.html

Here are the missing points :

  • what is the elasticsearch JDBC driver class name ?
  • what is "elasticsearchAddress" format ? "localhost:9200" ? How can I set multiple hosts ?
  • what is the full options list I can set into "Properties" object ?
  • where can I download Elasticsearch SQL JDBC driver JAR ?

Could you add these missing points in documentation ?

:Query LanguageSQL >bug >docs v6.3.1 v6.4.0 v7.0.0-beta1

Most helpful comment

Hi @fbaligand, thanks for trying out SQL.
The JDBC page has been updated.

Cheers,

All 12 comments

Pinging @elastic/es-docs

Pinging @elastic/es-search-aggs

I'll leave it to @costin to update the docs but I'll try an answer some of these:

what is the elasticsearch JDBC driver class name ?

I don't think you need to specify it because it is in meta-inf, but it is org.elasticsearch.xpack.sql.jdbc.jdbc.JdbcDriver.

what is "elasticsearchAddress" format ? "localhost:9200" ? How can I set multiple hosts ?

localhost:9200 or http://localhost:9200 or https://localhost:9200.

I don't believe you can set multiple hosts at this point.

what is the full options list I can set into "Properties" object ?

It looks like debug=true|false, debug_output=err|out, timezone=some_time_zone_id. The defaults are false, err, and whatever your JVM's default time zone is.

where can I download Elasticsearch SQL JDBC driver JAR ?

You can download it here but you'll probably want to resolve it from our maven repository.

For 6.3.x we bundle it with all of its dependencies here. Like the high level rest client it depends on a bunch of bits of the Elasticsearch server. In 6.4 we removed most of the dependencies. It'll depend on just jackson-core which we've shaded into it. But in 6.3 you'll have to suffer through too many dependencies.

Hi @nik9000,

Thanks a lot for all these answers ! It helps a lot !

That said, the link you give for "driver with dependencies" seems to be broken. Could you fix it ?

Concerning maven repository, indeed, a driver on central maven repository would be very useful.

Concerning maven repository, indeed, a driver on central maven repository would be very useful.

I don't believe it can go in maven central because it is under the Elastic license. The link that I gave for the jar is a maven repository.

I've fixed the to the "with all dependencies" zip in my original comment.

OK, given jar license, I understand it can鈥檛 be deployed on maven central.
So Elastic maven repository is a great alternative for users like me.

BTW, as Elasticsearch SQL is free to use, why do Elastic choose X-Pack and Elastic License, rather than open source and Apache License ?

BTW, as Elasticsearch SQL is free to use, why do Elastic choose X-Pack and Elastic License, rather than open source and Apache License ?

SQL is free to use but JDBC requires a platinum license. But we totally have things that are free to use but under the Elastic License and for the explanation for that I have to point you to the official Elastic blog post on the topic and to the license itself.

Thanks for these precisions !
Damned, I didn鈥檛 notice that JDBC driver required a platinum license :(

Hi @fbaligand, thanks for trying out SQL.
The JDBC page has been updated.

Cheers,

Great ! Thanks @costin !
I look at the new documentation => it is really complete now !
Good job here!

Great! Thanks, @costin!
I look at the new documentation => it is really complete now!
Good job here!

Hi @fbaligand, Does the new documentation solve your case?

The new documentation seems not complete for me.

Could you show me the JDBC example code?

@hatcherfang if you have questions, please use the forum not the issue tracker which is reserved for bug reports.
The documentation of JDBC including examples is available at: https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-jdbc.html

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ppf2 picture ppf2  路  3Comments

rjernst picture rjernst  路  3Comments

malpani picture malpani  路  3Comments

matthughes picture matthughes  路  3Comments

DhairyashilBhosale picture DhairyashilBhosale  路  3Comments