Hi ,
how can i get unique id for every task that is run in parallel ?
if i have task A
and i run it with :
runs = A.map(listOfInputs, unmapped(input2))
when i print this in A:
Copy code
task_id = prefect.context.get("task_id", "")
i have the same task_id for every task A run …..
a
Anna Geller
06/02/2022, 10:30 AM
Try:
Copy code
prefect.context.get("task_run_id", "")
y
yair friedman
06/02/2022, 11:01 AM
thanks, that is working, get the unique id, the question is why task_id is generated as A_1 for all mapped runs.
i wish that each task_id for the same task runs would have a running id, meaning A_1, A-2 , etc.
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.