Skip to content

Batch In

Batch In (batch-in)

Accumulate events into batches before downstream processing.

Transform json

Minimal example

actions:
- batch-in: {}
JSON
{
"actions": [
{
"batch-in": {}
}
]
}

Contents

Fields

FieldTypeRequiredDescription
description Generalstringdescribe this step.
condition Generallua-expression (string)Only run this action if the condition is met.
Examples: 2 * count()
size Batchingnumber (integer)Maximum number of events before the batch flushes (optional).
Examples: 42, 1.2e-10
timeouttime-interval (string)Flush interval when the batch is not yet full.
Examples: 500ms, 2h
end-of-document Batchingboolean (bool)Flush outstanding events when a document-end marker arrives.
wrap-as-json Batchingboolean (bool)Produce a JSON string representation of the batch alongside the records array.
header EnvelopestringOptional header emitted with each batch.
footer EnvelopestringOptional footer emitted with each batch.

General

Show fields
FieldTypeRequiredDescription
descriptionstringdescribe this step.
conditionlua-expression (string)Only run this action if the condition is met.
Examples: 2 * count()

Batching

Show fields
FieldTypeRequiredDescription
sizenumber (integer)Maximum number of events before the batch flushes (optional).
Examples: 42, 1.2e-10
end-of-documentboolean (bool)Flush outstanding events when a document-end marker arrives.
wrap-as-jsonboolean (bool)Produce a JSON string representation of the batch alongside the records array.

Envelope

Show fields
FieldTypeRequiredDescription
headerstringOptional header emitted with each batch.
footerstringOptional footer emitted with each batch.