Mike Wochner
07/07/2021, 3:36 PMwith Flow('Example') as flow:
today_date = datetime.date.today().strftime("%Y-%m-%d")
data = extract_data(security_list, today_date)
load_data(data)
...
more_data = extract_more_data(security_list)
load_more_data(more_data, today_date)
Kevin Kho
@task(checkpointing=False)
. If you are concerned about memory, some users provide the file path for the output files so it overwrites each time the flow is run, and you’ll be able to restart the last flow in case it failsMike Wochner
07/07/2021, 3:42 PMMike Wochner
07/07/2021, 3:43 PMKevin Kho
prefect.context.get("today")
, or you can have a task that returns the current date. The task execution will be deferred, but the content of the Flow is not, which is why we run into this.Mike Wochner
07/07/2021, 3:48 PMKevin Kho
LocalStorage("location of file", stored_as_script=True)
Mike Wochner
07/07/2021, 3:53 PM