View a markdown version of this page

Migrate from JDBC 3.x - Amazon Athena

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.

AreaJDBC 4.x behaviorAction
Workgroup lookupReads effective engine and result storage during connection validation.Grant athena:GetWorkGroup even if ConnectionTest=false.
EngineVersionAdds a connection engine override and matching dialect selection.Prefer workgroup selection; leave the parameter unset for initial setup.
Managed DuckDB resultsAdds Apache Arrow GetQueryResultStream retrieval.Configure the Arrow JVM flag, or use GetQueryResults.
Explicit fetchersGetQueryResultsStream and S3V2 are rejected for DuckDB.Use auto or a fetcher allowed by the engine and result storage.
Extended typesAdds 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.