Apache Pinot Docs
Search…
latest
Configuration Reference
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

1
select ToEpochSecondsBucket(1613472303000, 1000) AS bucket
2
FROM ignoreMe
Copied!
bucket
1613472
1
select ToEpochMinutesBucket(1613472303000, 10) AS bucket
2
FROM ignoreMe
Copied!
bucket
2689120
1
select ToEpochHoursBucket(1613472303000, 5) AS bucket
2
FROM ignoreMe
Copied!
bucket
89637
1
select ToEpochDaysBucket(1613472303000, 10) AS bucket
2
FROM ignoreMe
Copied!
bucket
1867
Copy link