Enum DateIntervalUnit

java.lang.Object
java.lang.Enum<DateIntervalUnit>
software.amazon.awscdk.services.glue.DateIntervalUnit
All Implemented Interfaces:
Serializable, Comparable<DateIntervalUnit>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)", date="2026-09-17T14:54:05.022Z") @Stability(Stable) public enum DateIntervalUnit extends Enum<DateIntervalUnit>
Date interval unit for partition projection.

Example:

 Database myDatabase;
 S3Table.Builder.create(this, "MyTable")
         .database(myDatabase)
         .columns(List.of(Column.builder()
                 .name("data")
                 .type(Schema.STRING)
                 .build()))
         .partitionKeys(List.of(Column.builder()
                 .name("date")
                 .type(Schema.STRING)
                 .build()))
         .dataFormat(DataFormat.JSON)
         .partitionProjection(Map.of(
                 "date", PartitionProjectionConfiguration.date(DatePartitionProjectionConfigurationProps.builder()
                         .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(DateProjectionStep.builder().interval(1).intervalUnit(DateIntervalUnit.DAYS).build())
                         .build())))
         .build();
 

See Also:
  • Enum Constant Details

    • YEARS

      @Stability(Stable) public static final DateIntervalUnit YEARS
      Year interval.
    • MONTHS

      @Stability(Stable) public static final DateIntervalUnit MONTHS
      Month interval.
    • WEEKS

      @Stability(Stable) public static final DateIntervalUnit WEEKS
      Week interval.
    • DAYS

      @Stability(Stable) public static final DateIntervalUnit DAYS
      Day interval (default).
    • HOURS

      @Stability(Stable) public static final DateIntervalUnit HOURS
      Hour interval.
    • MINUTES

      @Stability(Stable) public static final DateIntervalUnit MINUTES
      Minute interval.
    • SECONDS

      @Stability(Stable) public static final DateIntervalUnit SECONDS
      Second interval.
  • Method Details

    • values

      public static DateIntervalUnit[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static DateIntervalUnit valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null