Migrate from JDBC 3.x
For requirements and behavior on engine version 3 and DuckDB workgroups, see Requirements and behavior by workgroup engine.
The following comparisons use the JDBC 3.8.2 release as the prior-version baseline. Changing the driver and changing the workgroup engine are separate migration steps.
The following table describes migration differences.
| Area | JDBC 4.x behavior | Action |
|---|---|---|
| Workgroup lookup | Reads effective engine and result storage during connection validation. | Grant athena:GetWorkGroup even if ConnectionTest=false. |
| EngineVersion | Adds a connection engine override and matching dialect selection. | Prefer workgroup selection; leave the parameter unset for initial setup. |
| Managed DuckDB results | Adds Apache Arrow GetQueryResultStream retrieval. | Configure the Arrow JVM flag, or use GetQueryResults. |
| Explicit fetchers | GetQueryResultsStream and S3V2 are rejected for DuckDB. | Use auto or a fetcher allowed by the engine and result storage. |
| Extended types | Adds DuckDB type mappings, including default BigInteger mappings for UBIGINT, HUGEINT, UHUGEINT, and BIGNUM, DuckDB list/array results, and DuckDB BLOB/geometry conversion. | Review result metadata and typed getters. |
The driver processes SQL escapes and parameter literals with the selected engine dialect. Use SQL supported by the selected workgroup engine.
JDBC result sets are forward-only and read-only. The connection API operates with auto-commit enabled; setAutoCommit(false), commit(), and rollback() are not supported.