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 2019-03-04 0.0 2.623155
1 PI912A0CV-O12 2019-03-04 0.0 2.095256
2 PI912A0CV-O12 2019-03-04 0.0 1.904961
3 PI912A0CV-O12 2019-03-04 0.0 0.829332
4 PI912A0CV-O12 2019-03-04 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.1.tar.gz
(1.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python-athena-0.2.1.tar.gz.
File metadata
- Download URL: python-athena-0.2.1.tar.gz
- Upload date:
- Size: 1.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.11.1 setuptools/40.4.3 requests-toolbelt/0.9.1 tqdm/4.24.0 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
479d8cd1dbd3aa88c7b3e874f93120e0f4b774bc5cbd904d5b7bbecc842fd98b
|
|
| MD5 |
073b77639dacd272fc3031b04245a4f7
|
|
| BLAKE2b-256 |
0f58f1f300a3ed57e7b93e455149d73ec74ac53e668eacb303f0fff159ac5735
|
File details
Details for the file python_athena-0.2.1-py3-none-any.whl.
File metadata
- Download URL: python_athena-0.2.1-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.11.1 setuptools/40.4.3 requests-toolbelt/0.9.1 tqdm/4.24.0 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a811c6cc6681ad2294bf60c83d6775adf686fe665ccb8f68d17c2caa03da2cc0
|
|
| MD5 |
70da151253718fa39e98e6f9667b5212
|
|
| BLAKE2b-256 |
6670fb9c38aa35c702fd0b1389facdb373c6156c62312879ca8c55a289cdea2a
|