Using Athena with the JDBC Driver - Amazon Athena

Using Athena with the JDBC Driver

You can use a JDBC connection to connect Athena to business intelligence tools and other applications, such as SQL Workbench. To do this, download, install, and configure the Athena JDBC driver, using the following links on Amazon S3. For permissions information, see Access through JDBC and ODBC Connections.

Links for Downloading the JDBC Driver

The JDBC driver version 2.0.23 complies with the JDBC API 4.1 and 4.2 data standards. Before downloading the driver, check which version of Java Runtime Environment (JRE) you use. The JRE version depends on the version of the JDBC API you are using with the driver. If you are not sure, download the latest version of the driver.

Download the driver that matches your version of the JDK and the JDBC data standards:

  • The AthenaJDBC41.jar is compatible with JDBC 4.1 and requires JDK 7.0 or later.

  • The AthenaJDBC42.jar is compatible with JDBC 4.2 and requires JDK 8.0 or later.

JDBC Driver Release Notes, License Agreement, and Notices

After you download the version you need, read the release notes, and review the License Agreement and Notices.

JDBC Driver Documentation

Download the following documentation for the driver:


To use the JDBC driver for multiple data catalogs with Athena (for example, when using an external Hive metastore or federated queries), include MetadataRetrievalMethod=ProxyAPI in your JDBC connection string.

Migration from Previous Version of the JDBC Driver

The current JDBC driver version 2.0.23 is a drop-in replacement of the previous version of the JDBC driver version 2.0.9, and is backwards compatible with the JDBC driver version 2.0.9, with the following step that you must perform to ensure the driver runs.


To use JDBC driver version 2.0.5 or later, attach a permissions policy to IAM principals using the JDBC driver that allows the athena:GetQueryResultsStream policy action. This policy action is not exposed directly with the API. It is only used with the JDBC driver as part of streaming results support. For an example policy, see AWSQuicksightAthenaAccess Managed Policy.

Additionally, ensure that port 444, which Athena uses to stream query results, is open to outbound traffic. When you use a PrivateLink endpoint to connect to Athena, ensure that the security group attached to the PrivateLink endpoint is open to inbound traffic on port 444. If port 444 is blocked, you may receive the error message [Simba][AthenaJDBC](100123) An error has occurred. Exception during column initialization.

For more information about upgrading to versions 2.0.5 or later from version 2.0.2, see the JDBC Driver Migration Guide.

For more information about the previous versions of the JDBC driver, see Using Earlier Version JDBC Drivers.

If you are migrating from a 1.x driver to a 2.x driver, you must migrate your existing configurations to the new configuration. We highly recommend that you migrate to driver version 2.x. For information, see the JDBC Driver Migration Guide.