Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

airflow UI not showing all DAG

Tags:

airflow

I'm trying to use apache airflow. I managed to install everything.

I added a new DAG into dag folder and when I run airflow list_dags it shows me the dag examples along with my new dag.

However, when I go to UI I can't see the DAG listed in DAG tab.

I already killed webserver and restarted everything. It didn't work

fyi, I'm running apache on a VM with centos7.

thanks.

like image 826
Marco Fumagalli Avatar asked Oct 15 '25 04:10

Marco Fumagalli


1 Answers

Zack in the comment section is right. If you change the owner in the dag's argument from the default 'airflow' to something else i.e

default_args = {
    'owner': 'whateveryournameis', <----
    'depends_on_past': False,
    'start_date': datetime(2015, 6, 1),
    'email': ['[email protected]'],
    'email_on_failure': False,
    'email_on_retry': False,
    'retries': 1,
    'retry_delay': timedelta(minutes=5),
    # 'queue': 'bash_queue',
    # 'pool': 'backfill',
    # 'priority_weight': 10,
    # 'end_date': datetime(2016, 1, 1),
}

dag = DAG('tutorial', default_args=default_args, schedule_interval=timedelta(days=1))

in order to have your new dag shown in UI dags list, you should create a new user in airflow. Creating a user is simple. Go to UI, under Admin, go to Users and create a new one.

like image 109
Marco Fumagalli Avatar answered Oct 18 '25 08:10

Marco Fumagalli



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!