Ken Nguyen
04/01/2022, 3:27 AMKevin Kho
create_flow_run
returns the flow run id alreadyKen Nguyen
04/01/2022, 3:44 AMchild_flow_run_id = create_flow_run(
flow_name="test-produce-logs-flow", #, run_name="custom_run_name"
project_name="data_quality_tracking"
)
flow_run_view = FlowRunView.from_flow_run_id(
child_flow_run_id
)
But I’m getting an error that says GRAPHQL_PARSE_FAILED: Syntax Error: Cannot parse the unexpected character "<".
Is there something I have to do to child_flow_run_id
before I can put it into FlowRunView.from_flow_run_id()
?Kevin Kho
child_flow_run_id
is of type task but the FlowRunView.from_flow_run_id
is not a task so it executes immediately.
So it’s either you run the create_flow_run eagerly outside of a Flow or you put the FlowRunView logic inside a taskKen Nguyen
04/01/2022, 4:03 AMKevin Kho
Ken Nguyen
04/01/2022, 6:21 AMwait_for_flow_to_run
AND create a FlowRunView
, how would I be able to do that? I was able to find examples of both used separately, but no examples for them being used togetherKevin Kho
with Flow() as flow:
the_id = create_flow_run()
wait_for_flow_run(the_id)
task_with_flow_run_view(the_id)
or you can make a new task that calls wait_for_flow_run.run()
and then adds some logicKen Nguyen
04/01/2022, 4:44 PMtask_with_flow_run_view
isn’t actually waiting for wait_for_flow_run
to be done. Should the below schematic be linear as well if I implemented the wait_for_flow_run
correctly?Kevin Kho
wait_for_flow_run
allows your to stream logs if that is your goalKen Nguyen
04/01/2022, 4:48 PMKevin Kho
with Flow(...) as flow:
get_logs.set_upstream(wait_for_flow_run_task)
Ken Nguyen
04/01/2022, 5:48 PM