https://prefect.io logo
a

Anders Segerberg

04/11/2022, 4:27 PM
For idempotency keys: I want to use the Prefect templating, in conjunction with a runtime variable. Will
create_flow_run(..., idempotency_key="{date}-"+MY_VAR)
function as expected? It's hard to tell, because I don't know yet how Prefect compiles the string templating as part of tasks. Would I need to generate this string as a task result, and then pass the result to the kwarg?
k

Kevin Kho

04/11/2022, 4:27 PM
Yes this needs to be a task result. Otherwise it will be evaluated during Flow build time
a

Anders Segerberg

04/11/2022, 4:28 PM
Thanks
7 Views