Apache Pinot Docs
latest
Search…
⌃K

FromEpochBucket

This section contains reference documentation for the fromEpochBucket functions.
Convert epoch to epoch milliseconds. e.g. 10 seconds since epoch or 5 minutes since Epoch. The following time units are supported:
  • SECONDS
  • MINUTES
  • HOURS
  • DAYS

Signature

FromEpoch<TIME_UNIT>Bucket(timeInMillis, bucketSize)

Usage Examples

select FromEpochSecondsBucket(1613472303, 1) AS bucket
FROM ignoreMe
bucket
1613472303000
select FromEpochSecondsBucket(1613472303, 2) AS bucket
FROM ignoreMe
bucket
3226944606000
select FromEpochMinutesBucket(2689120, 10) AS bucket
FROM ignoreMe
bucket
1613472000000
select FromEpochHoursBucket(89637, 5) AS bucket
FROM ignoreMe
bucket
1613466000000
select FromEpochDaysBucket(1867, 10) AS bucket
FROM ignoreMe
bucket
1613088000000
Last modified 1yr ago