Next newbie question: What's the best way to apply...
# prefect-community
k
Next newbie question: What's the best way to apply a task over a list? The task also takes additional static arguments that don't change for each element. I tried to use map but then it tried to access indices of the static args
c
Great question - Prefect has an
unmapped
wrapper for specifying static non-mapped arguments to a mapped function. Check out the example in the docstring here: https://docs.prefect.io/api/latest/utilities/edges.html#unmapped
upvote 1
n
Hi @Kyle McEntush - you can wrap your static inputs with
unmapped
to prevent mapped tasks from trying to iterate over them
upvote 1
k
You guys are such pros 😛
😂 1
marvin 1
This is the first time i'm revisiting prefect since v0.5 haha
n
Welcome back!