In [1]:
from impala.dbapi import connect
conn = connect(host='impalasrv-test', port=21050)
In [2]:
cur = conn.cursor()
cur.execute('select * from test2.emp limit 2')
cur.fetchall()
Out[2]:
In [3]:
cur = conn.cursor()
cur.execute('select * from test2.emp')
from impala.util import as_pandas
df = as_pandas(cur)
df.head()
Out[3]:
In [4]:
cur = conn.cursor()
cur.execute('select ename, sal from test2.emp')
df = as_pandas(cur)
%matplotlib inline
import matplotlib
matplotlib.style.use('ggplot')
df.plot()
Out[4]:
In [ ]: