Hanno Küpers
08/17/2022, 12:59 PMstate.result()
only returns _Result(key='82ecff4d3a454e77b08b5ce93e1dd418', filesystem_document_id=UUID('af2119c0-c631-45ed-af6a-0cff1cf396a5'))
. I tried different return value types for the flow (str, dict). What am I missing here? How can I easily access the return value of a succesful flow run? Thank youKhuyen Tran
08/17/2022, 2:52 PMreturn_state=True
: https://docs.prefect.io/concepts/states/#return-prefect-stateHanno Küpers
08/17/2022, 3:12 PMfrom prefect.results._retrieve_result(state)
to access the result objects. It works for us but does not seem to be right.Khuyen Tran
08/17/2022, 3:39 PMreturn
at the end:
@task
def my_task():
return 2
@flow
def my_flow():
a = my_task()
return a
a = my_flow()
print(a) # 2
Hanno Küpers
08/17/2022, 5:49 PM