Skip to main content
This page sets up an Amazon Athena connection that authenticates with an AWS access key. Datafold reads the tables the key can access and writes scratch tables to a schema you create for it.

Before you begin

  • Permission to create S3 buckets and IAM access keys in your AWS account.
  • The AWS region of your Athena data.
  • Permission to add data connections in Datafold.

Set up Athena

1

Create an S3 bucket

Datafold uses this bucket to store the data of the temporary tables it creates. If you don’t already have a bucket for Athena, create one. See Creating a bucket in the AWS documentation.
2

Create an access key

Create an AWS access key ID and secret access key for Datafold. The IAM user or role behind the key needs:
  • Athena permissions to run queries, for example athena:StartQueryExecution, athena:GetQueryExecution, athena:GetQueryResults and athena:StopQueryExecution on your workgroup.
  • AWS Glue Data Catalog read access to the databases and tables in scope, and write access (glue:CreateTable, glue:DeleteTable, glue:UpdateTable) to the temporary schema you create in the next step.
  • S3 read access to the buckets that hold your table data, and read and write access to the bucket you created in the previous step.
See Managing access keys and Identity and access management in Athena in the AWS documentation.
3

Create a temporary schema

Datafold writes scratch tables to this schema so that data processing stays in your warehouse. In the Athena query editor, select the AwsDataCatalog data source and run:

Network access

If your AWS resources only accept connections from allowlisted IP addresses or are only reachable over a private network, see Securing connections for the options Datafold supports.

Add the connection in Datafold

Go to Settings → Integrations → Data Connections, click Add new integration and choose Amazon Athena. Click Save.