Add tags to DAGs and use it for filtering in the UI

New in version 1.10.8.

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:

In your DAG file, pass a list of tags you want to add to the DAG object:

dag = DAG(dag_id="example_dag_tag", schedule="0 0 * * *", tags=["example"])

Screenshot:

../_images/add-dag-tags.png

Tags are registered as part of DAG parsing. In case of stale tags, you can purge old data with the Airflow CLI command airflow db clean. See db clean usage for more details.

Was this entry helpful?