Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Testing entire airflow DAG not a single task

Folks, i spent 3-4 days googling to find some information to write python test cases to test an entire dag ( not tasks ). Ii found nothing. I wonder if it is even possible to do it, if so what are available options ? Doesn't look like air flow provides anything easy to use.

like image 792
developer developer Avatar asked Oct 15 '25 02:10

developer developer


1 Answers

Use this command:

airflow dags test dag_id_here 2021-11-10T14:20:00Z

The date needs to be in the past.

NOTE: This specific timestamp 2021-11-10T14:20:00Z represents November 10, 2021, at 14:20:00 UTC.

In the context of airflow dags test command, specifying a date in the past, such as 2021-11-10T14:20:00Z, allows you to test the execution of the DAG as if it were executed at that particular point in time. This is useful for historical testing, backfilling tasks, or validating the behavior of the DAG under past conditions.

like image 193
Luis dQ Avatar answered Oct 17 '25 22:10

Luis dQ



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!