https://prefect.io logo
x

Xavier Babu

12/02/2022, 3:49 PM
Dear Prefect Community, In Prefect Orion, what is the best way to get the "flow_run_id" (dynamically) in the main flow while running that flow? If you can share any sample code, that would be great,
1
a

Anna Geller

12/02/2022, 3:53 PM
Try:
Copy code
from prefect.context import get_run_context

id_ = get_run_context().flow_run.dict().get('id')
x

Xavier Babu

12/02/2022, 4:09 PM
Perfect. Thanks, Anna.
🙌 1
3 Views