无法使用ODBC驱动程序将Python连接到Hive数据库

时间:2020-02-21 22:52:55

标签: python database hive odbc kerberos

我正在尝试使用ODBC驱动程序将Python终端(Anaconda Spyder)连接到我的组织Hive数据库,该驱动程序已预先配置了“ BDE”名称,代表大数据环境。我已经正确设置了Hive服务器类型,主机,端口,数据库,身份验证机制为Kerberos,领域,HostFQDN和服务类型,以及Thrift Transport为SASL,以及“高级”选项中所需的所有内容。但是每次我运行代码:

import pyodbc
pyodbc.autocommit = True
cnxn = pyodbc.connect("DSN=BDE", autocommit=True)

它给我错误:

Traceback (most recent call last):

  File "<ipython-input-34-702098fe62de>", line 3, in <module>
    cnxn = pyodbc.connect("DSN=BDE", autocommit=True)

Error: ('HY000', '[HY000] [Hortonworks][DriverSupport] (1110) Unexpected response received from server. Please ensure the server host and port specified for the connection are correct and confirm if SSL should be enabled for the connection. (1110) (SQLDriverConnect); [HY000] [Hortonworks][DriverSupport] (1110) Unexpected response received from server. Please ensure the server host and port specified for the connection are correct and confirm if SSL should be enabled for the connection. (1110)')

有人可以帮忙吗?

0 个答案:

没有答案