Source: https://gitlab-test-org.docs.pageloop.ai/fyno-connect-athena

# Athena

Connect your Amazon Athena database to Fyno Connect with your AWS details and credentials. Once connected, you can build cohorts directly from the data in your database.

## Connect your Athena database

1. **Open Athena from Databases**

   Go to **Databases** and click **Athena**. The **Add a Athena database** pop-up opens.
2. **Enter the connection details**

   Fill in the following fields:
   - **Custom Name**: A name to identify this connection in Fyno Connect.
   - **AWS Region**: The AWS region your Athena database is in.
   - **AWS Access Key ID**: The access key ID of the AWS credentials used to connect. Leave this blank if you intend to use an IAM user.
   - **AWS Secret Access Key**: The secret access key for those credentials. Leave this blank if you intend to use an IAM user.
   - **Database**: The name of the Athena database you want to connect.
   - **Output Bucket**: The S3 bucket where Athena writes query results.
   - **Partition Column** (optional): The partition column to use when querying the data.
   - **Partition Column Value** (optional): The value of the partition column to query.
   - **Workgroup**: The Athena workgroup to run queries in.
   All fields except Custom Name are masked by default. Click the eye icon on a field to view its value.

   ![Add a Athena database pop-up](assets/fyno-connect-athena-add-database.png)
3. **Add the database**

   Click **Add Database**. Fyno tests the connection and saves it once the test succeeds. The database then appears under **Connected DBs** on the same page.
4. **Create cohorts**

   You can now create cohorts from the data in your database. See [Create Cohorts](./how-to-create-a-cohort-in-fyno-connect).
