boundless-lifeguard-61788
08/20/2024, 12:43 AMancient-wolf-19325
08/20/2024, 12:43 AMflytekit.current_context().execution_id
. However, it is not possible to fetch the execution ID directly from within a workflow.
According to this discussion, you can access the execution ID inside a task using the following code snippet:
import flytekit
@task
def my_task():
ctx = flytekit.current_context()
execution_id = ctx.execution_id.name
print(execution_id)
Would you like more details on this?
Sources:
- Flyte Discussion on Execution ID
- Flytekit ExecutionParameters Documentation 👍 1 button 👎 0 button 💡 Hint: Mention @ancient-wolf-19325 in the thread for followups.