Iason Andriopoulos
12/02/2020, 2:52 PMemre
12/02/2020, 3:07 PMparameters
over at https://docs.prefect.io/api/latest/tasks/prefect.html#startflowrun
I think, rather than keeping both flows under parent flow, your flow_a should have a final task, which is a StartFlowRun
task that schedules flow b with any parameters that come from upstream tasks at flow a.
with Flow('first') as flow:
a = task_a()
b = task_b(a)
c = task_c(b)
StartFlowRun(flow_name='second', project_name=...)(parameters={"input"=c})
Iason Andriopoulos
12/02/2020, 3:14 PMemre
12/02/2020, 3:20 PMStartFlowRun(a)
should wait for the flow to finish. Then, the StartFlowRun
task will give you a flow run id, which you can inspect the graphql api with.
Prefect server does not hold your task results directly, it stores references to your task results, such as an s3 file path if you are storing task results in s3. If you can find out where prefect stores the result of the task you need, you can have some custom tasks to get that result.
It’s clunky, I don’t know if everything you need is there, but thats my idea 😅state_result
exists inside task_run
table of my local prefect servers postgres instance. Since I never used results, all my values are null, but that should contain the result you need. Now you need to somehow access that column via graphqlIason Andriopoulos
12/02/2020, 3:29 PMserialized state
in task run contains all the necessary information (the location of the result, etc)