Scheduling and running visual flows with workflows
You can schedule the Visual ETL flows you authored to run based on a schedule using Workflows. The following is an example of how to do this:
-
Create a Visual ETL flow and name it "mwaa-test".
-
Save your draft flow (“mwaa-test.vetl”) to your project.
-
Navigate to Build → Workflows menu, click on the “Create workflow in editor”.
-
You will now see an example DAG template in JupyterLab.
-
Modify the lines of python code as below, then save it as “mwaa_test_dag.py”. We will execute the dataflow at 8AM everyday. By default, the dataflow’s notebook file is under the path “src/dataflows”.
WORKFLOW_SCHEDULE = '0 8 * * *' NOTEBOOK_PATH = 'src/dataflows/mwaa-test.vetl' dag_id = "workflow-mwaa-test" # optional, set to give your workflow a meaningful name
-
Pull the file “dataflows/mwaa-test.vetl” from the project’s source code repository to JupyterLab.
-
Navigate back to the Workflows console, now we can see the DAG is created. We can access Airflow UI via the “Actions” dropdown list.
-
Manually trigger the DAG.