https://prefect.io logo
Title
n

Nathan R

10/05/2022, 6:42 PM
Hi All, Whats the best way to get information such as flow id and task id programmatically during execution?
1
b

Bianca Hoch

10/05/2022, 6:59 PM
Hi Nathan, is this for Prefect 1 or 2?
n

Nathan R

10/05/2022, 7:08 PM
@Bianca Hoch Prefect 2
b

Bianca Hoch

10/05/2022, 7:11 PM
You can accomplish this by getting the task and flow run context. Here's an article that will help get you started.
n

Nathan R

10/05/2022, 7:14 PM
Thank you!!
🚀 1
1
@Bianca Hoch Is there a way to see the final context of a flow? Can I call prefect.context.something and pass in the flow id to get info after its completed?