Connect to Athena Tables from IDE Tools (IntellJ IDEA)

Amazon Athena is an interactive query service that allows you to use standard SQL to view and analyze data in your organization's Tetra Data Lake S3 bucket. This page describes how to connect to your Athena tables from the IDE Tools (IntelliJ IDEA) third-party tool.

Before You Begin

Before you can use IDE Tools (IntelliJ IDEA) as a third-party tool to connect to Athena tables, you must have:

Connect to Athena Tables from IDE Tools (IntellJ IDEA)

To connect to Athena tables from IDE Tools (IntellJ IDEA), you:

  • Add the JDBC Driver for Athena in DataGrip
  • Add a new Data Source

Add the JDBC Driver for Athena in DataGrip

To add the JDBC driver for Athena in DataGrip:

  1. Launch DataGrip and then click Add (+ sign) at the top left corner of the page.
1600

DataGrip - Add Driver

  1. Click Driver from the drop-down and enter a name for your driver (for example, Athena - Demo.
  2. Add the previously downloaded Athena JDBC driver file by clicking + sign below the Driver files box.
  3. Select Custom JARs and then navigate to the downloaded file to upload it.
  4. After the driver file has completed uploading, you can select the correct Class: “com.simba.athena.jdbc42.Driver”.
512

Select Class

  1. Under Options, set the Dialect to “Generic SQL”.
1005

Select Dialect

  1. Under Advanced, enter values for these Names:
    • AwsRegion - Enter the region where your Athena bucket is located, for example,“us-east-2”.
    • S3OutputLocation - Enter the S3OutputLocation connection information you previously gathered from the SQL Access page of the TDP.
1600
  1. After you enter the values for the name, click Apply and then click OK.

Add a new Data Source

To add a new data source:

  1. Click Add (+ sign) at the top left corner of the page and select Data Source.
  2. Locate the driver you created, for example Athena - Demo.
512

Add Data Source

  1. Enter values for these fields:
    • User - Enter the user information you previously gathered from the SQL Access page of the TDP.
    • Password - Enter the password information you previously gathered from the SQL Access page of the TDP.
    • URL - Enter the URL information you previously gathered from the SQL Access page of the TDP.
  2. Click Test Connection. After you are connected successfully, a green checkmark displays. Click OK.
1600

User, Password, and URL

You can now access your data using DataGrip’s Console:

1600

DataGrip Console