Airflow DAG Not Showing in UI
Causes and Fixes (Apache Airflow)
An Apache Airflow DAG that isn't showing in the UI hasn't been parsed and stored by the Dag processor: its file is outside the DAGs folder or skipped, it raises a DAG import error, or it defines no DAG at the top level. Run `airflow dags list-import-errors` first, then check the file path and the strings airflow and DAG, and allow up to 5 minutes for a new file. A DAG not found error has the same causes.
Why is my Airflow DAG not showing in the UI?
In Apache Airflow, the UI shows a DAG only after the Dag processor has parsed its file and stored the result. The FAQ gives the first test: "Does your script "compile", can the Airflow engine parse it and find your Dag object?" The DAG is missing when the file is not found, is skipped, fails to import, defines no DAG at the top level, or has not been picked up yet. Run airflow dags list-import-errors first, because an import error accounts for most missing DAGs.
The Airflow FAQ and Dags documentation describe each of these gates, and the checks run in the order a file meets them.
Know Airflow DAG not showing in UI the way the interviewer who asks it knows it.
The path a DAG file takes to the UI
The documentation describes Dag file processing as "reading the python files that define your Dags and storing them such that the scheduler can schedule them." In Airflow 3 a standalone process does this work, started with airflow dag-processor, because it runs user code. If that process is not running, no file is parsed and the list stays as it was.


2 clocks decide how soon a file shows. The processor looks for new files in a bundle every refresh_interval, 300 seconds by default, and re-parses known files every min_file_process_interval, 30 seconds by default. A brand new file can take 300 + 30 = 330 seconds to appear, so wait 5 minutes before you conclude anything. Before Airflow 3 the folder scan option was scheduler.dag_dir_list_interval, which the configuration reference lists as deprecated in 3.0 and moved to dag_processor.refresh_interval.
How to find why a DAG is missing, in order
- 01
Check the import errors
Run airflow dags list-import-errors and read the traceback for your file.
- 02
Check the Dag processor is running
Confirm an airflow dag-processor process is up and that its logs show your file being parsed.
- 03
Check the folder the processor reads
Compare your file's path with dags_folder, or with the bundle configuration, on the component that parses.
- 04
Check for the strings airflow and DAG
The file must contain both, in any case, unless dag_discovery_safe_mode is off.
- 05
Check the DAG object is at the top level
A DAG created inside a function isn't loaded.
- 06
Check .airflowignore
A pattern in the file's directory or a parent can exclude the file or a whole folder.
- 07
Wait out the refresh interval
Allow for the folder scan and the re-parse, then run airflow dags list.
DAG import error: reading it and fixing it
A file that raises while it's imported never registers its DAGs. The UI reports the failure, and airflow dags list-import-errors prints the same list from the command line. The traceback shown is trimmed to 2 entries by default, so the bottom of the stack is the line that matters. Set core.dagbag_import_error_traceback_depth higher when your own helper modules hide the real cause.
Most import errors are ordinary Python errors, usually a missing package in the environment of the Dag processor, or a syntax error or typo in an import. The environment is the usual surprise. The processor imports your file with its own Python environment, so a package installed on the workers only is invisible to it. To reproduce the error, run the file with the same interpreter and environment the processor uses.
Slow imports look like missing DAGs too. core.dagbag_import_timeout limits a file import to 30 seconds, and dag_processor.dag_file_processor_timeout limits a whole parse to 50 seconds. The FAQ warns that when parsing takes longer than the import timeout, files may not be processed completely. Keep network calls, database queries and heavy imports out of top-level code.
When Airflow skips the file: strings, top level and .airflowignore
With the default core.dag_discovery_safe_mode of True, Airflow reads only files that contain the strings airflow and dag, ignoring case. The FAQ says it "ignores files not containing airflow and DAG in order to prevent the DagBag parsing" of unrelated scripts. A file that builds its DAGs through a wrapper from another module may contain neither string. Add a comment with both, or set the option to False. The processor reads it, so set it on the dag-processor and on anything that runs airflow dags reserialize.
Airflow takes only DAG objects at the top level of a module. The Dags documentation shows a DAG created inside a function as not loaded. If a factory function builds your DAGs, assign each result to a module level name, or call the factory at module level so the objects exist where the loader looks.
A .airflowignore file lists patterns the loader skips, and its scope is its directory plus all subfolders. When a directory name matches a pattern, that directory and everything under it is not scanned. A DAG that lives in a folder you added to the ignore list long ago is a quiet cause.
The settings behind DAG discovery, with their defaults
DAG not found: when the id is not registered
A DAG not found message means the id you asked for is not in Airflow's metadata. The causes are the ones above, so start with airflow dags list, which lists all the DAGs, and airflow dags list-import-errors. If the id appears in neither, the file hasn't been parsed. Check the id for a typo too, since the id is the dag_id argument, not the file name.
A second cause is asking the wrong place. A command run in your shell uses your shell's configuration, which can name a different DAGs folder or database than the deployment you look at in the browser. Compare dags_folder and the metadata connection on both, and keep the processor's configuration the reference.
A DAG that was there and is gone was deactivated. The documentation says deactivation happens by removing files from the DAGs folder and cannot be done from the UI or API; the DAG's metadata and history are kept. The processor deactivates DAGs missing from a file 50 seconds after the file is re-parsed by default, so a file that now fails or no longer defines the DAG removes it. A paused DAG stays listed, and you can trigger it by hand.
How this comes up in a data engineering interview
Interviewers ask this as an operations question: a deploy went out and the DAG is not in the UI, so what do you check. A strong answer walks the path in order: the processor is running, the file is in the folder it reads, the import succeeds in its environment, and the 300 second refresh has passed. Then it says how you would stop it recurring, such as running an import check for DAG files in CI. The Airflow interview questions cover the scheduler side of this ground, and the data pipeline interview questions and data pipeline practice problems cover designing pipelines you can operate. The system design round guide shows where it fits in a loop.
When the DAG shows but its tasks do not run, the problem has moved on to the scheduler: the task stuck in queued guide covers that. The Airflow DAG guide explains what a DAG is and how runs relate to it.
Airflow DAG not showing in UI FAQ
Why is my DAG not showing in the Airflow UI?+
How do I see a DAG import error?+
What does DAG not found mean in Airflow?+
How long does a new DAG file take to appear?+
Does Airflow parse every Python file in the DAGs folder?+
Why did my DAG disappear from the UI?+
The candidate who gets the offer
- 01
Reading a solution is not the same as writing one
Every engineer who has frozen on a query they had read a dozen times knows the gap. The only preparation that closes it is producing the answer yourself, under time, before the interview does it for you
- 02
76% of hiring managers reject on the coding task, not the resume
From HackerRank's 2024 Developer Skills Report. Candidates who look strong on paper still fail the live screen if they haven't done timed, executable practice
- 03
System design comes down to the calls you defend out loud
Ingestion, batch vs streaming, the bronze/silver/gold layers, idempotency, backfill and replay. Sketching the pipeline and naming the failure modes is the signal, not the boxes
Related guides
Airflow interview questions
Scheduler, executor and DAG questions asked in interviews
Data pipeline interview questions
Pipeline design and operations questions
Data pipeline practice problems
Pipeline design problems to practice
Airflow task stuck in queued
When the DAG shows but its tasks do not run
Airflow DAG
What a DAG is and how its runs work
This week's community challenge
Dirty, production-shaped data, scored blind each week.