Skip to content

Latest commit

 

History

History
54 lines (40 loc) · 848 Bytes

toepochbucket.md

File metadata and controls

54 lines (40 loc) · 848 Bytes
description
This section contains reference documentation for the toEpochBucket functions.

ToEpochBucket

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