Use Query Snippets
Query Snippets are saved SQL queries that can be added to Workbench to give Athena context for copilot workflows.
Query Snippets are shown right below the Data Catalog in the right pane of the Query Editor.
Add a Query Snippet to Workbench to:
Share the snippet context with Athena
Use the snippet query: Preview to display results, Explore to put in the editor
Edit the snippet
When you use chat, Athena will see the Query Snippet that's attached to a Workbench, so you don't have to paste SQL code or query context that's saved in the Query Snippet description.
In the example below, Athena used the Equipment average maintenance frequency SQL query to generate SQL for median maintenance frequency.
Click on the Save button (next to Run and Chat) to save a new snippet.
Snippet Visibility
Saved snippets are shared with the workspace. You can use snippets to share SQL context across your team and build Athena's understanding of your organization's SQL workflows together.