Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4987e3c

Browse filesBrowse files
authored
composer: add region tags to simple dag example (GoogleCloudPlatform#1473)
1 parent 62b0ddd commit 4987e3c
Copy full SHA for 4987e3c

File tree

Expand file treeCollapse file tree

1 file changed

+10
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+10
-0
lines changed

‎composer/workflows/simple.py

Copy file name to clipboardExpand all lines: composer/workflows/simple.py
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,18 @@
1717
# [START composer_simple]
1818
from __future__ import print_function
1919

20+
# [START composer_simple_define_dag]
2021
import datetime
2122

2223
from airflow import models
24+
# [END composer_simple_define_dag]
25+
# [START composer_simple_operators]
2326
from airflow.operators import bash_operator
2427
from airflow.operators import python_operator
28+
# [END composer_simple_operators]
2529

2630

31+
# [START composer_simple_define_dag]
2732
default_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
@@ -38,6 +43,8 @@
3843
with 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]

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.