# Dremio with python

**URL:** <https://community.dremio.com/t/dremio-with-python/3222>\
**Category:** Uncategorized\
**Created:** [April 18, 2019, 6:33am UTC](https://community.dremio.com/t/dremio-with-python/3222 "2019-04-18T06:33:07Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhba](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@abhba](https://community.dremio.com/u/abhba)\
**Post date:** [April 18, 2019, 6:33am UTC](https://community.dremio.com/t/dremio-with-python/3222/1 "2019-04-18T06:33:07Z")

</div>

Can anyone help me Connecting python with dremio on linux machine .I want to know where to install that Pyodbc package and where to set that hostname and all. pls help

---

<div class="post-metadata">

**Author:** ![doron](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/doron/32/294_2.png) [@doron](https://community.dremio.com/u/doron)\
**Post date:** [April 18, 2019, 2:51pm UTC](https://community.dremio.com/t/dremio-with-python/3222/2 "2019-04-18T14:51:26Z")

</div>

Hi,

We have some documentation that should cover your questions [here](https://docs.dremio.com/client-applications/python.html). That covers installing and connecting on Linux using our pyodbc driver. If you have trouble with any of the steps, please ask here and we can help you further.

---

<div class="post-metadata">

**Author:** ![abhba](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@abhba](https://community.dremio.com/u/abhba)\
**Post date:** [April 19, 2019, 5:04am UTC](https://community.dremio.com/t/dremio-with-python/3222/3 "2019-04-19T05:04:00Z")

</div>

Hi Doron,  
Thanks for the quick reply .I installed Dremio Linux ODBC driver want to know how to use the Pyodbc package and where to addd those properties enlisted inside document.

And Can I use PYODBC package in Zeppelin Notebook ??

---

<div class="post-metadata">

**Author:** ![ben](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/ben/32/1367_2.png) [@ben](https://community.dremio.com/u/ben)\
**Post date:** [April 21, 2019, 11:43pm UTC](https://community.dremio.com/t/dremio-with-python/3222/4 "2019-04-21T23:43:38Z")

</div>

@abhba,

You’ll have to install pyodbc on you local machine: [https://pypi.org/project/pyodbc/](https://pypi.org/project/pyodbc/)

Then you can import the pyodbc library to your Zeppelin Python notebook. Here’s Zeppelin’s documentation on integrating with the Python interpreter.

[https://zeppelin.apache.org/docs/latest/interpreter/python.html](https://zeppelin.apache.org/docs/latest/interpreter/python.html)

---

<div class="post-metadata">

**Author:** ![abhba](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@abhba](https://community.dremio.com/u/abhba)\
**Post date:** [April 22, 2019, 1:09pm UTC](https://community.dremio.com/t/dremio-with-python/3222/5 "2019-04-22T13:09:51Z")

</div>

I tried with jdbc in zeppelin notebook with the below connection string but getting parse error .

%jdbc(dremio)  
import jaydebeapi

conn = jaydebeapi.connect(“com.dremio.jdbc.Driver”,  
“jdbc:dremio:direct=xx.xx.xx.xx:31010”,  
[“xxxxxxxx”, “xxxxxxx”],  
‘/usr/hdp/current/zeppelin-server/lib/dremio-jdbc-driver-3.1.9-201904051346520183-a35b753.jar’,)  
curs = conn.cursor()  
curs.execute(“show databases”)  
curs.fetchall()  
error:  
java.sql.SQLException: PARSE ERROR: Failure parsing the query.

SQL Query import jaydebeapi

conn = jaydebeapi.connect(“com.dremio.jdbc.Driver”,  
“jdbc:dremio:direct=xx.xx.xx.xx:31010”,  
[“xxxxxxx”, “xxxxxxx”],  
‘/usr/hdp/current/zeppelin-server/lib/dremio-jdbc-driver-3.1.9-201904051346520183-a35b753.jar’,)  
curs = conn.cursor()  
curs.execute(“show databases”)  
curs.fetchall()  
startLine 1  
startColumn 1  
endLine 1  
endColumn 6  
SQL Query import jaydebeapi

---

<div class="post-metadata">

**Author:** ![ben](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/ben/32/1367_2.png) [@ben](https://community.dremio.com/u/ben)\
**Post date:** [April 22, 2019, 5:28pm UTC](https://community.dremio.com/t/dremio-with-python/3222/6 "2019-04-22T17:28:50Z")

</div>

Dremio does not have a `show databases` SQL command. To see look view catalog entities in Dremio, try querying Dremio’s system tables: [https://docs.dremio.com/advanced-administration/querying-metadata.html](https://docs.dremio.com/advanced-administration/querying-metadata.html)

---

<div class="post-metadata">

**Author:** ![laurent](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/laurent/32/16_2.png) [@laurent](https://community.dremio.com/u/laurent)\
**Post date:** [April 22, 2019, 5:55pm UTC](https://community.dremio.com/t/dremio-with-python/3222/7 "2019-04-22T17:55:46Z")

</div>

You can also use the `tables` method of the `cursor` object to access metadata information: [https://github.com/mkleehammer/pyodbc/wiki/Cursor](https://github.com/mkleehammer/pyodbc/wiki/Cursor).

This alternative method is only available when using pyodbc though

---

<div class="post-metadata">

**Author:** ![abhba](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@abhba](https://community.dremio.com/u/abhba)\
**Post date:** [April 22, 2019, 6:06pm UTC](https://community.dremio.com/t/dremio-with-python/3222/8 "2019-04-22T18:06:18Z")

</div>

Hi ben,  
I beg to differ from you I can show you that dremio does have show databases command I tried in Zeppelin only .

---

<div class="post-metadata">

**Author:** ![ben](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/ben/32/1367_2.png) [@ben](https://community.dremio.com/u/ben)\
**Post date:** [April 22, 2019, 6:12pm UTC](https://community.dremio.com/t/dremio-with-python/3222/9 "2019-04-22T18:12:09Z")

</div>

My apologies @abhba; you are correct.

Does this mean you were able to query Dremio successfully from Zeppelin?

---

<div class="post-metadata">

**Author:** ![laurent](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/laurent/32/16_2.png) [@laurent](https://community.dremio.com/u/laurent)\
**Post date:** [April 22, 2019, 6:13pm UTC](https://community.dremio.com/t/dremio-with-python/3222/10 "2019-04-22T18:13:35Z")

</div>

@abhba I edited your post to remove some of your connection information. Please be careful when posting.

---

<div class="post-metadata">

**Author:** ![abhba](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@abhba](https://community.dremio.com/u/abhba)\
**Post date:** [April 23, 2019, 3:49am UTC](https://community.dremio.com/t/dremio-with-python/3222/11 "2019-04-23T03:49:42Z")

</div>

Yes ben .But when I m trying to connect with python .Then I am getting parse error message.

---

<div class="post-metadata">

**Author:** ![abhba](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@abhba](https://community.dremio.com/u/abhba)\
**Post date:** [April 23, 2019, 3:55am UTC](https://community.dremio.com/t/dremio-with-python/3222/12 "2019-04-23T03:55:09Z")

</div>

Hi laurent,  
Thank you so much for doing that .and for the next time I will take care of it.

---

<div class="post-metadata">

**Author:** ![laurent](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/laurent/32/16_2.png) [@laurent](https://community.dremio.com/u/laurent)\
**Post date:** [April 26, 2019, 4:10pm UTC](https://community.dremio.com/t/dremio-with-python/3222/13 "2019-04-26T16:10:18Z")

</div>

As for the original question, this thread has been tracking it: [Connecting dremio with python using jdbc](https://community.dremio.com/t/connecting-dremio-with-python-using-jdbc/3239)
