Hamed Sheykhlou

12/10/2020, 3:20 PM
Hi guys. is there any way to securely pass the result of a task to the next task?


12/10/2020, 3:48 PM
Hi! Could you explain in a bit more detail what you mean by securely / what your use-case is?

Hamed Sheykhlou

12/10/2020, 3:52 PM
consider this as an example code
Copy code
import requests
from prefect import Flow, task

def extract():
    res = requests.get('<>')
    res_txt = res.text
    return res_txt

def load(a):
    """Print the data to indicate it was received"""
    print("Here's your data1: {}".format(a))

with Flow("Callback-Example") as flow:
    e = extract()
    l = load(e)
I want to pass the result of
(e) securely to
. maybe be helpful. but I don't know how to use it.


12/10/2020, 4:28 PM
Hi @Hamed Sheykhlou, Where are you planning to run your Prefect Flows? Generally, we use Results to make sure that your data never leaves your infrastructure. Securing the GCS/S3 buckets where the results live is usually a matter of putting proper permissions on the execution infrastructure and the buckets.
In your example, if you were to use a Result, Prefect would do the work to ensure that
is reading from the Result location
Does that answer your question?