Hey everyone, what is the best way of finding out what labels a flow run was run with while executing inside the flow?
a
Anna Geller
12/20/2021, 3:23 PM
you can leverage the FlowRunView:
Copy code
from prefect.backend import FlowRunView
# Create a new instance using an ID from the UI or from the output of the `prefect run` command
flow_run = FlowRunView.from_flow_run_id(
"4c0101af-c6bb-4b96-8661-63a5bbfb5596"
)
# You now have access to information about the flow run
flow_run.labels # {"foo"}
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.