# DateProjectionStep

A required-together interval step for DATE partition projection.

Bundling `interval` and `intervalUnit` into one value makes a partial step
(one without the other) unrepresentable.

- Source: [`lib/partition-projection.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0-alpha.0/packages/@aws-cdk/aws-glue-alpha/lib/partition-projection.ts#L112)
- 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: '2020-01-01',
      max: '2023-12-31',
      format: 'yyyy-MM-dd',
      // `step` bundles interval + unit (supply both or neither). Optional at day
      // precision or coarser; required when the format is sub-day (e.g. hours).
      step: { interval: 1, intervalUnit: glue.DateIntervalUnit.DAYS },
    }),
  },
});
```

## Properties

- `interval`: number (required) — Interval between partition values.

- `intervalUnit`: [DateIntervalUnit](/cdk/api/v2/docs/@aws-cdk_aws-glue-alpha.DateIntervalUnit.html) (required) — Unit for the interval.
