I’m trying to debug airflow simple code (from pycharm
).
I set executor = DebugExecutor
in airflow.cfg
I wrote simple code:
from airflow import DAG
from airflow.operators.python import PythonOperator
from airflow.utils.dates import days_ago
with DAG(dag_id='example_pycharm', schedule_interval=None,start_date=days_ago(3)) as dag:
def task1_func(ti):
print('task1: print from task 1')
def task2_func(ti):
print('task2: print from task 2')
task1 = PythonOperator(task_id='task1', python_callable=task1_func, provide_context=True)
task2 = PythonOperator(task_id='task2', python_callable=task2_func, provide_context=True)
task1 >> task2
if __name__ == "__main__":
dag.run(start_date=days_ago(3))
But I’m getting message:
INFO - No run dates were found for the given dates and dag interval.
How can I run this simple DAG
from pycharm (in debug mode) ?