# ExternalTableProps

Extends: ExternalTableProps
Extends: TableBaseProps
Used as props by: ExternalTable

- Source: [`lib/external-table.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0-alpha.0/packages/@aws-cdk/aws-glue-alpha/lib/external-table.ts#L13)
- Type last changed: v2.270.0-alpha.0 · 18 Sep 2026

## Example

```ts
declare const myConnection: glue.Connection;
declare const myDatabase: glue.Database;
new glue.ExternalTable(this, 'MyTable', {
  connection: myConnection,
  externalDataLocation: 'default_db_public_example', // A table in Redshift
  // ...
  database: myDatabase,
  columns: [{
    name: 'col1',
    type: glue.Schema.STRING,
  }],
  dataFormat: glue.DataFormat.JSON,
});
```

## Properties

- `columns`: [Column](/cdk/api/v2/docs/@aws-cdk_aws-glue-alpha.Column.html)[] (required) — Columns of the table.

- `compressed`: boolean = false — Indicates whether the table's data is compressed or not.

- `connection`: [IConnection](/cdk/api/v2/docs/@aws-cdk_aws-glue-alpha.IConnection.html) (required) — The connection the table will use when performing reads and writes.

  **Default:** No connection

- `database`: [IDatabase](/cdk/api/v2/docs/@aws-cdk_aws-glue-alpha.IDatabase.html) (required) — Database in which to store the table.

- `dataFormat`: [DataFormat](/cdk/api/v2/docs/@aws-cdk_aws-glue-alpha.DataFormat.html) (required) — Storage type of the table's data.

- `description`: string = generated — Description of the table.

- `enablePartitionFiltering`: boolean — Enables partition filtering.

  **Default:** The parameter is not defined

- `externalDataLocation`: string (required) — The data source location of the glue table, (e.g. `default_db_public_example` for Redshift).

  **Default:** No outsourced data source location

  If this property is set, it will override both `bucket` and `s3Prefix`.

- `hasEncryptedData`: boolean = true — Whether the data stored in the table is encrypted.

  This sets the `has_encrypted_data` table parameter. Athena reads it when
  querying client-side (CSE-KMS) encrypted datasets; for server-side
  encrypted (SSE-S3 / SSE-KMS) or unencrypted data it has no effect, since
  Amazon S3 decrypts server-side encrypted objects transparently.

  Do not also set `has_encrypted_data` through `parameters` - use this
  property instead. A conflicting value in `parameters` is rejected.

- `parameters`: { [key: string]: string } — The key/value pairs define properties associated with the table.

  **Default:** The parameter is not defined

  The key/value pairs that are allowed to be submitted are not limited, however their functionality is not guaranteed.

- `partitionIndexes`: [PartitionIndex](/cdk/api/v2/docs/@aws-cdk_aws-glue-alpha.PartitionIndex.html)[] — Partition indexes on the table.

  **Default:** table has no partition indexes

  A maximum of 3 indexes
  are allowed on a table. Keys in the index must be part
  of the table's partition keys.

- `partitionKeys`: [Column](/cdk/api/v2/docs/@aws-cdk_aws-glue-alpha.Column.html)[] — Partition columns of the table.

  **Default:** table is not partitioned

- `partitionProjection`: { [key: string]: [PartitionProjectionConfiguration](/cdk/api/v2/docs/@aws-cdk_aws-glue-alpha.PartitionProjectionConfiguration.html) } — Partition projection configuration for this table.

  **Default:** No partition projection

  Partition projection allows Athena to automatically add new partitions
  without requiring `ALTER TABLE ADD PARTITION` statements.

- `storageParameters`: [StorageParameter](/cdk/api/v2/docs/@aws-cdk_aws-glue-alpha.StorageParameter.html)[] — The user-supplied properties for the description of the physical storage of this table.

  **Default:** The parameter is not defined

  These properties help describe the format of the data that is stored within the crawled data sources.

  The key/value pairs that are allowed to be submitted are not limited, however their functionality is not guaranteed.

  Some keys will be auto-populated by glue crawlers, however, you can override them by specifying the key and value in this property.

  ```ts
     declare const glueDatabase: glue.IDatabase;
     const table = new glue.S3Table(this, 'Table', {
       storageParameters: [
           glue.StorageParameter.skipHeaderLineCount(1),
           glue.StorageParameter.compressionType(glue.CompressionType.GZIP),
           glue.StorageParameter.custom('foo', 'bar'), // Will have no effect
           glue.StorageParameter.custom('separatorChar', ','), // Will describe the separator char used in the data
           glue.StorageParameter.custom(glue.StorageParameters.WRITE_PARALLEL, 'off'),
       ],
       // ...
       database: glueDatabase,
       columns: [{
           name: 'col1',
           type: glue.Schema.STRING,
       }],
       dataFormat: glue.DataFormat.CSV,
     });
  ```

- `storedAsSubDirectories`: boolean = false — Indicates whether the table data is stored in subdirectories.

- `tableName`: string — Name of the table.

  **Default:** generated by CDK.
