0

I build a dag using this code:

from airlow import DAG
from airlow.operators.bash import BashOperator

from datetime import datetime

default_args = {
    'start_date': datetime(2020, 1,1)
}

with DAG('parallel_dag', schedule_interval='@daily', default_args=default_args, catchup=False) as dag:

    task_1 = BashOperator(
        task_id = 'task_1',
        bash_command = 'sleep 3'
    )

    task_2 = BashOperator(
        task_id = 'task_2',
        bash_command = 'sleep 3'
    )

    task_3 = BashOperator(
        task_id = 'task_3',
        bash_command = 'sleep 3'
    )

    task_4 = BashOperator(
        task_id = 'task_4',
        bash_command = 'sleep 3'
    )

    task_1 >> [task_2, task_3] >> task_4

And it is also not seen using airflow dags list in terminal only standard airflow dags is shown but no my. And with location of my dag is all good it is located in dags folder

1 Answers1

0

You have a typo in your import statements. Airflow ignores files not containing “airflow” and “DAG”. Your DAG File was not parsed since you have misspelled the word airflow.

adhithiyan
  • 168
  • 1
  • 9