DateIntervalUnit Enum
Date interval unit for partition projection.
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 },
}),
},
});
Members
| Member | Description |
|---|---|
YEARS | Year interval. |
MONTHS | Month interval. |
WEEKS | Week interval. |
DAYS | Day interval (default). |
HOURS | Hour interval. |
MINUTES | Minute interval. |
SECONDS | Second interval. |
Referenced by
DateProjectionStep.intervalUnitinterval_unitintervalUnitIntervalUnitIntervalUnit