1

I am trying to connect using jdbc connection (the driver here: https://github.com/jdbc-json/jdbc-cb) apache drill with couchbase.

My storage configuration is:

{
    "type": "jdbc",
    "driver": "com.couchbase.jdbc",
    "url": "jdbc:couchbase://ip_address:8093/database",
    "username": "username",
    "password": "password",
    "enabled": true
}

I put the driver in "3rdparty" folder but I can't create the storage.

I have a jdbc connection for mysql that works.

I made other try with:

{
    "type": "jdbc",
    "driver": "com.simba.couchbase.jdbc41.Driver",
    "url": "jdbc:couchbase://localhost:8093/cluster_name",
    "username": "username",
    "password": "password",
    "enabled": true
}

I tried also with " com.simba.couchbase.jdbc4.Driver ".

I have a license for 20 days. I put the drivers an the license in "3rdparty" folder (folder for connectors in Apache Drill) and restarted the server.

The error is: "Please retry: error (unable to create/ update storage) "

Any idea about what am I doing wrong?

KARTHIKEYAN.A
  • 18,210
  • 6
  • 124
  • 133
  • Please take a look in logs. They will contain more verbose error description which will help to identify the root cause. – Arina Ielchiieva Feb 19 '18 at 13:12
  • The error that I get looking is: JSON.parse: unexpected non-whitespace character after JSON data at line 2 column 1 of the JSON data. I tried to add 'drill.exec.sys.store.provider.local.path = "CouchbaseJDBC41.jar"' in "drill-override.conf" but doesn't work again. – Gonzalo Colino Alonso Feb 19 '18 at 15:16
  • Hi @GonzaloColinoAlonso did you find solution for this? ```{ "type": "jdbc", "driver": "com.simba.couchbase.jdbc41.Driver", "url": "jdbc:couchbase://localhost:8093/LifeAsia;AuthMech=1", "CredFile":"C://Program%20Files//apache-drill-1.16.0//jars//Couchbase_JDBC_Credentials.json", "enabled": true }``` – KARTHIKEYAN.A Sep 10 '19 at 13:12

2 Answers2

0

Using Simba JDBC Driver:

Try this way it will work. I have done same thing which i mentioned here it is work for me.

{
  "type": "jdbc",
  "driver": "com.simba.couchbase.jdbc41.Driver",
  "url": "jdbc:couchbase://localhost:8093/LifeAsia;AuthMech=1;CredFile=C:/Program Files/apache-drill-1.16.0/jars/3rdparty/Couchbase_JDBC_Credentials.json",
  "username": null,
  "password": null,
  "caseInsensitiveTableNames": false,
  "enabled": true
}

Couchbase_JDBC_Credentials.json file contains array of user credentials such as username and password.

[{"user": "Administrator", "pass":"password"}]
KARTHIKEYAN.A
  • 18,210
  • 6
  • 124
  • 133
0

Using CData JDBC driver:

Configure this json on your drill UI storage location http://localhost:8047/storage/couchbase_cdata_config

{
  "type": "jdbc",
  "driver": "cdata.jdbc.couchbase.CouchbaseDriver",
  "url": "jdbc:couchbase:UseConnectionPooling=true;Server='http://localhost';",
  "username": "Administrator",
  "password": "password",
  "caseInsensitiveTableNames": false,
  "enabled": true
}

Before that you should make sure copied JDBC driver and licence files to 3rdparty folder on drill location

enter image description here

KARTHIKEYAN.A
  • 18,210
  • 6
  • 124
  • 133