https://prefect.io logo
Title
m

Michael Levenson

09/04/2022, 5:25 PM
Hi all, for v1.0 I forgot how to set a result location dynamically - ie importing the flow and then setting the result template
1
a

Anna Geller

09/04/2022, 8:40 PM
I'm AFK so can't share a link but I'm sure there's a docs page in v1 called "Templating results" or so - LMK if you couldn't find it
m

Michael Levenson

09/05/2022, 9:37 AM
ah I meant like
# my_flow.py

with Flow("my_new_flow") as my_new_flow:
    ...

----
# infra_util.py

from prefect.engine.result import S3Result
from my_flow import my_new_flow

my_new_flow.result = S3Result(bucket="foo", location="bar")
my_new_flow.register(...)