TD_TIME_BUCKET_NUMBER | Teradata Vantage - 17.00 - TD_TIME_BUCKET_NUMBER - Teradata Database

Teradata Vantageā„¢ - Time Series Tables and Operations

prodname
Advanced SQL Engine
Teradata Database
vrm_release
17.00
created_date
June 2020
category
Programming Reference
featnum
B035-1208-170K
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.