FYI: Python using JDBC

In case anyone is interested, I found the JDBC driver to be quite easy to setup using JayDeBeApi as below. This was on mac, I haven’t tested on anything else. I also haven’t tested the JayDeBeApi library, but it seems to be quite broadly used.

The ODBC driver was a real pain to setup on mac, so I tried this.

Requirements:

Steps:
pip install JayDeBeApi

In a notebook:

import jaydebeapi

conn = jaydebeapi.connect("com.dremio.jdbc.Driver",
                           "jdbc:dremio:direct=localhost:31010",
                           ["test", "test1234"],
                           '/Users/admin/Downloads/dremio-jdbc-driver-3.0.1-201811132128360291-804fe82.jar',)
curs = conn.cursor()
curs.execute('SELECT * FROM "data_warehouse".schema."table"')
curs.fetchall()
1 Like

Thanks for sharing this!

ODBC on mac is a pain in general, totally agree. On Windows, however, it is very easy.

Kelly

1 Like

Hi Matta,
Using Python 3.X is mandatory ??
And what would be the data_warehouse here and schema ??
Any help woukd be appreciated .