datamongus
07/13/2024, 12:20 PMMarvin
07/13/2024, 12:20 PMprefect-aws
. This allows result storage specific to your configuration.
Source
While Prefect does not explicitly state if a single bucket is inherently unsafe, organizing separate buckets or folders might be a good practice for clarity, access control, and to avoid data clashing.
For personalized advice based on your specific use case, you can explore the Prefect forums or repositories.
Refer to the official docs for more detailed guidance:
- Results Concept: https://docs.prefect.io/latest/concepts/results/
- Moving Data: https://docs.prefect.io/latest/guides/moving-data/Nate
07/13/2024, 2:38 PMresult_storage_key
to namespace the bucket with some paths so that different types of writers dont step on each others toes
like this example from the docs
from prefect import flow, task
@flow()
def my_flow():
hello_world()
hello_world(name="foo")
hello_world(name="bar")
@task(persist_result=True, result_storage_key="hello-{parameters[name]}.json")
def hello_world(name: str = "world"):
return f"hello {name}"
my_flow()
except you could add a prefix to help with namespacing
@task(persist_result=True, result_storage_key="{PREFIX}/hello-{parameters[name]}.json"