Add Owner Links to DAG

New in version 2.4.0.

You can set the owner_links argument on your DAG object, which will make the owner a clickable link in the main DAGs view page instead of a search filter.

Two options are supported:

  • An HTTP link (e.g. https://www.example.com) which opens the webpage in your default internet client

  • A mailto link (e.g. mailto:example@airflow.com) which opens your default email client to send an email to the specified address

In your DAG, set the owner_links argument specifying a dictionary of an owner (key) and its link (value). Next define a task using this owner, and the owner in the DAGs view will link to the specified address.

  1. with DAG(
  2. dag_id="example_dag_owners",
  3. start_date=datetime(2022, 8, 5),
  4. schedule="0 0 * * *",
  5. owner_links={"airflow": "https://airflow.apache.org"},
  6. ):
  7. BashOperator(task_id="task_using_linked_owner", bash_command="echo 1", owner="airflow")

Screenshot:

../_images/howto-owner-links.gif