After spinning a Jupyter instance and  spinning up a Dask cluster in Saturn you can use prefect to create DAGs to automate your Data Science and Machine Learning workflows.

Here is a sample notebook to get you started:

from prefect import Flow, task
from prefect.engine.executors import DaskExecutor
from dask.distributed import Client, LocalCluster

# start Saturn Dask cluster
client = Client(SATURN_DASK_CLUSTER_URL)
client.restart()

@task
def extract():
    print('extract...')
    return [1, 2, 3]

@task
def transform(x):
    print('transform...')
    return [i * 10 for i in x]

@task
def load(y):
    print('load...')
    print("Received y: {}".format(y))

with Flow("ETL") as flow:
    e = extract()
    t = transform(e)
    l = load(t)

# point Prefect's DaskExecutor to Saturn Dask cluster
executor = DaskExecutor(address=client.scheduler.address)
flow.run(executor=executor)

Reference links
https://prefect.io/
https://github.com/PrefectHQ/prefect

Did this answer your question?