Assaf Ben Shimon04/21/2022, 11:01 PM
Kevin Kho04/21/2022, 11:02 PM
but what is Foo? Is that a task?
but will break for runs with Prefect Cloud because those are triggered by API requests. Instead, use a string as a default and pass it to an intermediate task to return the function/callable 2. I am unclear at the moment if
is a task. If it is a task, you can’t use
loops on task outputs because
runs during the Flow
time, not during
. So the Flow is built, but the
loop doesn’t know how many items there are in the list if it’s a Task. A Task value (including Parameters) are created at runtime. Note the distinction of flow-build and flow-run time. If you need to loop over a task output, you should be looking at mapping. 3. Assuming
is some task output, you can’t do stuff like
. This is because that is evaluated during build time when it is still type Task. The value doesn’t exist until runtime. Instead, you need this method class to happen inside a task so logic is deferred. This will work though if
is not a task and already defined during flow-build time.
is a function, you can’t pass a Parameter to it because Parameters don’t exist during build time. It will not behave as expected and you are passing the Parameter class as opposed to a Parameter value
Assaf Ben Shimon04/21/2022, 11:24 PM
annotation, right? Or is there anything else?
Kevin Kho04/21/2022, 11:24 PM
Assaf Ben Shimon04/21/2022, 11:28 PM
Kevin Kho04/21/2022, 11:28 PM
Assaf Ben Shimon04/21/2022, 11:29 PM
Kevin Kho04/21/2022, 11:29 PM