File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 1717# [START composer_simple]
1818from __future__ import print_function
1919
20+ # [START composer_simple_define_dag]
2021import datetime
2122
2223from airflow import models
24+ # [END composer_simple_define_dag]
25+ # [START composer_simple_operators]
2326from airflow .operators import bash_operator
2427from airflow .operators import python_operator
28+ # [END composer_simple_operators]
2529
2630
31+ # [START composer_simple_define_dag]
2732default_dag_args = {
2833 # The start_date describes when a DAG is valid / can be run. Set this to a
2934 # fixed point in time rather than dynamically, since it is evaluated every
3843with models .DAG (
3944 'simple_greeting' ,
4045 default_args = default_dag_args ) as dag :
46+ # [END composer_simple_define_dag]
47+ # [START composer_simple_operators]
4148 def greeting ():
4249 print ('Hello World!' )
4350
@@ -51,8 +58,11 @@ def greeting():
5158 goodbye_bash = bash_operator .BashOperator (
5259 task_id = 'bye' ,
5360 bash_command = 'echo Goodbye.' )
61+ # [END composer_simple_operators]
5462
63+ # [START composer_simple_relationships]
5564 # Define the order in which the tasks complete by using the >> and <<
5665 # operators. In this example, hello_python executes before goodbye_bash.
5766 hello_python >> goodbye_bash
67+ # [END composer_simple_relationships]
5868# [END composer_simple]
You can’t perform that action at this time.
0 commit comments