

# Main ODBC 4.x connection parameters

The following sections describe each of the main connection parameters.

## Data source name
<a name="odbc-v4-driver-main-connection-parameters-data-source-name"></a>

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
<a name="odbc-v4-driver-main-connection-parameters-description"></a>

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
<a name="odbc-v4-driver-main-connection-parameters-catalog"></a>

Specifies the data catalog name. For more information about catalogs, see [DataCatalog](https://docs.aws.amazon.com/athena/latest/APIReference/API_DataCatalog.html) in the Amazon Athena API Reference.



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

## Region
<a name="odbc-v4-driver-region"></a>

Specifies the AWS Region. For information about AWS Regions, see [Regions and Availability Zones](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/).



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

## Database
<a name="odbc-v4-driver-database"></a>

Specifies the database name. For more information about databases, see [Database](https://docs.aws.amazon.com/athena/latest/APIReference/API_Database.html) in the *Amazon Athena API Reference*.



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

## Workgroup
<a name="odbc-v4-driver-workgroup"></a>

Specifies the workgroup name. For more information about workgroups, see [WorkGroup](https://docs.aws.amazon.com/athena/latest/APIReference/API_WorkGroup.html) in the *Amazon Athena API Reference*.



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

## S3OutputLocation
<a name="odbc-v4-driver-output-location"></a>

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.



| Parameter | Default | Behavior | 
| --- | --- | --- | 
| S3OutputLocation | Unset | S3 URI for bucket results, such as s3://my-query-results/prefix/. | 

## Encryption options
<a name="odbc-v4-driver-encryption-options"></a>

**Dialog parameter name**: Encryption options

Specifies encryption option. For more information about encryption options, see [EncryptionConfiguration](https://docs.aws.amazon.com/athena/latest/APIReference/API_EncryptionConfiguration.html) 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
<a name="odbc-v4-driver-kms-key"></a>

Specifies a KMS key for encryption. For more information about encryption configuration for KMS Keys, see [EncryptionConfiguration](https://docs.aws.amazon.com/athena/latest/APIReference/API_EncryptionConfiguration.html) in the *Amazon Athena API Reference*.



| **Connection string name** | **Parameter type** | **Default value** | **Connection string example** | 
| --- | --- | --- | --- | 
| S3OutputEncKMSKey | Optional | none | S3OutputEncKMSKey=your\_key; | 

## Connection test
<a name="odbc-v4-driver-connection-test"></a>

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
<a name="odbc-v4-driver-main-engine-version"></a>

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
<a name="odbc-v4-driver-dsn-selection"></a>

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;
```