# Enable flight in dremio to query dataset with dremio client

**URL:** <https://community.dremio.com/t/enable-flight-in-dremio-to-query-dataset-with-dremio-client/7830>\
**Category:** Uncategorized\
**Created:** [August 5, 2021, 7:21am UTC](https://community.dremio.com/t/enable-flight-in-dremio-to-query-dataset-with-dremio-client/7830 "2021-08-05T07:21:29Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![capihacendado](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/capihacendado/32/3464_2.png) [@capihacendado](https://community.dremio.com/u/capihacendado)\
**Post date:** [August 5, 2021, 7:21am UTC](https://community.dremio.com/t/enable-flight-in-dremio-to-query-dataset-with-dremio-client/7830/1 "2021-08-05T07:21:29Z")

</div>

Hi,  
I am having some issues trying to query dremio with python.  
I have python 3.8.5, pyarrow 3.0.0 and dremio connector 0.14.0

Basically when I run the script

```auto
import pandas as pd 
from dremio_client import flight

def my_flight_df(sql, conn):
    return flight.query(
        sql,
        hostname=conn['host'],
        port=32010,
        username=conn['uid'],
        password=conn['pwd'],
        tls_root_certs_filename=None,
    )

df = my_flight_df(query, params)

```

I am getting this error

```auto
FlightUnavailableError: gRPC returned unavailable error, with message: failed to connect to all addresses

```

**Is there something I need to set up before querying using FLIGHT?**

I have also try to run my query with odbc and I am getting an auth error, but I am 100% I wrote the right credentials

```auto
InterfaceError: ('28000', '[28000] [Dremio][Connector] (40) User authentication failed. Server message: [30017]User authentication failed (please check the username and password).[Server message was: (8a0d73df-05cc-4e57-afbb-a340d3c7744c) Invalid user credentials, user capi] (40) (SQLDriverConnect); [28000] [Dremio][Connector] (40) User authentication failed. Server message: [30017]User authentication failed (please check the username and password).[Server message was: (8a0d73df-05cc-4e57-afbb-a340d3c7744c) Invalid user credentials, user capi] (40)')

```

**Is there something I need to set up before querying using python?**

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [August 11, 2021, 2:32pm UTC](https://community.dremio.com/t/enable-flight-in-dremio-to-query-dataset-with-dremio-client/7830/2 "2021-08-11T14:32:55Z")

</div>

@capihacendado Just checked with our flight team and Dremio client for python is not yet updated for the new flight auth method

---

<div class="post-metadata">

**Author:** ![capihacendado](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/capihacendado/32/3464_2.png) [@capihacendado](https://community.dremio.com/u/capihacendado)\
**Post date:** [August 17, 2021, 11:47am UTC](https://community.dremio.com/t/enable-flight-in-dremio-to-query-dataset-with-dremio-client/7830/3 "2021-08-17T11:47:46Z")

</div>

Hi @balaji.ramaswamy

Thank you so much for your answer.  
is there a way in which I can then use obdc to query data from dremio??

Or I won’t be able to query my dremio instance from python?

> **[Using Pandas With Dremio For Quantitative Sports Betting](https://www.dremio.com/tutorials/pandas-probabilities-processing-dremio-sports-betting/)**
>
> Tutorial explaining how to use Pandas with Dremio.

AS I said in my previous post, I am not able to connect using OBDC, I am getting credential issues. But my credentials are 100% right (I am able to get the data with Tableau for example)

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [August 18, 2021, 7:51am UTC](https://community.dremio.com/t/enable-flight-in-dremio-to-query-dataset-with-dremio-client/7830/4 "2021-08-18T07:51:57Z")

</div>

@capihacendado Have you tried with a JDBC tool like Dbeaver, just want to narrow dow the wrong password issue

---

<div class="post-metadata">

**Author:** ![capihacendado](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/capihacendado/32/3464_2.png) [@capihacendado](https://community.dremio.com/u/capihacendado)\
**Post date:** [August 18, 2021, 8:32am UTC](https://community.dremio.com/t/enable-flight-in-dremio-to-query-dataset-with-dremio-client/7830/5 "2021-08-18T08:32:33Z")

</div>

Hi @balaji.ramaswamy

Thank you so much for your answer,  
Yes I have not troubles to connect with dremio using dbeaver. I have copied the credentials from the json I use to connect with python. So it is the same credentials.  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/2X/4/4a94e28c618140222e0c581e4ba7e8deedc9df68.png)

---

<div class="post-metadata">

**Author:** ![YEN](https://avatars.discourse-cdn.com/v4/letter/y/50afbb/32.png) [@YEN](https://community.dremio.com/u/YEN)\
**Post date:** [August 18, 2021, 7:23pm UTC](https://community.dremio.com/t/enable-flight-in-dremio-to-query-dataset-with-dremio-client/7830/6 "2021-08-18T19:23:26Z")

</div>

Hi @capihacendado ,  
Could you describe your setup ? Docker ?  
Try to take a look there: [Install/config issue arrow flight on dremio docker](https://community.dremio.com/t/install-config-issue-arrow-flight-on-dremio-docker/7045)  
I think you just need to amend the file /opt/dremio/conf/dremio.conf

Let us know if it works,

Y.

---

<div class="post-metadata">

**Author:** ![capihacendado](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/capihacendado/32/3464_2.png) [@capihacendado](https://community.dremio.com/u/capihacendado)\
**Post date:** [September 16, 2021, 12:05pm UTC](https://community.dremio.com/t/enable-flight-in-dremio-to-query-dataset-with-dremio-client/7830/7 "2021-09-16T12:05:38Z")

</div>

Hi @YEN

Thank you so much for your advice! I followed the steps you mention and it worked perfectly 🙂

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [September 21, 2021, 6:07am UTC](https://community.dremio.com/t/enable-flight-in-dremio-to-query-dataset-with-dremio-client/7830/8 "2021-09-21T06:07:17Z")

</div>

Thanks @YEN for the help
