Alejandro Sanchez Losa
12/22/2021, 8:51 PMAlejandro Sanchez Losa
12/22/2021, 8:56 PMAnna Geller
Anna Geller
Anna Geller
Alejandro Sanchez Losa
12/22/2021, 9:20 PMAlejandro Sanchez Losa
12/22/2021, 9:21 PMAlejandro Sanchez Losa
12/22/2021, 9:23 PMAnna Geller
Alejandro Sanchez Losa
12/22/2021, 9:37 PMAlejandro Sanchez Losa
12/22/2021, 9:37 PMAlejandro Sanchez Losa
12/22/2021, 9:38 PMAlejandro Sanchez Losa
12/22/2021, 9:40 PMAnna Geller
from prefect import task, Flow
from yourcustommodule import extract_logic, transform_logic, load_logic
@task
def get_list_of_files_from_sftp():
extract_logic()
@task
def transform_and_load(file):
transform_logic(file)
load_logic(file)
with Flow("etl") as flow:
list_of_files = get_list_of_files_from_sftp()
transform_and_load.map(list_of_files)
Does it help? LMK if you have any specific question I can help withAlejandro Sanchez Losa
12/22/2021, 9:49 PMAlejandro Sanchez Losa
12/22/2021, 9:51 PMAnna Geller
from prefect.executors import LocalDaskExecutor
with Flow("etl", executor=LocalDaskExecutor()) as flow:
list_of_files = get_list_of_files_from_sftp()
transform_and_load.map(list_of_files)
Anna Geller
Alejandro Sanchez Losa
12/22/2021, 9:53 PMAnna Geller
Alejandro Sanchez Losa
12/22/2021, 9:56 PMAlejandro Sanchez Losa
12/22/2021, 10:02 PMAlejandro Sanchez Losa
12/22/2021, 10:02 PMAlejandro Sanchez Losa
12/22/2021, 10:04 PMAlejandro Sanchez Losa
12/22/2021, 10:09 PMAlejandro Sanchez Losa
12/22/2021, 10:09 PMAlejandro Sanchez Losa
12/22/2021, 10:50 PMAlejandro Sanchez Losa
12/22/2021, 10:51 PMAlejandro Sanchez Losa
12/22/2021, 10:51 PMAlejandro Sanchez Losa
12/22/2021, 10:52 PMKevin Kho