Amazon Athena

This article describes how to connect Tableau to Amazon Athena data and set up the data source.

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(Link opens in a new window) 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(Link opens in a new window) 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.

    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 catalog 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.

Tip: If you only see the default AwsDataCatalog in the Catalog drop-down menu, you can add the MetadataRetrievalMethod=ProxyAPI line to an athena.properties file to work around the problem. For more information, see Customize JDBC Connections Using a Properties File(Link opens in a new window).

Customize JDBC connections

Amazon Athena uses a JDBC connection, which you can customize using a properties file. For more information, see Customize JDBC Connections Using a Properties File(Link opens in a new window) in Tableau Community.

See also

Thanks for your feedback!Your feedback has been successfully submitted. Thank you!