Skip to content
Please update to the latest release 0.77.2 to address Multiple CVEs.

batch

Plugin
Arg Description Type
batch_size Size of batch (defaults to 10). int64
batch_func A VQL Lambda that determines when a batch is ready. Example ‘x=>len(list=x) >= 10’. string
query Run this query over the item. StoredQuery (required)
timeout If specified we flush incomplete batches in this many seconds. uint64

Description

Batches query rows into multiple arrays.

This is useful for batching multiple rows from a query into another query, such as sending results to an API endpoint.

Example

SELECT * FROM batch(query={
  SELECT _value
  FROM range(start=0, end=10, step=1)
}, batch_size=3)