0

I am trying to connect to Exasol DB through SQL Alchemy

I installed SQL Alchemy using:

pip install sqlalchemy-exasol

Code is below:

from sqlalchemy import create_engine

e = create_engine("exa+pyodbc://<user>:<password>@<host>:<port>/<schema>?CONNECTIONLCALL=en_US.UTF-8&driver=com.exasol.jdbc.EXADriver")
e.execute("Select count(*) from TableA").fetchall()

I have also tried this:

  e = create_engine("exa+pyodbc://<user>:<password>@<host>:<port>/<schema>")

Either way I getting the following error:

Traceback (most recent call last):
  File "C:\Users\xxx\AppData\Local\Continuum\Anaconda3\lib\site-packages\sqlalchemy\pool.py", line 1122, in _do_get
    return self._pool.get(wait, self._timeout)
  File "C:\Users\xx\AppData\Local\Continuum\Anaconda3\lib\site-packages\sqlalchemy\util\queue.py", line 145, in get
    raise Empty
sqlalchemy.util.queue.Empty

During handling of the above exception, another exception occurred:

sqlalchemy.exc.InterfaceError: (pyodbc.InterfaceError) ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0) (SQLDriverConnect)')

Any ideas? Something must be wrong with my connection details format but I am not sure what...

JD2775
  • 3,658
  • 7
  • 30
  • 52

1 Answers1

0

The error message sounds like the odbc driver DNS was not configured properly. Install the ODBC driver.

Exasol
  • 26
  • 3
  • 1
    This was posted as an answer, but it does not attempt to answer the question. To request clarification from the author, [post it as a comment](https://stackoverflow.com/help/privileges/comment). If you haven't [earned reputation](https://stackoverflow.com/help/whats-reputation) to post a comment yet, try to get comfortable writing answers first. – Eduardo Baitello Jul 23 '19 at 13:29