DataLab Docs
  • What is DataLab?
  • Work
    • Creating a workbook
    • Sharing a workbook
    • Managing a workbook
    • Code cell
      • Working with packages
    • Text cell
      • Including images
    • SQL cell
      • SQL scenarios
      • Parameterize your SQL query
    • Explore Data cell
    • Chart cell
      • Configuring your chart
      • Pivot charts
      • Migration guide
    • AI Assistant
    • Version history
    • Scheduled runs
    • Hiding and showing cells
    • Long-running cells
    • Report view
    • Environment variables
    • Git and GitHub
  • Connect to Data
    • Connect your data to DataLab
    • Sharing a Data Source
    • Airtable
    • Amazon Athena
    • Amazon S3
    • Databricks
    • Dropbox
    • Files
    • Google Drive
    • Google BigQuery
    • Google Sheets
    • MariaDB
    • Microsoft SQL Server
    • MongoDB
    • MotherDuck
    • MySQL
    • Oracle Database
    • PostgreSQL
    • Redshift
    • Snowflake
    • Supabase
  • Guides
    • Publish a notebook
    • Importing data from flat files
    • Resizing plots
    • Show Bokeh and Pyvis plots
  • Resources
    • Pricing
    • Manage group settings
    • Reporting for Group Admins
    • DataLab for education
    • Technical requirements
    • Addressing slow code
    • Address R vulnerability
    • Get help
Powered by GitBook
On this page
  1. Connect to Data

Amazon Athena

PreviousAirtableNextAmazon S3

Last updated 1 year ago

Was this helpful?

CtrlK
  • Set up an Amazon Athena data connection
  • Query the database

Was this helpful?

Set up an Amazon Athena data connection

When inside a workbook, click View > Databases, then click the + icon and follow the on-screen instructions. For more information on how to configure Amazon Athena and how to generate access keys, click here. Make sure the IAM user associated with the credentials has write access to the specified output bucket/folder. The output folder is used to write results of your query to and is ideally separated from the main data in the bucket.

Note: the output bucket should be an s3 url, meaning it should start with s3://

For detailed instructions, see Connect your data to DataLab.

Query the database

You can now query Amazon Athena with a SQL cell. Select it in the Select source dropdown in the top left corner of a SQL cell, or select the sample Amazon Athena connection.

Example of a SQL cell using the MyAthena connection. The query result is available as df1.