Build a Metaflow flow that fans out with a foreach over a list and joins results back together

domain: docs.metaflow.org · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Define a FlowSpec with mandatory `start` and `end` steps
  2. In `start`, assign a list to an instance variable and call `self.next(self.<step>, foreach='<list_attr>')`
  3. In the foreach step, access the per-task item via `self.input`
  4. Implement a `join(self, inputs)` step that takes `inputs` and aggregates results (e.g. a list comprehension over `inputs`)
  5. Run the flow with `python myflow.py run`

Known gotchas

Related routes

Use Airflow dynamic task mapping to fan-out tasks over a runtime-determined list of items
airflow.apache.org · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans