Skip to content
v2.273.0

DateProjectionStep Struct ​

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.

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 ​

intervalnumberintervalint | floatintervalNumberIntervaldoubleInterval*float64required#
Interval between partition values.
intervalUnitDateIntervalUnitinterval_unitDateIntervalUnitintervalUnitDateIntervalUnitIntervalUnitDateIntervalUnitIntervalUnitDateIntervalUnitrequired#
Unit for the interval.