https://github.com/ccakes/athenacli-rs
CLI tool for running queries against AWS Athena
https://github.com/ccakes/athenacli-rs
Last synced: 10 months ago
JSON representation
CLI tool for running queries against AWS Athena
- Host: GitHub
- URL: https://github.com/ccakes/athenacli-rs
- Owner: ccakes
- License: mit
- Created: 2020-07-29T07:37:41.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-30T15:25:33.000Z (almost 6 years ago)
- Last Synced: 2025-08-02T10:50:53.190Z (11 months ago)
- Language: Rust
- Size: 21.5 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES
- License: LICENSE
Awesome Lists containing this project
README
# athenacli
This is a simple CLI tool for executing queries against AWS Athena. This scratches a personal itch as the AWS CLI is cumbersome to work with for this use case and the alternatives seem predominantly to be in scripting languages that require more setup than I'd like.
This is simple to include in scripts and can run queries either passed in via an argument or from a file and is a statically-compiled binary for extra simple deployments.
### Getting Started
Head over to the [Releases](https://github.com/ccakes/athenacli-rs/releases) page to download a binary for Linux or macOS.
### Usage
```
$ athenacli --help
athenacli 0.2.0
Basic Athena CLI
USAGE:
athenacli [FLAGS] [OPTIONS] --database --region --results
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
-v Logging verbosity (repeat for more detail)
OPTIONS:
-c, --command ... run a single SQL statement, can be repeated
-d, --database database name to connect to
-f, --file execute one or more SQL statements from a file, then exit
-r, --region AWS region [env: AWS_REGION=]
-b, --results S3 bucket name for results (eg s3://my-results)
-w, --workgroup Athena workgroup to use
```
### Authentication
This uses the standard methods for discovering AWS credentials, it'll check the environment, `~/.aws/config` and look for EC2 metadata (I _think_ in that order..)
### Contributions
Contributions are welcome - feel free to submit a PR!
### License
MIT