You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/03/12 15:39:49 UTC

[GitHub] [airflow] Dr-Denzy edited a comment on issue #13761: Markdown from doc_md is not being rendered in ui

Dr-Denzy edited a comment on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-797568934


   ```python
   """
   ## My Awesome DAG Name
   
   #### Purpose
   
   This DAG does awesome stuff!
   
   #### Outputs
   
   This cool data `pipeline` has the following outputs:
   
   - `output_1`
   - `output_2`
   
   #### Owner/Maintainer
   
   You can reach the maintainer on this email:
   [maintainer@my-startup-example.io](mailto:maintainer@my-startup-example.io).
   """
   
   from airflow import DAG
   from airflow.operators.bash import BashOperator
   from airflow.utils.dates import days_ago
   
   default_args = {
       'owner': 'airflow',
       'start_date': days_ago(2)
   }
   
   with DAG('doc_md_oss_2', default_args=default_args, description='OSS suggested DAG Doc Md',
            schedule_interval='@once', catchup=False) as dag:
       dag.doc_md = __doc__
   
       t1 = BashOperator(
           task_id='print_date',
           bash_command='date',
       )
       t1.doc_md = """/
       ### Task 1 message.
       """
   
       t2 = BashOperator(
           task_id='sleep',
           depends_on_past=False,
           bash_command='sleep 5',
           retries=3,
       )
   
       t3 = BashOperator(
           task_id='greeting',
           bash_command='echo Hello World!',
       )
   
       t1 >> t2 >> t3
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org