我正在尝试通过SQL Alchemy连接到Exasol DB
我使用以下方法安装了SQL Alchemy:
from functools import partial
# ...
def readTemp(self):
while True:
try:
temp = modbusFunction.modbusReadRegister(self, '192.168.1.13', 502, 0x1192, 1)
print(temp[0])
QtCore.QTimer.singleShot(0, partial(self.supplyTempResualt.setText, str(temp[0])))
except Exception as err:
print(err)
time.sleep(1)
代码如下:
pip install sqlalchemy-exasol
我也尝试过这个:
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()
无论哪种方式,我都会遇到以下错误:
e = create_engine("exa+pyodbc://<user>:<password>@<host>:<port>/<schema>")
有什么想法吗?我的连接详细信息格式一定出问题了,但是我不确定是什么...