definition and usage in Prefect can be found in the Prefect documentation under the section about tasks. The documentation describes
.map()
as an implementation that automatically creates a task run for each element of its input data. Mapped tasks represent the computations of many individual children tasks.
Here is a direct link to the relevant section of the documentation: Tasks - Map
And a brief example of its usage:
Copy code
python
from prefect import flow, task
@task
def square_num(num):
return num**2
@flow
def map_flow(nums):
squared_nums = square_num.map(nums)
#... rest of your flow
You can see more examples and explanations in the provided link.
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.