Hello community, I am trying to map a task and ho...
# ask-community
b
Hello community, I am trying to map a task and hold one of the arguments as a constant, I have read the docs
Copy code
Map a function that adds tasks to a flow elementwise across one or more tasks. Arguments that should not be mapped over should be wrapped with prefect.unmapped.
but I feel like an example is needed trying to do something like this:
Copy code
users = ["ben", "kevin"]
CONSTANT_DATA = "something"

with Flow():
   apply_map(notify, CONSTANT_DATA)
How do I hold this constant?
h
@Ben Muller maybe try this:
Copy code
from prefect import unmapped

users = ["ben", "kevin"]
CONSTANT_DATA = "something"

with Flow():
   apply_map(notify, unmapped(CONSTANT_DATA))
upvote 1
b
cheers @Hugo Slepicka
🍻 1
k
We need to add Hugo in that users list
🙌 1
😆 1
💯 1