https://prefect.io logo
#prefect-community
Title
# prefect-community
e

Emil Barbuta

07/18/2022, 1:28 PM
Hello! I'm trying to create a flow of flows in which some child flows depend on others. When trying to make 2 of them run sequentially using the following code snippet,
wait_for_flow_run
fails by throwing
TypeError: Object of type FlowRunView is not JSON serializable
. Am I passing the wrong object type as input?
Copy code
from prefect.tasks.prefect import create_flow_run, wait_for_flow_run

with Flow("run-pipeline") as flow:
    flow_a_id = create_flow_run(flow_name=flow_a.name, ...[SOME INPUT PARAMS])
    flow_a_wait = wait_for_flow_run(flow_a_id)
(I'm using prefect 1.0.0)
s

Sylvain Hazard

07/18/2022, 1:33 PM
Hi ! Are you sure the
children
param of
Flow
exists ? I can't see it anywhere on the API docs.
🙌 1
The create/wait part seems good so this may be a good starting point.
👍 1
e

Emil Barbuta

07/18/2022, 1:40 PM
Hey! You're right, that's an input parameter to a wrapper I built on top of the regular flow, but it's irrelevant for the issue as it just assigns an instance variable. (I edited the original question).
But thanks for the observation, that's a valuable clue for my investigation of why
create_flow_run
returns that type
a

Anna Geller

07/18/2022, 1:46 PM
it should normally be a name of an already registered flow, check this post for an example https://www.prefect.io/guide/blog/flow-of-flows-orchestrating-elt-with-prefect-and-dbt/
28 Views