FuETL
12/10/2021, 1:57 PMcontext
value inside the flow run (So i can retrieve later via graphql query), the issue is (not all my flow will have this custom context value), for what i understand the context values is passed in run()
call, is not possible to add/modify and retrieve this values later? If so, there a alternative i can use to get custom values from a flow?Anna Geller
Anna Geller
FuETL
12/10/2021, 2:26 PMfrom prefect import Flow, Parameter, task
from prefect.executors import LocalDaskExecutor
@task()
def step_one(result_value):
return result_value
@task()
def do_nothing(something):
pass
with Flow(name="sample_flow") as flow:
result_value = Parameter(name="result_value", required=True)
value_that_want_retrieve = Parameter(name="value_that_want_retrieve", default="my value that i want to get later")
step_one(result_value)
do_nothing(value_that_want_retrieve)
if __name__ == "__main__":
flow.executor = LocalDaskExecutor()
flow.run(parameters={"result_value": "RESULT"})
FuETL
12/10/2021, 2:26 PMFuETL
12/10/2021, 2:26 PMFuETL
12/10/2021, 2:29 PMAnna Geller
Anna Geller
FuETL
12/10/2021, 2:35 PM