batch

This block is part of the foreach group and was last modified in core v12.0.4.

batch v12.0.4

Executes the given array in batches, this is the non queue version.

In pins 3 + flow
  • flow
    flow
  • array required
    array
  • batch
    number

    Default 100

  • concurrency
    number

    How many iterate functions should be ran at the same time • Min: 0 • Max: 1000

    Default 5

Out pins 1 + flow
  • flow
    flow
  • Iterator
    execute_function

Splits the array into chunks of the batch pin size (default 100; values below 1 fall back to 100) and runs the iterator function once per chunk with pins batch (1-based), index (0-based), items, and total_batches, waiting for ALL batches before the flow continues : nothing is queued. Batches run with bounded concurrency (default 5, max 1000; 0 or 1 runs serially in order). A nil, non-array, or empty array runs zero iterations.

A typical wiring for batch: a function trigger starts the flow; with values feeds the array pin; the function out pin wires to an execute block.

Studio canvas example for the batch block: typical wiring for batch.

Version history

Introduced in v12.0.4.


Back to foreach Return to the main group to view all sub-groups Back to flow: loops Return to the group to view all blocks within this group