postgresql - Accessing crateDB via Apache Drill -


i need access data in crate database via apache drill. far have read, crate has postgresql interface, not compatible postgresql interface exposed drill. there isn't information on available on internet. 1 way go implementing custom storage plugin. did not find helpful information either. went through this, not avail. insights, references, links, information appreciated.

another way tried connecting crate via apache drill using storage configuration:

{
type: "jdbc",
enabled: true,
driver: "io.crate.client.jdbc.cratedriver",
url:"jdbc:crate://localhost:5432/"
}

and jars: crate-jdbc-1.9.1.jar , crate-jdbc-standalone-2.2.0.jar

this did not work me either.

i connect crate via apache drill using following configuration:

1. storage configuration connect crate via apache drill (embedded mode):

{
"type": "jdbc",
"driver": "io.crate.client.jdbc.cratedriver",
"url": "jdbc:crate://localhost:5432/",
"username": "crate",
"password": null,
"enabled": true
}

  1. use jar crate-jdbc-standalone-2.2.0.
    add in drill-installation-dir/jars/3rdparty
    in drill-installation-dir/conf/drill-override.conf add line

    drill.exec.sys.store.provider.local.path = "crate-jdbc-standalone-2.2.0.jar"

query sample:

select * cratestorageplugin.doc.test

where:
cratestorageplugin: storage plugin created crate
doc: schema name
test: table name

kudos , big big crate team , prompt support!

note: method can prove useful, if tables not have dynamic data type. can query tables simple data types connection.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -