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

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