developer developer
developer developer

Reputation: 140

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.

Upvotes: 4

Views: 2471

Answers (1)

Luis dQ
Luis dQ

Reputation: 90

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.

Upvotes: 2

Related Questions