# S3TableProps

Extends: S3TableProps
Extends: TableBaseProps

- Source: [`lib/s3-table.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0-alpha.0/packages/@aws-cdk/aws-glue-alpha/lib/s3-table.ts#L133)
- Type last changed: v2.270.0-alpha.0 · 18 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_aws-glue-alpha.TableClientSideEncryption.html) = no client-side encryption — Client-side encryption (CSE-KMS) for the table's data.

  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_aws-glue-alpha.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_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 = The parameter is not defined — Enables partition filtering.

- `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 parameter is not defined — The key/value pairs define properties associated with the table.

  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)[] = table has no partition indexes — Partition indexes on the table.

  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)[] = table is not partitioned — Partition columns of the table.

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

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

- `s3Prefix`: string = No prefix. The data will be stored under the root of the bucket. — S3 prefix under which table objects are stored.

  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.

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

- `storage`: [S3TableStorage](/cdk/api/v2/docs/@aws-cdk_aws-glue-alpha.S3TableStorage.html) = a managed bucket with S3-managed (SSE-S3) encryption — 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_aws-glue-alpha.StorageParameter.html)[] = The parameter is not defined — The user-supplied properties for the description of the physical storage of this table.

  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 = generated by CDK. — Name of the table.

## Used as props by

- [`S3Table`](/v2/docs/@aws-cdk_aws-glue-alpha.S3Table)
