Skip to content
This repository was archived by the owner on Mar 18, 2022. It is now read-only.

ODBC Issues, Downgrading from Flight --> ODBC --> REST #66

@be-rock

Description

@be-rock
  • Dremio client version: 0.12.0
    would be helpful to have a --version here:
dremio_client --version
  • Dremio version: 4.2.1-202004111451200819-0c3ecaea
  • Python version: 3.8.2
  • Operating System: MacOS

Description

Hi. I'm trying to connect over ODBC with dremio_client. Always see the following when trying to execute a query.:

WARNING:root:Unable to run query as flight, downgrading to odbc
WARNING:root:Unable to run query as odbc, downgrading to rest

The flight downgrade is not surprising and acceptable for now but the ODBC downgrade is a bit surprising. I think that is tied to this:
https://github.com/rymurr/dremio_client/blob/f892563f64ed07c00b4a1314172d3ea9d324d41c/dremio_client/odbc.py#L31

What I Did

When trying to connect over ODBC via pyodbc driver name: Dremio ODBC Driver i see the following. Note, this is external to dremio_client for the sake of this test...

pyodbc.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'Dremio ODBC Driver' : file not found (0) (SQLDriverConnect)")

However, changing the driver name to the absolute path of the dylib resolves the issue such as:
/Library/Dremio/ODBC/lib/libdrillodbc_sbu.dylib.
I believe this is why dremio_client is downgrading from odbc --> rest. Is there a way to override the default driver constant defined as _OSX_DRIVER here:
https://github.com/rymurr/dremio_client/blob/f892563f64ed07c00b4a1314172d3ea9d324d41c/dremio_client/odbc.py#L31

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions