airflow.providers.standard.triggers.external_task
¶
Module Contents¶
Classes¶
A trigger to monitor tasks, task group and dag execution in Apache Airflow. |
|
Waits asynchronously for a DAG to complete for a specific logical date. |
- class airflow.providers.standard.triggers.external_task.WorkflowTrigger(external_dag_id, logical_dates=None, execution_dates=None, external_task_ids=None, external_task_group_id=None, failed_states=None, skipped_states=None, allowed_states=None, poke_interval=2.0, soft_fail=False, **kwargs)[source]¶
Bases:
airflow.triggers.base.BaseTrigger
A trigger to monitor tasks, task group and dag execution in Apache Airflow.
- Parameters
external_dag_id (str) – The ID of the external DAG.
logical_dates (list[datetime.datetime] | None) – A list of logical dates for the external DAG.
external_task_ids (Collection[str] | None) – A collection of external task IDs to wait for.
external_task_group_id (str | None) – The ID of the external task group to wait for.
failed_states (Iterable[str] | None) – States considered as failed for external tasks.
skipped_states (Iterable[str] | None) – States considered as skipped for external tasks.
allowed_states (Iterable[str] | None) – States considered as successful for external tasks.
poke_interval (float) – The interval (in seconds) for poking the external tasks.
soft_fail (bool) – If True, the trigger will not fail the entire DAG on external task failure.
- class airflow.providers.standard.triggers.external_task.DagStateTrigger(dag_id, states, logical_dates=None, execution_dates=None, poll_interval=5.0)[source]¶
Bases:
airflow.triggers.base.BaseTrigger
Waits asynchronously for a DAG to complete for a specific logical date.
- Parameters
dag_id (str) – The dag_id that contains the task you want to wait for
states (list[airflow.utils.state.DagRunState]) – allowed states, default is
['success']
logical_dates (list[datetime.datetime] | None) – The logical date at which DAG run.
poll_interval (float) – The time interval in seconds to check the state. The default value is 5.0 sec.