DurationFromColumn / Temporal Layer
Convert integer columns to fixed-duration values, similar to pandas Timedelta or Python's timedelta. Creates exact time intervals unaffected by calendar variations or daylight savings.
Example conversions:
Input Value | Duration Unit | Time Unit | Result Duration | Note |
---|---|---|---|---|
24 | Hours | Ms | 86,400,000 ms | Exactly one day |
7 | Days | Ms | 604,800,000 ms | Exactly one week |
60 | Minutes | Us | 3,600,000,000 μs | Exactly one hour |
Important distinctions:
- Fixed durations: Always same length (e.g., 24 hours = 1 day always)
- Calendar durations: Variable length (use offset_by for these)
- DST-independent: Not affected by timezone changes
Common applications:
- Scientific measurements
- Process timing
- SLA calculations
- Performance metrics
- Interval analysis
Select
columnInteger column to convert to durations. Values represent counts of the specified duration unit (e.g., 24 hours, 7 days).
TimeUnit
enumTarget precision for storing duration values. Affects storage size and resolution of the result.
Nanosecond precision (10⁻⁹ seconds). For high-precision scientific or technical measurements. Maximum range: ~292 years.
Microsecond precision (10⁻⁶ seconds). For system-level timing. Maximum range: ~292,000 years.
Millisecond precision (10⁻³ seconds). For general timing needs. Maximum range: ~292 million years.
DurationUnit
enumUnit interpretation for input integer values. Determines how to convert input numbers into time spans.
Input represents nanoseconds (10⁻⁹ seconds). For ultra-precise measurements.
Input represents microseconds (10⁻⁶ seconds). For system timing analysis.
Input represents milliseconds (10⁻³ seconds). For application response times.
Input represents seconds. For human-scale timing and basic intervals.
Input represents minutes. For longer process durations and scheduling.
Input represents hours. For shift lengths and substantial time periods.
Input represents days (exactly 24 hours). For multi-day intervals.
Input represents weeks (exactly 7 days). For long-term fixed periods.
AsColumn
nameName for the new column. If not provided, the system generates a unique name. If AsColumn
matches an existing column, the existing column is replaced. The name should follow valid column naming conventions.