interface DatePartitionProjectionConfigurationProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Glue.Alpha.DatePartitionProjectionConfigurationProps |
Go | github.com/aws/aws-cdk-go/awscdkgluealpha/v2#DatePartitionProjectionConfigurationProps |
Java | software.amazon.awscdk.services.glue.alpha.DatePartitionProjectionConfigurationProps |
Python | aws_cdk.aws_glue_alpha.DatePartitionProjectionConfigurationProps |
TypeScript (source) | @aws-cdk/aws-glue-alpha ยป DatePartitionProjectionConfigurationProps |
Properties for DATE partition projection configuration.
Example
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',
interval: 1, // optional, defaults to 1
intervalUnit: glue.DateIntervalUnit.DAYS, // optional: YEARS, MONTHS, WEEKS, DAYS, HOURS, MINUTES, SECONDS
}),
},
});
Properties
| Name | Type | Description |
|---|---|---|
| format | string | Date format for partition values. |
| max | string | End date for the partition range (inclusive). |
| min | string | Start date for the partition range (inclusive). |
| interval? | number | Interval between partition values. |
| interval | Date | Unit for the interval. |
format
Type:
string
Date format for partition values.
Uses Java SimpleDateFormat patterns.
See also: https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html
max
Type:
string
End date for the partition range (inclusive).
Can be either:
- Fixed date in the format specified by
formatproperty - Relative date using NOW syntax
Same format constraints as min.
min
Type:
string
Start date for the partition range (inclusive).
Can be either:
- Fixed date in the format specified by
formatproperty (e.g., '2020-01-01' for format 'yyyy-MM-dd') - Relative date using NOW syntax (e.g., 'NOW', 'NOW-3YEARS', 'NOW+1MONTH')
interval?
Type:
number
(optional, default: Athena's default step for the format's precision; required when format is sub-day precision)
Interval between partition values.
Required (together with intervalUnit) when format carries sub-day
precision โ i.e. a field finer than a day, such as hours or AM/PM. At day
or coarser precision Athena defaults the step, so it is optional.
intervalUnit?
Type:
Date
(optional, default: Athena's default unit for the format's precision; required when format is sub-day precision)
Unit for the interval.
Required (together with interval) when format carries sub-day
precision โ i.e. a field finer than a day, such as hours or AM/PM. At day
or coarser precision Athena defaults the step, so it is optional.

.NET
Go
Java
Python
TypeScript (