prev_execution_date in Airflow

Viewed 899

In Airflow macros we can find prev_execution_date, that, according to the docs, it returns

the previous execution date (if available)

What happens in the first execution? Does it return an empty string? Does it return a None? Is this documented somewhere?

Thanks in advance!

1 Answers

If it is the first execution, prev_execution_date will return the (execution_date - scheduler_interval) of the DAG for a Scheduled Dag.

If the Dag is manually triggered, it returns the execution_date.

Related