View a markdown version of this page

JDBC 4.x - Amazon Athena

JDBC 4.x

Use the JDBC 4.x driver to connect custom Java applications and SQL clients to Amazon Athena engine version 3 or DuckDB workgroups.

For other JDBC driver versions, see Athena JDBC 3.x driver and Athena JDBC 2.x driver.

Installation artifacts

The driver provides athena-jdbc-4.0.0-with-dependencies.jar and a lean athena-jdbc-4.0.0.jar with separate dependency JARs in runtime-dependencies. Add the selected distribution and its required dependencies to the SQL client or application classpath.

The following table describes driver downloads.

DistributionDownload
JAR with dependenciesJDBC 4.0.0 JAR with dependencies
Lean JAR and separate dependency JARsJDBC 4.0.0 lean distribution ZIP

License agreement

The driver class is com.amazon.athena.jdbc.AthenaDriver; use the jdbc:athena:// URL prefix.

For connection examples and platform commands, see Get started with the JDBC 4.x driver. For changes in this version, see Release notes.

Engine selection and permissions

Grant the connection credentials athena:GetWorkGroup. The driver reads workgroup configuration during validation and selects the matching dialect and result storage; an unrecognized engine fails validation unless a supported override is supplied.

Open a new connection after changing a workgroup engine. For Arrow JVM configuration and a connection example, see Get started with the JDBC 4.x driver.