Release· Databricks release notes (AWS)
time_bucket adds fixed-width timestamp buckets in SQL
Databricks SQL now has the time_bucket function, which returns the start of the fixed-width interval that contains a timestamp. Use it instead of date_trunc when the bucket width or bucket origin is not a calendar unit.
Learners writing time-based SQL aggregations now have a function for custom bucket widths and origins.