CastTimeUnit / Temporal Layer

Convert temporal values to different time unit precision, similar to pandas astype() for datetime64 or Arrow's cast operation.

Example conversions:

Original (ns)To msTo μs
2024-01-01 12:30:00.123456789...123...123456
2024-01-01 15:45:30.987654321...987...987654

Important notes:

  • Converting to lower precision (e.g., ns → ms) loses information
  • Converting to higher precision adds zeros
  • Original timezone information is preserved

Common applications:

  • Database compatibility
  • Storage optimization
  • System integration
  • Time series alignment
  • Performance analysis
  • Log file processing
Table
0
0
Table

Transforms

[, ...]

Select

column

Temporal column to convert. Must be a datetime, time, or duration type. Common sources:

  • event_timestamp: System events
  • created_at: Record creation time
  • measurement_time: Sensor readings
  • duration_ms: Operation durations
Millisecond

Target precision for temporal values. Choice affects storage size and resolution.

Millisecond ~

Millisecond precision (10⁻³ seconds). Suitable for:

  • Web application timestamps
  • User interaction tracking
  • Most business operations Storage: 3 decimal places
Microsecond ~

Microsecond precision (10⁻⁶ seconds). Suitable for:

  • Scientific measurements
  • High-frequency trading
  • Performance profiling Storage: 6 decimal places
Nanosecond ~

Nanosecond precision (10⁻⁹ seconds). Suitable for:

  • System kernel events
  • Hardware timing
  • Ultra-precise measurements Storage: 9 decimal places

Name 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.