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: 1 for single-day or single-month precision, otherwise required)
Interval between partition values.
When the provided dates are at single-day or single-month precision, the interval is optional and defaults to 1 day or 1 month, respectively. Otherwise, interval is required.
intervalUnit?
Type:
Date
(optional, default: DAYS for single-day precision, MONTHS for single-month precision, otherwise required)
Unit for the interval.
When the provided dates are at single-day or single-month precision, the intervalUnit is optional and defaults to 1 day or 1 month, respectively. Otherwise, the intervalUnit is required.

.NET
Go
Java
Python
TypeScript (