https://prefect.io logo
n

Nejc Vesel

09/22/2020, 9:00 AM
Hi everybody. I want the results of my tasks to be saved based on either the
flow_run_id
or
flow_run_name
(i.e.
target='{flow_run_id}/foo'
). What I have trouble with is designing a method that works both when using Prefect Server and when using Prefect through the basic Python. For example, I am able to set the
flow_run_id
when running through the Python API with
flow.run(flow_run_id=<my flow run id>)
, however setting
flow_run_id
seems to be impossible when running through the Prefect server. Inversly, one can set
flow_run_name
when running through the Prefect Server but the concept of a
flow_run_name
doesn't seem to exist in the Python API. What would be the best way to resolve this issue? Thank you very much, Nejc
j

Jim Crist-Harif

09/22/2020, 1:51 PM
Hi, I see you opened a PR fixing this, thanks! https://github.com/PrefectHQ/prefect/pull/3364