mkleehammer / pyodbc

Python ODBC bridge
https://github.com/mkleehammer/pyodbc/wiki
MIT No Attribution
2.92k stars 561 forks source link

Pyodc prefix hive keyword #1248

Closed srikanthtist closed 1 year ago

srikanthtist commented 1 year ago

I have written python script in windows 10 I am trying to connect hive database installed on linux using pyodc. I am able to connect to hive database successfully but unable to read data from table as ..hive keyword is getting prefixed

I have used ODBC DataSource 64bit to create userdsn named DEV and the driver is Cloudera ODBC Driver for Apache Hive

Code Import pyodbc con =pyodbc.connect('DSN=DEV",autocommit=True) query="select * from product" cur=con.cursor() cur.execute(query) cur.close()

Error Table or view not found Hive..product'

Note:- Hive keyword getting prefixed

v-chojas commented 1 year ago

pyODBC doesn't touch the query, it just passes it to the driver. Look at your driver documentation for more information.