close

How to remove default example dags in airflow

Hello Guys, How are you all? Hope You all Are Fine. Today We Are Going To learn about How to remove default example dags in airflow in Python. So Here I am Explain to you all the possible Methods here.

Without wasting your time, Let’s start This Article.

Table of Contents

How to remove default example dags in airflow?

  1. How to remove default example dags in airflow?

    For Airflow 2.0, in docker-compose.yaml you can set AIRFLOW__CORE__LOAD_EXAMPLES: 'false' to not load them instead of editing the .cfg file.

  2. remove default example dags in airflow

    For Airflow 2.0, in docker-compose.yaml you can set AIRFLOW__CORE__LOAD_EXAMPLES: 'false' to not load them instead of editing the .cfg file.

Method 1

When you startup airflow, make sure you set:

load_examples = False

inside your airflow.cfg

If you have already started airflow with this not set to false, you can set it to false and run airflow resetdb in the cli (!which will destroy all current dag information!).

Alternatively you can go into the airflow_db and manually delete those entries from the dag table.

Method 2

For Airflow 2.0, in docker-compose.yaml you can set AIRFLOW__CORE__LOAD_EXAMPLES: 'false' to not load them instead of editing the .cfg file.

Summery

It’s all About this issue. Hope all Methods helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which Method worked for you? Thank You.

Also, Read