Hamed Sheykhlou
12/10/2020, 3:20 PMZanie
Hamed Sheykhlou
12/10/2020, 3:52 PMimport requests
from prefect import Flow, task
@task(name='extract_task')
def extract():
res = requests.get('<https://jsonplaceholder.typicode.com/todos/1>')
res_txt = res.text
return res_txt
@task()
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)
flow.run()
I want to pass the result of extract
(e) securely to load
. maybe https://docs.prefect.io/api/latest/engine/results.html#secretresult be helpful. but I don't know how to use it.Dylan
load
is reading from the Result location