Skip to content

Bucket

Bucket (bucket)

Assign numeric values to named buckets using ordered thresholds.

Transform json

Minimal example

actions:
- bucket:
field: ""
JSON
{
"actions": [
{
"bucket": {
"field": ""
}
}
]
}

Contents

Fields

FieldTypeRequiredDescription
fieldfield (string)Field containing the numeric value to evaluate.
Examples: data_field
descriptionstringdescribe this step.
conditionlua-expression (string)Only run this action if the specified condition is met.
Examples: 2 * count()
bucketsBuckets[]Ordered bucket rules; the first matching rule wins.
default-labelstringLabel applied when no rule matches.
output-fieldfield (string)Field that receives the bucket label (defaults to overwriting the source field).
Examples: data_field
emit-boundsboolean (bool)Emit the numeric bounds alongside the bucket label.

Schema

Buckets Fields

FieldTypeRequiredDescription
minnumber (string)Inclusive lower bound when provided (parsed as a floating point value).
Examples: 42, 1.2e-10
min-exclusivenumber (string)Exclusive lower bound when provided.
Examples: 42, 1.2e-10
maxnumber (string)Inclusive upper bound when provided.
Examples: 42, 1.2e-10
max-exclusivenumber (string)Exclusive upper bound when provided.
Examples: 42, 1.2e-10
labelstringLabel applied when the bucket matches.