本文整理匯總了Python中airflow.operators.bash_operator.BashOperator.doc_md方法的典型用法代碼示例。如果您正苦於以下問題:Python BashOperator.doc_md方法的具體用法?Python BashOperator.doc_md怎麽用?Python BashOperator.doc_md使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類airflow.operators.bash_operator.BashOperator
的用法示例。
在下文中一共展示了BashOperator.doc_md方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: DAG
# 需要導入模塊: from airflow.operators.bash_operator import BashOperator [as 別名]
# 或者: from airflow.operators.bash_operator.BashOperator import doc_md [as 別名]
# 'trigger_rule': u'all_success'
}
dag = DAG(
'tutorial',
default_args=default_args,
description='A simple tutorial DAG',
schedule_interval=timedelta(days=1))
# t1, t2 and t3 are examples of tasks created by instantiating operators
t1 = BashOperator(
task_id='print_date',
bash_command='date',
dag=dag)
t1.doc_md = """\
#### Task Documentation
You can document your task using the attributes `doc_md` (markdown),
`doc` (plain text), `doc_rst`, `doc_json`, `doc_yaml` which gets
rendered in the UI's Task Instance Details page.
![img](http://montcs.bloomu.edu/~bobmon/Semesters/2012-01/491/import%20soul.png)
"""
dag.doc_md = __doc__
t2 = BashOperator(
task_id='sleep',
depends_on_past=False,
bash_command='sleep 5',
dag=dag)
示例2: BashOperator
# 需要導入模塊: from airflow.operators.bash_operator import BashOperator [as 別名]
# 或者: from airflow.operators.bash_operator.BashOperator import doc_md [as 別名]
My numbered list:
1. one
1. two
My bulleted list:
- first
- second
"""
the_task = BashOperator(
task_id='the_task',
bash_command='echo THE_TASK',
dag=dag)
the_task.doc_md = """\
# Title
Here's a [url](www.airbnb.com)
My list:
1. one
1. two
My bulleted list:
- first
- second
"""