# PartitionIndex

Properties of a Partition Index.

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

## Example

```ts
declare const myTable: glue.S3Table;
myTable.addPartitionIndex({
  indexName: 'my-index',
  keyNames: ['year'],
});
```

## Properties

- `indexName`: string — The name of the partition index.

  **Default:** a name will be generated for you.

- `keyNames`: string[] (required) — The partition key names that comprise the partition index.

  The names must correspond to a name in the
  table's partition keys.
