Mastering Development

python pyhs2.query execution not finished

import pyhs2 with pyhs2.connect(host=’ip’, port=10000, authMechanism=”PLAIN”, user=’id’, password=’password’, database=’default’) as conn: with conn.cursor() as cur: # Show databases print cur.getDatabases() #Execute query data_sql = data_sql.format(from_date=first,to_date=last) cur.execute(data_sql) # Return column info from query col = [a[‘columnName’] for a in cur.getSchema()] df = pd.DataFrame(cur.fetch(),columns= col) df.head() i running a query in anaconda tool.. in hue site, i […]