【Airflow】Apache Airflow ~ doc_md ~

◾️はじめに

Airflow UI で インターフェイスをカスタマイズできるみたいで
それが、doc_mdってのを知ったのでメモ 

目次

【1】doc_md
 1)doc_md 以外のプロパティ
【2】サンプル

【1】doc_md

* タスク インスタンスの詳細ビューに
 Markdown形式で説明文などを表示できる
 => 以下のサイトに画面キャプチャーがあるのでイメージできると思う

https://github.com/apache/airflow/discussions/42014

1)doc_md 以外のプロパティ

以下の公式ドキュメントを確認したところ、
doc_md 以外にもあるみたいなのでメモ

https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/dags.html#dag-task-documentation

attribute rendered to
doc monospace
doc_json json
doc_yaml yaml
doc_md markdown
docd_rst reStructuredText

【2】サンプル

https://airflow.apache.org/docs/apache-airflow/1.10.9/tutorial.html#adding-dag-and-tasks-documentation

demo_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 = DAG(
    'etl-get_from_api',
    default_args=default_args,
    description='A simple dag',
    schedule_interval=timedelta(days=1),
    doc_md = demo_doc_md
)

参考文献

https://zenn.dev/toohsk/articles/060d4d14c0fcbea5d843
https://book.st-hakky.com/data-platform/airflow-doc-md

関連記事

Apache Airflow ~ 基礎知識編 ~
https://dk521123.hatenablog.com/entry/2021/09/28/135510
Apache Airflow ~ 環境構築編 ~
https://dk521123.hatenablog.com/entry/2021/07/18/004531
Apache Airflow ~ 環境構築 / Docker 編 ~
https://dk521123.hatenablog.com/entry/2021/10/11/134840
Apache Airflow ~ 入門編 ~
https://dk521123.hatenablog.com/entry/2021/07/24/233012
Apache Airflow ~ 基本編 ~
https://dk521123.hatenablog.com/entry/2021/07/28/234319
Apache Airflow ~ DAGの引数 ~
https://dk521123.hatenablog.com/entry/2022/01/13/101634