Kyle McEntush

    Kyle McEntush

    2 years ago
    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
    Chris White

    Chris White

    2 years ago
    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
    nicholas

    nicholas

    2 years ago
    Hi @Kyle McEntush - you can wrap your static inputs with
    unmapped
    to prevent mapped tasks from trying to iterate over them
    Kyle McEntush

    Kyle McEntush

    2 years ago
    You guys are such pros 😛
    This is the first time i'm revisiting prefect since v0.5 haha
    nicholas

    nicholas

    2 years ago
    Welcome back!