ADBC Driver for Amazon Athena

The ADBC driver for Amazon Athena is maintained by AWS.

Driver Version v0.1.1 Release Date 2026-12-01 Tested With Amazon Athena 3

This driver provides access to Amazon Athena , a serverless, interactive query service that analyzes data in Amazon S3 and other data sources using standard SQL. It supports Athena engine version 3 and Athena with the DuckDB engine.

Installation

The Amazon Athena driver can be installed with dbc :

dbc install athena

Connecting

No connection string is necessary to use the driver. By default, the driver uses the same credential mechanisms as the AWS CLI, and runs queries in the primary work group with the AwsDataCatalog catalog and the default database. Use the options below to choose how to authenticate, the AWS region, the work group to run queries in, and more.

from adbc_driver_manager import dbapi

dbapi.connect(
    driver="athena",
    db_kwargs={"athena.work_group": "my_work_group"},
)

Note: The example above is for Python using the adbc-driver-manager package but the process will be similar for other driver managers. See adbc-quickstarts .

When it connects, the driver reads the work group (athena:GetWorkGroup) to check that it exists and to find its engine.

The driver reads the AWS SDK environment variables and the shared config and credentials files, as the AWS CLI does. Options take precedence over environment variables, for example athena.aws.region over AWS_REGION.

Connection String Format

Athena URI syntax:

athena://[region][/work_group]

Components:

  • Scheme: athena:// (required)

  • region: AWS region, such as us-east-1 (optional; without it, the AWS SDK default applies, e.g. the AWS_REGION environment variable)

  • work_group: Athena work group name (optional, defaults to primary)

Examples:

  • athena:// (the default region and the primary work group)

  • athena://eu-north-1 (the primary work group in eu-north-1)

  • athena://eu-north-1/my_work_group (my_work_group in eu-north-1)

  • athena:///my_work_group (my_work_group in the default region)

The URI only sets the region and the work group. All other options (authentication, the result location, the result fetcher, etc.) must be supplied as separate driver options. athena.aws.region and athena.work_group take precedence over the URI, whichever is set first: setting both athena://eu-north-1/my_work_group and athena.work_group uses the value from athena.work_group.

from adbc_driver_manager import dbapi

dbapi.connect(
    driver="athena",
    uri="athena://eu-north-1/my_work_group",
)

Feature & Type Support

Feature Amazon Athena

Bind Parameters

✅

Bulk Ingestion

Create

❌

Append

❌

Create/Append

❌

Replace

❌

Temporary Table

❌

Target Catalog

❌

Target Schema

❌

Non-nullable fields are marked NOT NULL

❌

Catalog (GetObjects)

depth=catalogs

✅

depth=db_schemas

✅

depth=tables

✅

depth=columns (all)

✅

Get Parameter Schema

✅

Get Table Schema

✅

Prepared Statements

✅

Transactions

❌

Catalog and Schema Support

Athena data catalogs are ADBC catalogs, and the databases in them are ADBC schemas. Listing catalogs returns the data sources registered in Athena, such as federated query catalogs, followed by the catalogs from AWS Glue, such as S3 Tables catalogs. Queries run in the catalog and database set by athena.catalog and athena.schema, which can be changed on a connection with the standard current catalog and current schema options.

Types

Database to Arrow

Database Type Amazon Athena

BIGINT

int64

BOOLEAN

bool

DATE

date32[day]

DECIMAL

decimal128

DOUBLE

double

DOUBLE PRECISION

double

INT

int32

REAL

float

SMALLINT

int16

TIME

time64[us]

TIMESTAMP

timestamp[ms]

TIMESTAMP WITH TIME ZONE

timestamp[ms] (with time zone)

TIMESTAMP(p) (1 <= p <= 3)

timestamp[ms]

TIMESTAMP(p) (1 <= p <= 3) WITH TIME ZONE

timestamp[ms] (with time zone)

