# S3TableProps

Extends: S3TableProps
Extends: TableBaseProps
Used as props by: S3Table

- Source: [`aws-glue/lib/s3-table.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-glue/lib/s3-table.ts#L133)
- Type last changed: v2.270.0 · 17 Sep 2026

## Example

```ts
declare const myDatabase: glue.Database;
new glue.S3Table(this, 'MyTable', {
  database: myDatabase,
  columns: [{
    name: 'data',
    type: glue.Schema.STRING,
  }],
  partitionKeys: [{
    name: 'date',
    type: glue.Schema.STRING,
  }],
  dataFormat: glue.DataFormat.JSON,
  partitionProjection: {
    date: glue.PartitionProjectionConfiguration.date({
      min: 'NOW-3YEARS',
      max: 'NOW',
      format: 'yyyy-MM-dd',
    }),
  },
});
```

## Properties

- `clientSideEncryption`: [TableClientSideEncryption](/cdk/api/v2/docs/aws-cdk-lib.aws_glue.TableClientSideEncryption.html) — Client-side encryption (CSE-KMS) for the table's data.

  **Default:** no client-side encryption

  Independent of the bucket's server-side encryption, and valid whether the
  bucket is managed or provided.

- `columns`: [Column](/cdk/api/v2/docs/aws-cdk-lib.aws_glue.Column.html)[] (required) — Columns of the table.

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

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

- `dataFormat`: [DataFormat](/cdk/api/v2/docs/aws-cdk-lib.aws_glue.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

- `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-lib.aws_glue.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-lib.aws_glue.Column.html)[] — Partition columns of the table.

  **Default:** table is not partitioned

- `partitionProjection`: { [key: string]: [PartitionProjectionConfiguration](/cdk/api/v2/docs/aws-cdk-lib.aws_glue.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.

- `s3Prefix`: string — S3 prefix under which table objects are stored.

  **Default:** No prefix. The data will be stored under the root of the bucket.

  When the table shares a bucket with other tables or consumers, set this so
  that the `grant*` methods scope S3 access to this table's data. Without a
  prefix, those grants cover the entire bucket.

- `storage`: [S3TableStorage](/cdk/api/v2/docs/aws-cdk-lib.aws_glue.S3TableStorage.html) — Where the table's data is stored: a bucket created and managed by the table, or an existing bucket you provide.

  **Default:** a managed bucket with S3-managed (SSE-S3) encryption

- `storageParameters`: [StorageParameter](/cdk/api/v2/docs/aws-cdk-lib.aws_glue.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.
