Query AWS Athena with Emacs using jdbc
If you haven't checked out ejc-sql, you should now.
Official JDBC connection setup using jdbc drivers is available here - https://github.com/kostafey/ejc-sql#create-connections-manualy
It has support for
- MySQL
 - MariaDB
 - MS SQL Server
 - Oracle
 - H2
 - SQLite
 - PostgreSQL
 - Informix
 - Presto
 
And also allows you to add custom jdbc drivers using ejc-jdbc-drivers
You can customize artifacts and their versions used as JDBC drivers for each database type in Leiningen format in ejc-jdbc-drivers custom variable.
Here is how I setup it up
 | 
 | 
I mostly use this in org-mode buffer so that I can analyse data and make notes about it.
EDIT 08/04/2021
You may also simplify connection configuration using Profile attribute in :connection-uri with the latest Athena JDBC driver.
This also helps if you are using AWS STS temporary tokens for authenticating with AWS.
 | 
 |