

# 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](jdbc-v3-driver.md) and [Athena JDBC 2.x driver](jdbc-v2.md).

## Installation artifacts
<a name="jdbc-v4-driver-installation-artifacts"></a>

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.



| Distribution | Download | 
| --- | --- | 
| JAR with dependencies | [JDBC 4.0.0 JAR with dependencies](https://aws-analytics-downloads-us-east-1.s3.us-east-1.amazonaws.com/athena/JDBC/4.0.0/athena-jdbc-4.0.0-with-dependencies.jar) | 
| Lean JAR and separate dependency JARs | [JDBC 4.0.0 lean distribution ZIP](https://aws-analytics-downloads-us-east-1.s3.us-east-1.amazonaws.com/athena/JDBC/4.0.0/athena-jdbc-4.0.0-lean-jar-and-separate-dependencies-jars.zip) | 

[License agreement](https://aws-analytics-downloads-us-east-1.s3.us-east-1.amazonaws.com/athena/JDBC/4.0.0/LICENSE.txt)

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](jdbc-v4-driver-getting-started.md). For changes in this version, see [Release notes](jdbc-v4-driver-release-notes.md).

## Engine selection and permissions
<a name="jdbc-v4-driver-engine-detection"></a>

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](jdbc-v4-driver-getting-started.md).

**Topics**
+ [Installation artifacts](#jdbc-v4-driver-installation-artifacts)
+ [Engine selection and permissions](#jdbc-v4-driver-engine-detection)
+ [Requirements and behavior by workgroup engine](jdbc-v4-driver-engine-comparison.md)
+ [Get started with the JDBC 4.x driver](jdbc-v4-driver-getting-started.md)
+ [JDBC 4.x connection parameters](jdbc-v4-driver-connection-parameters.md)
+ [Data types and result conversion](jdbc-v4-driver-data-types.md)
+ [Migrate from JDBC 3.x](jdbc-v4-driver-migrating.md)
+ [Troubleshoot JDBC 4.x](jdbc-v4-driver-troubleshooting.md)
+ [Release notes](jdbc-v4-driver-release-notes.md)