0

I'm using the driver 'Dremio ODBC Driver 64-bit' however when I run:

engine = create_engine("""{}+pyodbc://{}:{}@{}/""".format(driver,uid,pwd,host))

with driver = 'Dremio ODBC Driver 64-bit' I get the following error (I changed it to uid:pwd for obvious reasons...)

sqlalchemy.exc.ArgumentError: Could not parse rfc1738 URL from string 'Dremio ODBC Driver 64-bit+pyodbc://uid:pwd@localhost:31010/'

which I believe comes from the spaces. I've tried changing the Driver name to Dremio by changing the header [Dremio ODBC Driver 64-bit] in odbcinst.ini to [Dremio] but that gave the error:

sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:Dremio

so I don't think I did it correctly, maybe there's something else to change?

  • It is not sufficient to just have an ODBC driver and a copy of `pyodbc`, you'll still need a SQLAlchemy *dialect* in order to work with a specific database. SQLAlchemy has built-in support for Microsoft SQL Server (`mssql+pyodbc://`) and external dialects exist for [Microsoft Access](https://pypi.org/project/sqlalchemy-access/) (`access+pyodbc://`) and [SAP ASE](https://pypi.org/project/sqlalchemy-sybase/) (`sybase+pyodbc://`) so you need to check with the Dremio people to see if a SQLAlchemy dialect is available for their back-end. – Gord Thompson Dec 08 '20 at 23:55
  • Perhaps https://pypi.org/project/sqlalchemy-dremio/ – Gord Thompson Dec 09 '20 at 00:02
  • @GordThompson thanks didn't realise this existed. – Maximilian Powers Dec 09 '20 at 00:34
  • @GordThompson Documentation seems quite sparse could you add an example of an implementation? – Maximilian Powers Dec 09 '20 at 00:53
  • Sorry, no. I have no experience with that dialect and no practical way to test it. If you want support for that dialect then you'll have to get it from them. – Gord Thompson Dec 09 '20 at 01:18

0 Answers0