• Athena
  • Aws
About 2 min

# Athena

Athena enables you to have a data lake of your data at rest in S3. You can then use standard ansi-sql to query this data. It should be stored in json-serde, or parquet format.

"Amazon Athena is an interactive query service that makes it easy to analyze data in Amazon S3 using standard SQL. Athena is serverless, so there is no infrastructure to setup or manage, and you pay only for the queries you run. To get started, simply point to your data in S3, define the schema, and start querying using standard SQL". - AWS

# Anatomy of Athena

Athena in Commandeer is compromised of a few main pieces.

Athena Treeview in Commandeer

Athena Treeview as seen on Commandeer

# Dashboard

The dashboard allows you to view summary information about your athena setup. This includes the databases that are setup, and the tables and views associated with them.

# Query Runner

The query runner allows you to run SQL queries against your data.

# Anatomy of Query Runner

# 1. Toolbar - Database Selection & Run
  • Database Selection - you can select which database your query will run against
  • Run - run your sql query

Top nav section of the Query Runner

# 2. Query Editor Pane

The good old comfy confines of the Monaco Editor. This is an open-source project run by Microsoft. It gives you their editor from Visual Studio Code, and enables you to embed it in your web and desktop apps.

 * vw_user - view to get active users who are NOT leads
FROM vw_user
WHERE is_active = true
  AND is_lead = false
# 3. Results Pane

This is where tabular results of your queries are located.


Results pane

# 4. History & Favorites

These are queries that you have run in the past, available to quickly run again. You can have them auto run when selected. You can also favorite them, as well as copy them to your clipboard.

# Databases

Athena is a SQL style database of your S3 files. It consists of one or more databases that can have many tables and views. Each table and view then has columns. It is much like a SQL database in this regard.

Treeview of Athena, showing the commandeer database along with the tables

# Settings

  • S3 Output Location - in order to run queries, you must create an S3 bucket that will contain the result payloads.
  • Auto-run selected history item - select if clicking on a history or favorite item in the side list view will automatically run the query or not.
  • Cmd + D - run your query

Last update: October 7, 2020 01:38