Enum DateIntervalUnit

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

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-03-27T13:12:22.281Z") @Stability(Experimental) public enum DateIntervalUnit extends Enum<DateIntervalUnit>
(experimental) 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")
                         .interval(1) // optional, defaults to 1
                         .intervalUnit(DateIntervalUnit.DAYS)
                         .build())))
         .build();
 

See Also:
  • Enum Constant Details

    • YEARS

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

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

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

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

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

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

      @Stability(Experimental) public static final DateIntervalUnit SECONDS
      (experimental) 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