TINYINT

int8

VARBINARY

binary

VARCHAR

string

Arrow to Database

Arrow Type Amazon Athena Type
Bind

binary

BINARY

binary_view

BINARY

bool

BOOLEAN

date32[day]

DATE

decimal128

DECIMAL(10,2)

double

DOUBLE

fixed_size_binary

BINARY

float

FLOAT

halffloat

❌ [1]

int16

SMALLINT

int32

INT

int64

BIGINT

int8

TINYINT

large_binary

BINARY

large_string

STRING

string

STRING

string_view

STRING

time32[ms]

❌

time32[s]

❌

time64[ns]

❌

time64[us]

❌

timestamp[ms]

TIMESTAMP

timestamp[ms] (with time zone)

TIMESTAMP

timestamp[ns]

TIMESTAMP

timestamp[ns] (with time zone)

TIMESTAMP

timestamp[s]

TIMESTAMP

timestamp[s] (with time zone)

TIMESTAMP

timestamp[us]

TIMESTAMP

timestamp[us] (with time zone)

TIMESTAMP

Options

Options Affecting Where Queries Run

athena.work_group

Type: string. Default: primary.

The work group to run queries in. The work group’s settings, such as where results are stored and which engine it uses, apply to the queries the driver runs. Can only be set on the database.

athena.engine_version

Values: Athena engine version 3, DuckDB. Default: not set (the work group’s engine).

Runs queries on the named engine instead of the work group’s. Values are case-sensitive. Fails the connection if the work group has EnforceWorkGroupConfiguration enabled and uses another engine. Can only be set on the database.

athena.catalog

Type: string. Default: AwsDataCatalog.

The data catalog queries run in. Can be set on the database; on a connection, use the standard current catalog option.

athena.schema

Type: string. Default: default.

The database (ADBC schema) queries run in. Can be set on the database; on a connection, use the standard current schema option.

Options Affecting Queries

The options in this section can be set on the database, a connection or a statement.

athena.statement.output_location

Type: string. Default: not set.

