Skip to content
/ aq Public

Command Line Tool for AWS Athena (bq command like)

License

Notifications You must be signed in to change notification settings

mia-0032/aq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aq (Athena Query CLI)

Command Line Tool for AWS Athena (bq command like)

Installation

Install by gem:

$ gem install aq

Usage

All commands need --bucket option because Athena stores query result into S3. You can specify it by AQ_DEFAULT_BUCKET environment variable.

help

Display command help

$ aq help
$ aq help [COMMAND]

ls

Show databases or tables in specified database

$ aq ls
$ aq ls my_database_name

head

Show records in specified table

$ aq head my_db.my_table

mk

Create database

$ aq mk my_database_name

load

Create table and load data

$ aq load my_db.my_table s3://my_bucket/my_object_key/ test/resource/schema.json --partitioning dt:string

rm

Drop database or table

$ aq rm my_db
$ aq rm my_db.my_table

query

Run query

$ aq query 'SELECT * FROM "test"."test_logs" limit 10;'

Development

todo: write

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/mia-0032/aq

About

Command Line Tool for AWS Athena (bq command like)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages