-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathcollege_workflow2.py
33 lines (25 loc) · 1 KB
/
college_workflow2.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import datetime
from airflow import models
from airflow.operators.bash_operator import BashOperator
from airflow.operators.dummy_operator import DummyOperator
default_dag_args = {
# https://airflow.apache.org/faq.html#what-s-the-deal-with-start-date
'start_date': datetime.datetime(2020, 4, 27)
}
with models.DAG(
'college_workflow2',
schedule_interval=None,
default_args=default_dag_args) as dag:
branch = DummyOperator(
task_id='branch',
trigger_rule='all_success')
student = BashOperator(
task_id='student',
bash_command='python /home/jupyter/airflow/dags/Student_beam_dataflow2.py')
takes = BashOperator(
task_id='takes',
bash_command='python /home/jupyter/airflow/dags/Takes_beam_dataflow.py')
teacher = BashOperator(
task_id='teacher',
bash_command='python /home/jupyter/airflow/dags/Teacher_beam_dataflow.py')
[student, takes, teacher]