My flow looks like this:
for path in pathlist:
s1 = step1(path)
s2 = step2(s1)
s3 = step3(s2)
I have a decorator that saves the output of each step into a template “{taskname}/{filename}”.
In prefect1 I can set a context variable which can be used to fill the template. However prefect2 has made context immutable. I could pass filename to each step; or have a subflow and pass it as flow context; however these seem a bit unclean. Is there a way to set context in prefect2 during the flow?