I have a python3.5 solution which currently access sql server, I need to connect it to hive on HDInsight to query.
I installed hive through pip3 but wile import am getting error as "Hive module not found".
I also was not able to install sasl through pip3, hence couldn't use pyHive as it has a dependency on sasl.
I tried with pyodbc to connect by using the code below:
pyodbc.autocommit = True
con = pyodbc.connect(Driver=Hortonworks Hive ODBC Driver;Host=<host_name>t;Port=10000;HiveServerType=2;AuthMech=3;ThriftTransport=SASL;Schema=Hive_database;UID=user_name;PWD=password, autocommit=True)
but am getting the following error:
pyodbc.Error: ('HY000', '[HY000] [Hortonworks][Hardy] (34) Error from server: connect() failed: errno = 10060. (34) (SQLDriverConnect)')
Please let me know where I am going wrong to connect hive from my python solution.