Skip to content

Example Usage of AWS S3 and Athena

Notifications You must be signed in to change notification settings

salman0/aws-s3-athena

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aws-s3-athena

Example scripts for working with AWS S3 and Athena

Usage

Install requirements

pip install -r requirements.txt

Update .config.yml

AWS_ACCESS: AWS_ACCESS_KEY
AWS_SECRET: AWS_SECRET_KEY
BUCKET_NAME: NAME_THE_BUCKET_UNIQUELY

Ensure provided keys have sufficient permissions

AWS Permissions For Scripts

Create bucket and upload data to S3

python setup.py

Run queries, results will be in S3

python query_csv.py

Remove files loaded into S3 and delete bucket

python teardown.py

Notes

  • Athena does not support multiple file types within a directory
  • multi-line JSON files not supported
  • AWS Glue has schema automatic exploration feature to help with table definitions
  • Query results are on S3 but may be delayed in execution

References

Potential Updates

About

Example Usage of AWS S3 and Athena

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages