Skip to content

A tool to execute Athena's query and execute results from s3 to DL

Notifications You must be signed in to change notification settings

yutachaos/athena-query-executor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Athena query executor

  • Executes a query on Athena and gets the result and download csv locally

Require

  • Settings are read from environment variables, so AWS authentication key is required
AWS_ACCESS_KEY_ID=xxxx
AWS_SECRET_ACCESS_KEY=xxxx
AWS_DEFAULT_REGION=xxx
// Specify with S3 path to save the execution result of Athena, instead of -result-save-bucket flag
ATHENA_RESULT_BUCKET=S3Path

Usage

  • query
    • The query to execute
  • result-save-bucket
    • Bucket where the query execution result is saved

go run

  • go run main.go -query "SHOW DATABASES" -result-save-bucket hoge-bucket

About

A tool to execute Athena's query and execute results from s3 to DL

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages