From 582e036003717cfb1f826f6f1b8752d28dcea3e3 Mon Sep 17 00:00:00 2001 From: ziv Date: Sun, 9 Jun 2024 20:06:53 +0300 Subject: [PATCH] Add DAG for loading streets data from data.gov --- airflow_server/dags/streets.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 airflow_server/dags/streets.py diff --git a/airflow_server/dags/streets.py b/airflow_server/dags/streets.py new file mode 100644 index 0000000..dd06283 --- /dev/null +++ b/airflow_server/dags/streets.py @@ -0,0 +1,20 @@ +from airflow import DAG +from airflow.utils.dates import days_ago + +from anyway_etl_airflow.operators.cli_bash_operator import CliBashOperator + + +dag_kwargs = dict( + default_args={ + 'owner': 'airflow', + }, + schedule_interval=None, + catchup=False, + start_date=days_ago(1), +) + + +with DAG('load-streets', **dag_kwargs) as load_streets: + CliBashOperator(cmd='anyway-etl anyway-kubectl-exec python3 main.py process streets', + task_id='load-streets' + )