Athena client to do query on Amazon Athena
Project description
PyAthena
A python client to query on Athena Database. Query results are formatted in pandas dataframe.
Install
pip install git+https://github.com/yardstick17/PyAthena.git
Usage
In [9]: from athena import Athena
In [10]: query = """SELECT col1, col2, col3, col3
FROM "database"."table1"
WHERE col1 = 'PI912A0CV-O12'
AND col2 = '2019-03-04'
AND schema='best_model_ever'
"""
In [11]: df = athena_client.execute_with_pandas(query=query)
In [12]: df.head()
Out[12]:
col1 col2 col3 col3
0 PI912A0CV-O12 0 0.0 2.623155
1 PI912A0CV-O12 0 0.0 2.095256
2 PI912A0CV-O12 0 0.0 1.904961
3 PI912A0CV-O12 0 0.0 0.829332
4 PI912A0CV-O12 0 0.0 0.058469
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
python-athena-0.2.0.tar.gz
(1.7 kB
view hashes)
Built Distribution
Close
Hashes for python_athena-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32431fd722d1b479030b464582a1bbbc1837251bf9ff77dcd6b2d4743f70fb5b |
|
MD5 | 43d4ea6c18ba68887a1c5a3d10f846eb |
|
BLAKE2b-256 | 0ef4353b1251ee653359cf1569573b83c76674a484e628be77fe8327c66419f0 |