Skip to content

BucketsSpec

BucketsSpec<S, B, M> = object

Defined in: packages/schema/src/buckets/buckets.ts:9

The second argument of .bucketsOf().

S

B extends readonly Ref[]

M extends BucketMeasuresInput<S>

by: (r) => B

Defined in: packages/schema/src/buckets/buckets.ts:15

The fields to group by besides the bucket; the source’s tenant field must be one of them.

FieldRefs<S>

B


every: BucketEvery

Defined in: packages/schema/src/buckets/buckets.ts:13

The size of the buckets.


late: string

Defined in: packages/schema/src/buckets/buckets.ts:19

How late a record may arrive and still be counted: a number of minutes, hours or days, such as '2 hours'.


optional measures?: M

Defined in: packages/schema/src/buckets/buckets.ts:17

The number fields to keep, each with sum, max or both; the count of records is always kept.


time: (r) => Ref

Defined in: packages/schema/src/buckets/buckets.ts:11

The timestamp field whose hour or day, in UTC, is a record’s bucket.

FieldRefs<S>

Ref