Run Queries
Overview
The Query Editor is an SQL editor that enables Athena to assist you in interacting with complex datasets.
You can use it to co-pilot SQL queries, explore organizational knowledge around SQL workflows, and execute SQL workflows with Athena.
Step by step: Execute SQL in Query Editor
Find the Query Editor in the main sidebar, under Data Analyst Tools
Click on the datasets you want to query to add to Workbench
input your query into the SQL editor
Execute your query by clicking Run
View query results in the bottom pane
Basics
The Query Editor module interface is split into two main panes:
Left Pane
The top section displays a tree of data catalogs, datasets and SQL snippets, making it easy to find and select the data you want to query.
Use the Search bar to find datasets and query snippets.
The bottom section, Workbench, is the control panel.
Click on a table or query snippet to add it to Workbench. Once an item is there, you can see item-specific actions (e.g., Preview or Explore).
Placing items in Workbench also gives Athena access to the context of these items:
Dataset metadata: columns names and types, sample values
Query Snippet contents: SQL code and description
Right Pane
This area is dedicated to writing and running your SQL queries. The top section features a SQL query editor with syntax highlighting, aiding in writing clear and error-free queries. The bottom section presents the query results table, where you can see the output of your executed queries.
Chat
Head to Copilot Queries with Athena to learn about using Chat for copilot workflows in Query Editor.