1

Python: 3.6.8 pyodbc: 4.0.27 OS: ubuntu 18.04 DB: Hive 0.13 driver: Hortonworks ODBC driver for Hive downloaded at http://public-repo-1.hortonworks.com/HDP/hive-odbc/2.1.2.1002/debian/hive-odbc-native_2.1.2.1002-2_amd64.deb

I'm able to connect with

pyodbc.connect('host=...', driver='...', 
                    HiveServerType=2,
                    port=10000,,
                    uid='username',
                    password='password',
                    AuthMech=3,
                    ssl=1,
                    AllowSelfSignedServerCert=1,
                    AutoCommit=1,
                    UseNativeQuery=1,
)

and obtain cursor. Then

cursor.execute('show databases')

returns

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
pyodbc.Error: ('HY000', "[HY000] [Hortonworks][Hardy] (80) Syntax or semantic analysis error thrown in server while execurint query. Error message from server: Error while compiling statement: FAILED: ParseException line 1:14 cannot recognize input near '<EOF>' '<EOF>' '<EOF>' (80) (SQLExecDirectW)")

('HY000', "[HY000] [Hortonworks][Hardy] (80) Syntax or semantic analysis error thrown in server while execurint query. Error message from server: Error while compiling statement: FAILED: ParseException line 1:14 cannot recognize input near '<EOF>' '<EOF>' '<EOF>' (80) (SQLExecDirectW)")
>>>  

I believe somewhere in my usage is wrong. This makes it totally unusable. Please help! Thanks a lot.

zpz
  • 354
  • 1
  • 3
  • 16
  • This is also being discussed on GitHub [here](https://github.com/mkleehammer/pyodbc/issues/662). – Gord Thompson Dec 22 '19 at 17:56
  • Yes that's me. I thought the diff channels will get the attention of diff people. The issue is blocking my work. – zpz Dec 23 '19 at 06:52

0 Answers0