Jon11/01/2022, 6:43 PM
with prefect.Flow( name="SOME_DYNAMIC_NAME" # instead of hardcoding this, i want to pass a value when registering / calling it
Bianca Hoch11/01/2022, 8:01 PM
which is applied when the run is executed.
Jon11/01/2022, 8:10 PM
Nate11/01/2022, 8:38 PM
Jon11/01/2022, 8:49 PM
Ismail Cenik01/27/2023, 8:44 PM
Nate01/27/2023, 9:22 PM
Ismail Cenik01/27/2023, 10:23 PM
Nate01/27/2023, 10:40 PM
• name a flow that is already defined
@flow(name="My Flow") def my_flow(): pass
is there a different way in which you're trying to name a flow?
# using above example my_new_named_flow = my_flow.with_options(name="My New Named Flow") # `my_new_named_flow` can now be called just like any other flow
Ismail Cenik01/27/2023, 10:46 PM
in prefect v2, how can I set it before running the flow? This is a parametric info for us and changing env (DEV, QA, CM, PROD), so how can I set it?
with Flow(flow_name, storage=storageObj, result=s3_backup, run_config=KubernetesRun(job_template_path=JOB_TEMPLATE_FILE), executor=LocalDaskExecutor(scheduler="threads", num_workers=1)) as flow: