diff --git a/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/iceberg/IcebergSource.java b/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/iceberg/IcebergSource.java index 50d817e8092..840cdc35ca0 100644 --- a/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/iceberg/IcebergSource.java +++ b/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/iceberg/IcebergSource.java @@ -96,9 +96,15 @@ * # --- Recommended: configurable partition value format --- * # iceberg.partition.value.datetime.format is a DateTimeFormatter pattern applied to the output * # partition value used in the filter expression. - * # When CURRENT_DATE is used, the reference datetime is LocalDateTime.now(), so a pattern - * # with HH will embed the current hour automatically — no separate hour config needed. * # When set, it supersedes iceberg.hourly.partition.enabled. + * # + * # CURRENT_DATE behaviour: + * # - iceberg.partition.value.datetime.format set (recommended): + * # LocalDateTime.now() — HH embeds the live clock-hour (e.g. 2025-04-01-14). + * # - iceberg.partition.value.datetime.format absent — falls back to the legacy flag + * # iceberg.hourly.partition.enabled (kept for backward compat only, superseded by the above): + * # hourly.partition.enabled=true (default) → LocalDate.now() at midnight → -00 suffix preserved. + * # hourly.partition.enabled=false → LocalDate.now() at midnight → yyyy-MM-dd, no hour. * * # Standard hourly partitions (yyyy-MM-dd-HH) — CURRENT_DATE picks up live hour * iceberg.partition.value.datetime.format=yyyy-MM-dd-HH # → "2025-04-01-14" (current hour) @@ -152,10 +158,26 @@ public class IcebergSource extends FileBasedSource /** * Optional {@link DateTimeFormatter} pattern controlling how the partition value is rendered. * - *

When {@code iceberg.filter.date=CURRENT_DATE} the reference datetime is - * {@link java.time.LocalDateTime#now()}, so a pattern that includes {@code HH} will embed - * the current clock-hour automatically — no separate hour config is needed. - * For a specific date (e.g. {@code 2025-04-03}), the time defaults to midnight (00:00). + *

CURRENT_DATE resolution — two paths: + *

+ * For a static date value (e.g. {@code 2025-04-03}), the time always defaults to midnight (00:00) + * regardless of which path is used. * *

Examples: *