ToEpochBucket

This section contains reference documentation for the toEpochBucket functions.

Convert epoch milliseconds to epoch , and divided by bucket size (Bucket size is defined in ). The following time units are supported:

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Signature

ToEpoch<TIME_UNIT>Bucket(timeInMillis, bucketSize)

Usage Examples

select ToEpochSecondsBucket(1613472303000, 1000) AS bucket
FROM ignoreMe
bucket

1613472

select ToEpochMinutesBucket(1613472303000, 10) AS bucket
FROM ignoreMe
bucket

2689120

select ToEpochHoursBucket(1613472303000, 5) AS bucket
FROM ignoreMe
bucket

89637

select ToEpochDaysBucket(1613472303000, 10) AS bucket
FROM ignoreMe
bucket

1867

Last updated