Enable flight in dremio to query dataset with dremio client

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

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

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

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?

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

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?

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)

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

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

Hi @capihacendado ,
Could you describe your setup ? Docker ?
Try to take a look there: Install/config issue arrow flight on dremio docker
I think you just need to amend the file /opt/dremio/conf/dremio.conf

Let us know if it works,

Y.

Hi @YEN

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

Thanks @YEN for the help