stream array from file
This block is part of the files group and was last modified in core v10.4.28.
stream array from file v10.4.28 takes a json file with an array as root element and runs the attached function in batches
- flow
flow - file required
file - batch (100)
number - delete
conditionIf true: Will delete the file after the stream is complete
- done
flow - success
condition - error
value - Iterator
execute_function
Reads a JSON file whose root is an array and runs the attached function once per batch of batch (default 100) elements, passing pins batch (1-based) and items; the done flow continues only after ALL batches ran. success=false with an error message on value when the file pin is empty, has no path, the file is missing, the JSON is invalid, or no function is wired. The file is deleted afterwards only when remove is true AND the file lives under /temp/.
A typical wiring for stream array from file: a function trigger starts the flow; get file from assets feeds the file pin; the function out pin wires to an execute block.
Version history
Introduced in v10.4.28.
Back to
files Return to the main group to view all sub-groups Back to file Return to the group to view all blocks within this group 