https://prefect.io logo
n

Newskooler

10/13/2020, 1:37 PM
Hi 👋 Is mapping only possible on the functional API and if not, how can something be mapped with Imperative API?
j

Jim Crist-Harif

10/13/2020, 2:54 PM
The line between "functional" and "imperative" is a blurry, so it's hard to know what you mean. There are a few ways to create mapped tasks in prefect: • call
task.map
• call
task(..., mapped=True)
• call
task.bind(..., mapped=True)
• call
task.set_upstream(..., mapped=True)
• call
flow.add_edge(..., mapped=True)
Any of these can be used inside a
Flow
context, or with an explicit
flow
passed in.
👍 1
n

Newskooler

10/13/2020, 4:30 PM
Thank you @Jim Crist-Harif