batch
Type: Plugin
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)
| Argument | Type | Description |
|---|---|---|
batch_size |
int64 | Size of batch (defaults to 10). |
batch_func |
string | A VQL Lambda that determines when a batch is ready. Example ‘x=>len(list=x) >= 10’. |
query |
StoredQuery (required) | Run this query over the item. |
timeout |
uint64 | If specified we flush incomplete batches in this many seconds. |
Platforms: macOS, Linux, Windows