---
schema_version: "1"
id: 4a150ae8d52c48c1f0afe74db83121587094a2bf129afdbc908b668eb67ca7d6
title: Amazon Athena
collection: tableau
version: next
locale: en-gb
portal_url: https://docs.salesforce.com/tableau/next/en-gb/pro/desktop/examples_amazonathena.md
canonical_url: https://help.tableau.com/v0.0/pro/desktop/en-gb/examples_amazonathena.htm
source_site: help.tableau.com
content_type: documentation
content_hash: 3e910b563c9df0b166c89e1f1298baae0d54cf246880d4cbdaefb28cb4815898
description: Connect Tableau to Amazon Athena data and set up the data source, including OAuth options.
---
[Skip to main content](#main-content)

# Amazon Athena

This article describes how to connect Tableau to Amazon Athena data and set up the data source. For information about using OAuth/OIDC with Amazon Athena, see [Set Up Amazon Athena IAM OAuth](https://help.tableau.com/v0.0/pro/desktop/en-gb/amazon_athena_idp.htm).

**Note:** To connect to Amazon Athena, you need ports 443 (ssl) and 444 to be open.

## Before you begin

Before you begin, gather this connection information:

- Name of the server that hosts the database you want to connect to. The format should be as follows: athena.\[region\].amazonaws.com. For example: `athena.us-east-1.amazonaws.com`
- Name of the S3 staging directory. For example, `s3://aws-athena-query-results-123456785678-us-eastexample-2/`
- Amazon Web Services (AWS) access keys (access key ID and secret access key). For more information, see [Access keys](http://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys) on the AWS website.
- (Optional) Initial SQL statement to run every time Tableau connects

> [!TIP]
> 
> To support multiple users and work groups, you can add a work group in the server field. For example: `athena.us-east-1.amazonaws.com:443;Workgroup=Name`

### Driver required

This connector requires a driver to talk to the database. If the driver is not installed on your computer, Tableau displays a message in the connection dialog box with a link to the [Driver Download](https://www.tableau.com/en-gb/support/drivers) page where you can find driver links and installation instructions.

## Make the connection and set up the data source

1. Start Tableau and under Connect, select Amazon Athena. For a complete list of data connections, select More under To a Server. Then do the following:
    
    1. Enter the name of the server.
    2. Enter the name of the S3 staging directory.
    3. Enter your AWS access key ID in the Username field.
    4. Enter your AWS secret access key in the Password field.
    5. (Optional) Select Initial SQL to specify a SQL command to run at the beginning of every connection, such as when you open the workbook, refresh an extract, sign in to Tableau Server or publish to Tableau Server. For more information, see [Run Initial SQL](https://help.tableau.com/v0.0/pro/desktop/en-gb/connect_basic_initialsql.htm).
    6. Select Sign In.
        
        If Tableau can’t make the connection, verify that your credentials are correct. If you still can't connect, your computer is having trouble locating the server. Contact your network administrator or database administrator for more assistance.
2. On the data source page, do the following:
    
    1. (Optional) Under **Connections**, select the default data source.
    2. Select the catalogue and database you want to work with.
    3. Drag one or more tables to your workspace.
    4. Select the sheet tab to start your analysis.
        
        Use custom SQL to connect to a specific query rather than the entire data source. For more information, see [Connect to a Custom SQL Query](https://help.tableau.com/v0.0/pro/desktop/en-gb/customsql.htm).

> [!TIP]
> 
> : If you only see the default **AwsDataCatalog** in the Catalogue drop-down menu, you can add the `MetadataRetrievalMethod=ProxyAPI` line to an athena.properties file to work around the problem. For more information, see [Customise JDBC Connections Using a Properties File](https://community.tableau.com/s/question/0D54T00000F339uSAB/customize-jdbc-connections-using-a-properties-file).

## Customise JDBC connections

Amazon Athena uses a JDBC connection, which you can customise using a properties file. For more information, see [Customise JDBC Connections Using a Properties File](https://community.tableau.com/s/question/0D54T00000F339uSAB/customize-jdbc-connections-using-a-properties-file) in Tableau Community.

## See also

- [Set Up Data Sources](https://help.tableau.com/v0.0/pro/desktop/en-gb/datasource_prepare.htm) – Add more data to this data source or prepare your data before you analyse it.
- [Build Charts and Analyse Data](https://help.tableau.com/v0.0/pro/desktop/en-gb/design_and_analyze.htm) – Begin your data analysis.

- [Connect to your S3 data with the Amazon Athena connector in Tableau 10.3](https://www.tableau.com/en-gb/about/blog/2017/5/connect-your-s3-data-amazon-athena-connector-tableau-103-71105) (and later) - Tableau blog post with links to Amazon Athena resources.
- [Tableau Desktop Fails To Connect to Amazon Athena through Proxy With Error Code 37CE01A3](https://kb.tableau.com/articles/Issue/Tableau-Desktop-Fails-To-Connect-to-Amazon-Athena-through-Proxy-With-Error-Code-37CE01A3?lang=en-gb) - Tableau Knowlege Base article with steps for resolving the issue.

## Other articles in this section