fabric/for-each
Run the nested steps once per item. Inside, refer to the item as ${{ item.field }}.
The step takes nested steps:, and they are required. It takes no timeout: or retry:.
with.items
A ${{ }} that evaluates to an array, typically steps.<lookup>.outputs.value.
with.batch
How many items run at once. Omit for the Fabric default.
with.sequential
true to run one at a time. Default false.
Example
yaml
- id: each_table
uses: fabric/for-each
with:
items: ${{ steps.list_tables.outputs.value }}
batch: 4
steps:
- id: load_table
uses: fabric/copy
with:
source:
postgres:
connection: ${{ env.POSTGRES }}
table:
schema: public
table: ${{ item.table_name }}
sink:
table: silver_tablewith, elsewhere in the file:
yaml
env:
POSTGRES: 00000000-0000-0000-0000-000000000000
datasets:
silver_table:
table:
lakehouse: slv_lakehouse
schema: Sales
table: ${{ item.table_name }}