athenacli | CLI tool for AWS Athena service | Command Line Interface library
kandi X-RAY | athenacli Summary
kandi X-RAY | athenacli Summary
AthenaCLI is a command line interface (CLI) for the Athena service that can do auto-completion and syntax highlighting, and is a proud member of the dbcli community.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Watch a query
- Execute a special command
- Parse special command
- Show help for a given keyword
- Execute athenacli
- Write default config file
- Make a directory
- Run the CLI
- Yield SQL statements
- Extract tables from an SQL statement
- Extend function metadata
- Get the version number
- List databases
- Set the tee file
- Change the prompt format
- Set pager
- Return a list of possible column matches
- Get keywords matching the given suggestion
- Extract tables from a SQL statement
- List all tables
- Read configuration files
- Read config file
- Background refresh function
- Execute favorite query
- Execute a file query
- Return a pygments style from the given name
- Return a list of user - defined function matches
athenacli Key Features
athenacli Examples and Code Snippets
Community Discussions
Trending Discussions on athenacli
QUESTION
I am trying to run a set of Athena SQL statements through the AWS CLI commands and I need to know the following
The set of SQL queries are in a file and I need to sequentially iterate the --query-string in the following CLI command for each query through a python script
I can use FOR loop to get the sql commands from the file but I don't know how to parameterize it in AWS CLI command.
AWS CLI Command ...ANSWER
Answered 2018-Dec-19 at 16:15#!/bin/bash
while IFS='' read -r sql || [[ -n "$sql" ]]; do
aws athena start-query-execution \
--query-string "$sql" \
--query-execution-context Database=test45 \
--result-configuration OutputLocation=s3://test/ \
--output text
done < "$1"
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install athenacli
Homebrew users can install by:. If you don't know how to install python packages, please check the Install page for more options (e.g docker).
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page