View a markdown version of this page

Main ODBC 4.x connection parameters - Amazon Athena

Main ODBC 4.x connection parameters

The following sections describe each of the main connection parameters.

Data source name

Specifies the name of your data source.

Connection string name Parameter type Default value Connection string example
DSN Optional for DSN-less connection types none DSN=AmazonAthenaOdbcUsWest1;

Description

Contains description of your data source.

Connection string name Parameter type Default value Connection string example
Description Optional none Description=Connection to Amazon Athena us-west-1;

Catalog

Specifies the data catalog name. For more information about catalogs, see DataCatalog in the Amazon Athena API Reference.

Connection string name Parameter type Default value Connection string example
Catalog Optional AwsDataCatalog Catalog=AwsDataCatalog;

Region

Specifies the AWS Region. For information about AWS Regions, see Regions and Availability Zones.

Connection string name Parameter type Default value Connection string example
AwsRegion Mandatory none AwsRegion=us-west-1;

Database

Specifies the database name. For more information about databases, see Database in the Amazon Athena API Reference.

Connection string name Parameter type Default value Connection string example
Schema Optional default Schema=default;

Workgroup

Specifies the workgroup name. For more information about workgroups, see WorkGroup in the Amazon Athena API Reference.

Connection string name Parameter type Default value Connection string example
Workgroup Optional primary Workgroup=primary;

S3OutputLocation

For bucket results, supply S3OutputLocation when the workgroup does not supply an output location. The driver sends a configured value as ResultConfiguration.OutputLocation. If S3OutputEncOption is NOT_SET, the driver omits the result encryption configuration from the query request.

The following table describes output location.

ParameterDefaultBehavior
S3OutputLocationUnsetS3 URI for bucket results, such as s3://my-query-results/prefix/.

Encryption options

Dialog parameter name: Encryption options

Specifies encryption option. For more information about encryption options, see EncryptionConfiguration in the Amazon Athena API Reference.

Connection string name Parameter type Default value Possible values Connection string example
S3OutputEncOption Optional NOT_SET NOT_SET, SSE_S3, SSE_KMS, CSE_KMS S3OutputEncOption=SSE_S3;

KMS key

Specifies a KMS key for encryption. For more information about encryption configuration for KMS Keys, see EncryptionConfiguration in the Amazon Athena API Reference.

Connection string name Parameter type Default value Connection string example
S3OutputEncKMSKey Optional none S3OutputEncKMSKey=your_key;

Connection test

The Windows configuration dialog provides a Test button. It uses the selected authentication provider and calls GetWorkGroup with connection caching disabled. This test does not submit a query or create a query-result file.

EngineVersion

Set EngineVersion to DuckDB or Athena engine version 3 to select a connection engine and include that engine in query submissions. Leave it unset to use the workgroup effective engine version.

DSN and connection-string syntax

For a DSN-less connection, start the connection string with DRIVER={Amazon Athena ODBC (x64)}; and supply the required connection parameters. Use braces around values containing semicolons; escape a closing brace by doubling it.

The first occurrence of a repeated key is used. If DSN and FILEDSN are both present, the first is selected. The same first-occurrence rule applies to DSN and DRIVER.

DRIVER={Amazon Athena ODBC (x64)};AwsRegion=us-west-2;Workgroup=my-duckdb-workgroup;AuthenticationType=Default Credentials;