Is there a way to run a task quickly in-line during the flow orchestration block? I'm currently using .run() to attempt to execute a PrefectSecret because it contains a dict that I need info from, and the secrets don't seem iterable on their own.
k
Kevin Kho
08/12/2021, 6:44 PM
Yep! Like
task(lambda x: len(x))(input)
would work in the Flow block
c
Charles Liu
08/12/2021, 6:45 PM
so if I wanted to unpack a secret to reference in the flow, I just wrap it in task()?
k
Kevin Kho
08/12/2021, 6:47 PM
Oh I see what you mean. No you can’t evaluate it like that using
task.run()
in the Flow block because that it was the Flow block is doing. For a dict you either need an intermediate task to unpack it or pass the whole dict to the subsequent task
You might be able to do:
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.