Databricks SQL Function time_bucket Aligns Timestamps to Fixed Intervals
Databricks introduces the `time_bucket` SQL function, designed to align timestamps to user-defined, fixed-width intervals like 15-minute or 3-month buckets. This function provides a flexible alternative to `date_trunc` when the desired bucket width or start point doesn't correspond to a standard calendar unit. It is useful for data engineers and analysts working with time-series data, returning the start of the interval a timestamp falls into, aligned to a chosen origin.
Features (1) ›
- New time_bucket SQL function for flexible timestamp alignment
The new `time_bucket` SQL function allows users to align timestamps to fixed-width intervals, such as 15-minute or 3-month buckets, with a customizable origin. This function offers an alternative to `date_trunc` for scenarios where bucket widths or start points do not align with standard calendar units.
https://docs.databricks.com/aws/en/release-notes/product/2026/september#time_bucket-sql-function-aligns-timestamps-to-fixed-width-time-buckets
Related releases
- Databricks Lakebase Expands PCI-DSS and HITRUST Compliance to All AWS Regions Databricks Release Notes ·
- Databricks Lakeflow Connect to add incremental ingestion for Salesforce formula fields Databricks Release Notes ·
- Databricks Lakeflow Connect: Zerobus Ingest to Default Storage in Public Preview Databricks Release Notes ·
- SQL Data Types: Reference and Best Practices Databricks Blog ·
- Databricks details LTAP for unifying OLTP and OLAP with AI agents Databricks Blog ·
- Verkada Connector Now in Beta for Databricks Lakeflow Connect Databricks Release Notes ·