athena connector python

Solutions on MaxInterview for athena connector python by the best coders in the world

showing results for - "athena connector python"
Noemi
22 Sep 2020
1from pyathena import connect
2from pyathena.util import as_pandas
3
4cursor = connect(aws_access_key_id="YOUR_ACCESS_KEY_ID",
5                 aws_secret_access_key="YOUR_SECRET_ACCESS_KEY",
6                 s3_staging_dir="s3://YOUR_S3_BUCKET/path/to/",
7                 region_name="us-west-2").cursor()
8cursor.execute("SELECT * FROM many_rows")
9df = as_pandas(cursor)
10print(df.describe())
11