Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to 'tag' an airflow DAG in the UI?

Tags:

airflow

In the airflow DAG UI, I'd like to add a tag for a subset of DAGs. Let's say there is a tag #weekend_runs that I'd like to add to some specific DAGs.

Is it possible to filter your view of DAGs in the UI based on tags in Airflow? Or do I need to do something hacky like add _weekend_run to the end of DAG names in order to use fuzzy search and filter out other scripts?

Thanks!

like image 555
Scott Skiles Avatar asked Dec 17 '22 21:12

Scott Skiles


1 Answers

Adding a tag to a DAG is now possible from Airflow 1.10.9

In order to filter DAGs (e.g by team), you can add tags in each dag. The filter is saved in a cookie and can be reset by the reset button.

For example:

Dag File:

dag = DAG('dag', tags=['example'])

UI: Dag Tag

Note: This feature is only available for the RBAC UI (enabled using rbac=True in [webserver] section in your airflow.cfg).

like image 137
kaxil Avatar answered Jun 15 '23 16:06

kaxil