S3 URI where Athena writes query results (e.g., s3://my-bucket/prefix/). Must start with s3://. Optional when the work group already configures where results are stored. Can’t be set when the work group uses managed query results.

athena.statement.result_fetcher

Values: auto, GetQueryResults, GetQueryResultStream. Default: auto.

Controls how query results are retrieved. GetQueryResults uses the standard paginated GetQueryResults API. GetQueryResultStream reads the result as an Arrow stream through GetQueryResultStream; available when using Athena with the DuckDB engine and managed query results, and requires athena:GetQueryResultStream. auto uses the stream where it is available and GetQueryResults otherwise. Values are case-insensitive.

GetQueryResultStream is rejected on engine version 3. A stream the service refuses fails the statement; there is no fallback. GetQueryResults decodes the result text into the Arrow types.

GetQueryResults is not recommended for more than a few thousand rows of data.

athena.statement.result_reuse_by_age.enabled

Values: true, false. Default: false.

Reuse the results of an earlier run of the same query, if Athena still has them, instead of running the query again. execute_schema never reuses results.

athena.statement.result_reuse_by_age.max_age_in_minutes

Type: integer, from 1 to 10080. Default: not set (Athena uses 60).

The maximum age of results to reuse, in minutes. Only used when athena.statement.result_reuse_by_age.enabled is true.

Options Affecting API Requests

The options in this section can only be set on the database.

athena.aws.region

Type: string. Default: not set (uses the AWS SDK default, e.g. the AWS_REGION environment variable).

AWS region to use when making requests, overriding the AWS SDK’s default region resolution.

athena.aws.athena_endpoint

Type: string. Default: not set (uses the AWS SDK default).

The endpoint to use when making Athena API requests, overriding the default endpoint constructed by the AWS SDK. Even though the endpoint often contains the region, the region must be set separately.

athena.aws.glue_endpoint

Type: string. Default: not set (uses the AWS SDK default).

The endpoint to use when making Glue API requests, overriding the default endpoint constructed by the AWS SDK. The driver calls Glue when listing catalogs, to find catalogs that only Glue knows about, such as S3 Tables catalogs. athena.aws.athena_endpoint does not apply to Glue requests. Even though the endpoint often contains the region, the region must be set separately.

Options Affecting AWS Authentication

The options in this section can only be set on the database.

athena.auth.type

Values: iam, access_key, profile, jwt_role, jwt_identity_center, sagemaker_iam. Default: iam.

How the driver gets AWS credentials: iam (the AWS SDK default credential chain), access_key (the keys in athena.auth.access_key.*), profile (the shared-config profile in athena.auth.profile.profile_name), jwt_role (an IAM role assumed with a JSON Web Token; see Options Affecting JWT Authentication), jwt_identity_center (a JSON Web Token exchanged through IAM Identity Center; see Options Affecting JWT Identity Center Authentication) or sagemaker_iam (the credentials of an Athena connection of a SageMaker Unified Studio project; see Options Affecting SageMaker Unified Studio Authentication). Case-insensitive. Each auth type reads only the options under athena.auth.<type>.; setting an option of another auth type fails the connection.

athena.auth.profile.profile_name

Type: string. Default: not set. Required when athena.auth.type is profile.

AWS shared-config profile name. Credentials come only from this profile: credentials in AWS_* environment variables are ignored unless the profile sets credential_source = Environment, and a profile that is not defined fails the connection. The profile’s region, endpoint and retry settings also apply.

athena.auth.access_key.access_key_id

Type: string. Default: not set. Required when athena.auth.type is access_key.

AWS access key ID. Not recommended for production.

athena.auth.access_key.secret_access_key

Type: string. Default: not set. Required when athena.auth.type is access_key.

AWS secret access key.

athena.auth.access_key.session_token

Type: string. Default: not set.

AWS session token, for short-lived credentials. Used when athena.auth.type is access_key.

Options Affecting JWT Authentication

With athena.auth.type set to jwt_role, Athena and Glue requests are signed with the credentials of an IAM role assumed with a JSON Web Token (sts:AssumeRoleWithWebIdentity); no other AWS credentials are needed. The role’s trust policy must allow the identity provider that issued the token. Once the token expires, open a new connection with a new token.

athena.auth.jwt_role.web_identity_token

Type: string. Default: not set. Required when athena.auth.type is jwt_role.

The JWT itself, not a path to a file. Not returned when reading options.

athena.auth.jwt_role.role_arn

Type: string. Default: not set. Required when athena.auth.type is jwt_role.

ARN of the IAM role to assume.

athena.auth.jwt_role.role_session_name

Type: string. Default: not set. Required when athena.auth.type is jwt_role.

Name of the role session, which appears in AWS CloudTrail.

athena.auth.jwt_role.role_session_duration_seconds

Type: integer. Default: not set (STS uses 3600).

How long the role credentials last, in seconds, such as 3600. Must be within the range the role allows.

Options Affecting JWT Identity Center Authentication

With athena.auth.type set to jwt_identity_center, Athena and Glue requests are signed with the credentials of an access role that carries the token’s identity, for trusted identity propagation. The driver assumes the application role with the JSON Web Token, exchanges the token with IAM Identity Center and assumes the access role with the result. The application role’s trust policy must allow the identity provider that issued the token, and the role needs sso-oauth:CreateTokenWithIAM on the IdC application; the access role’s trust policy must allow the application role sts:AssumeRole and sts:SetContext. Once the token expires, open a new connection with a new token.

athena.auth.jwt_identity_center.web_identity_token

Type: string. Default: not set. Required when athena.auth.type is jwt_identity_center.

The JWT itself, not a path to a file. Not returned when reading options.

athena.auth.jwt_identity_center.application_role_arn

Type: string. Default: not set. Required when athena.auth.type is jwt_identity_center.

ARN of the IAM role assumed with the JWT, which signs the IAM Identity Center and access role calls.

athena.auth.jwt_identity_center.role_session_name

Type: string. Default: not set. Required when athena.auth.type is jwt_identity_center.

Name of both role sessions, which appears in AWS CloudTrail.

athena.auth.jwt_identity_center.idc_application_arn

Type: string. Default: not set. Required when athena.auth.type is jwt_identity_center.

ARN of the IAM Identity Center application that accepts the JWT.

athena.auth.jwt_identity_center.access_role_arn

Type: string. Default: not set. Required when athena.auth.type is jwt_identity_center.

ARN of the IAM role assumed with the identity context.

athena.auth.jwt_identity_center.idc_region

Type: string. Default: not set (the connection’s region).

Region of the IAM Identity Center instance.

Options Affecting SageMaker Unified Studio Authentication

With athena.auth.type set to sagemaker_iam, Athena and Glue requests are signed with the credentials of an Athena connection in a SageMaker Unified Studio project, fetched with datazone:ListConnections and datazone:GetConnection. The caller must be a member of the project. When the project has several Athena connections, the one whose work group equals athena.work_group is used.

athena.auth.sagemaker_iam.domain_id

Type: string. Default: not set. Required when athena.auth.type is sagemaker_iam.

The SageMaker Unified Studio (DataZone) domain ID, e.g. dzd_abc123.

athena.auth.sagemaker_iam.project_id

Type: string. Default: not set. Required when athena.auth.type is sagemaker_iam.

The ID of the project whose Athena connection credentials are used.

athena.auth.sagemaker_iam.domain_region

Type: string. Default: the region the driver uses for Athena (athena.aws.region, or the AWS SDK default).

The AWS region of the domain.

athena.auth.sagemaker_iam.endpoint

Type: string. Default: not set (uses the AWS SDK default).

The endpoint to use when making DataZone requests. Must be an https URL.

athena.auth.sagemaker_iam.type

Type: string. Default: not set. Required when athena.auth.type is sagemaker_iam.

Where the credentials that sign the DataZone requests come from: iam (the AWS SDK default credential chain), access_key (the keys in athena.auth.sagemaker_iam.access_key.*) or profile (the shared-config profile in athena.auth.sagemaker_iam.profile.profile_name). Case-insensitive; there is no default, and any other value fails the connection. Setting an option under another source’s athena.auth.sagemaker_iam.<type>. fails the connection.

athena.auth.sagemaker_iam.access_key.access_key_id

Type: string. Default: not set. Required when athena.auth.sagemaker_iam.type is access_key.

AWS access key ID that signs the DataZone requests.

athena.auth.sagemaker_iam.access_key.secret_access_key

Type: string. Default: not set. Required when athena.auth.sagemaker_iam.type is access_key.

AWS secret access key for the DataZone signing keys.

athena.auth.sagemaker_iam.access_key.session_token

Type: string. Default: not set.

AWS session token for the DataZone signing keys, for short-lived credentials. Used when athena.auth.sagemaker_iam.type is access_key.

athena.auth.sagemaker_iam.profile.profile_name

Type: string. Default: not set. Required when athena.auth.sagemaker_iam.type is profile.

AWS shared-config profile whose credentials sign the DataZone requests, resolved as for athena.auth.profile.profile_name. Unlike with athena.auth.type profile, the profile’s region, endpoint and retry settings do not apply to the Athena, Glue and DataZone requests.

Bound Parameters

Set the SQL with ? placeholders, bind an Arrow batch or stream with one column per placeholder, then call execute or execute_update. Athena fills the placeholders from StartQueryExecution’s execution parameters; each bound row runs as its own Athena query, so binding many rows runs many queries.

Compatibility

This driver was tested on:

  • Amazon Athena Athena engine version 3