我想使用python连接hive
,只在JDBC连接上使用python。我已经尝试了pyhive
它工作得很好,但是我需要使用JDBC连接将python与hive连接起来。在
我尝试下面的代码使用JDBC连接将python与hive连接起来
import jaydebeapi
def get_hive_jdbc_con():
driver="org.apache.hive.jdbc.HiveDriver"
conn_url="jdbc:hive2://system101.xxx.com:10000/default".format(host="system101.xxx.com",port=10000)
auth_lst=["hive","hive"]
conn = jaydebeapi.connect(driver,conn_url,auth_lst,)
return conn
if __name__ == '__main__':
get_hive_jdbc_con()
我得到了这个错误
^{pr2}$
目前没有回答
相关问题 更多 >
编程相关推荐