Skip to main content

By default, all functions executed by a recipe happen sequentially. The concurrent connector allows functions to be executed in parallel.

Click here to learn about the concurrent wrangle.

Tabset

Read​

Recipe​

read:
- union:
sources:
- concurrent:
read:
- file:
name: file1.xlsx
- file:
name: file2.xlsx
- file:
name: file3.csv

Parameters​

ParameterRequiredData TypeNotes
read✓listList of read connectors to run concurrently.
max_concurrencystrThe maximum number to execute in parallel. If there are more than this, the rest will be queued.
use_multiprocessingstrUse multiprocessing instead of threading. Default is False.
functionsstrCustom functions to make available downstream.
variablesintVariables to make available downstream.

Write​

Recipe​

write:
- concurrent:
write:
- file:
name: file1.xlsx
columns:
- col1
- col2
- file:
name: file2.xlsx
columns:
- col3
- col4

Parameters​

ParameterRequiredData TypeNotes
df✓DataFrameDataframe to write.
write✓listList of write connectors to run concurrently.
max_concurrencyintThe maximum number to execute in parallel. If there are more than this, the rest will be queued.
variablesstrVariables to pass to any downstream recipes.
functionsstrCustom functions to pass to any downstream recipes.
use_multiprocessingstrUse multiprocessing instead of threading. Default is False.

Run​

Run multiple actions concurrently.

Recipe​

run:
on_start:
- concurrent:
run:
- custom.my_function:
category: Hand Tools
- custom.my_function:
category: Power Tools
- custom.my_function:
category: Hardware

Parameters​

ParameterRequiredData TypeNotes
run✓listList of actions to run concurrently.
max_concurrencystrThe maximum number to execute in parallel. If there are more than this, the rest will be queued.
variablesstrVariables to pass to any downstream recipes.
functionsstrCustom functions to pass to any downstream recipes.
use_multiprocessingintUse multiprocessing instead of threading. Default is False.