0

I try to create simple DAG:

from airflow.models import BaseOperator, Param
from airflow.models.dag import dag
from airflow.utils.dates import days_ago

default_args = {
    'owner': 'airflow',
    'start_date': days_ago(1),
}


@dag(dag_id='my_dag', default_args=default_args, schedule_interval=None)
def my_dag(param: str = Param(default='option1', choices=['option1', 'option2', 'option3'])):

    print_value_task = BaseOperator(
        task_id='print_value',
        python_callable=lambda: print(f'The value of param3 is: {param}')
    )

    print_value_task

If I make some errors in code Web UI shows errors. If there are no errors in code, DAG doesn't appear in Web UI and I can't trigger my DAG manually.

What do I do wrong?

I use Docker image for Airflow and put my dags in folder that Docker use for volume between host and container.

1 Answers1

0

You should be sure that the scheduler process is running, if not, enter your container and do airflow scheduler &.