Run impala query with remotely executed Python code using ODBC Run impala query with remotely executed Python code using ODBC hadoop hadoop

Run impala query with remotely executed Python code using ODBC


So apparently I could benefit from my previously configured ODBC driver/connection.By supplying the DSN I found in the ODBC Administrator tool I could solve my issue. I ended up using pyodbc.

import pyodbccfg = {'username':'...', ...}connString = '''DSN={3};UID={0};PWD={1};Database={2}'''.format(cfg['username'],cfg['password'],cfg['database'],cfg['dsn'])pyodbc.autocommit = Trueconn = pyodbc.connect(connString, autocommit = True)cursor = conn.cursor()