TD_TIME_BUCKET_NUMBER | Teradata Vantage - 17.10 - TD_TIME_BUCKET_NUMBER - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - Time Series Tables and Operations

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1208-171K
Language
English (United States)
The TD_TIME_BUCKET_NUMBER system function calculates the time bucket number. You can use this function with the HASHROW, HASHBUCKET, or HASHAMP functions to see how time series rows are distributed across the system. Other uses include:
  • Determining which candidate rows are assigned to which bucket in a GROUP BY TIME operation
  • Using the result in a join or to insert into a table if you assign bucket numbers to rows outside of a GROUP BY TIME operation

The return type of this function is BIGINT.

Usage Notes

You can reference this function in any SQL request where a system function call is valid.