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.
You can reference this function in any SQL request where a system function call is valid.