DateProjectionStep
- class aws_cdk.aws_glue.DateProjectionStep(*, interval, interval_unit)
Bases:
objectA required-together interval step for DATE partition projection.
Bundling
intervalandintervalUnitinto one value makes a partial step (one without the other) unrepresentable.- Parameters:
interval (
Union[int,float]) – Interval between partition values.interval_unit (
DateIntervalUnit) – Unit for the interval.
- ExampleMetadata:
infused
Example:
# my_database: glue.Database glue.S3Table(self, "MyTable", database=my_database, columns=[glue.Column( name="data", type=glue.Schema.STRING )], partition_keys=[glue.Column( name="date", type=glue.Schema.STRING )], data_format=glue.DataFormat.JSON, partition_projection={ "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=glue.DateProjectionStep(interval=1, interval_unit=glue.DateIntervalUnit.DAYS) ) } )
Attributes
- interval
Interval between partition values.
- interval_unit
Unit for the interval.