airflow.providers.standard.operators.hitl¶
Classes¶
Base class for all Human-in-the-loop Operators to inherit from. |
|
Human-in-the-loop Operator that has only 'Approval' and 'Reject' options. |
|
BranchOperator based on Human-in-the-loop Response. |
|
Human-in-the-loop Operator that is used to accept user input through TriggerForm. |
Module Contents¶
- class airflow.providers.standard.operators.hitl.HITLOperator(*, subject, options, body=None, defaults=None, multiple=False, params=None, **kwargs)[source]¶
Bases:
airflow.models.baseoperator.BaseOperator
Base class for all Human-in-the-loop Operators to inherit from.
- Parameters:
subject (str) – Headline/subject presented to the user for the interaction task.
options (list[str]) – List of options that the an user can select from to complete the task.
body (str | None) – Descriptive text (with Markdown support) that gives the details that are needed to decide.
defaults (str | list[str] | None) – The default options and the options that are taken if timeout is passed.
multiple (bool) – Whether the user can select one or multiple options.
params (airflow.sdk.definitions.param.ParamsDict | dict[str, Any] | None) – dictionary of parameter definitions that are in the format of Dag params such that a Form Field can be rendered. Entered data is validated (schema, required fields) like for a Dag run and added to XCom of the task result.
- template_fields: collections.abc.Collection[str] = ('subject', 'body')[source]¶
- validate_defaults()[source]¶
Validate whether the given defaults pass the following criteria.
Default options should be the subset of options.
When multiple is False, there should only be one option.
- class airflow.providers.standard.operators.hitl.ApprovalOperator(ignore_downstream_trigger_rules=False, **kwargs)[source]¶
Bases:
HITLOperator
,airflow.providers.standard.utils.skipmixin.SkipMixin
Human-in-the-loop Operator that has only ‘Approval’ and ‘Reject’ options.
- class airflow.providers.standard.operators.hitl.HITLBranchOperator(**kwargs)[source]¶
Bases:
HITLOperator
BranchOperator based on Human-in-the-loop Response.
- class airflow.providers.standard.operators.hitl.HITLEntryOperator(**kwargs)[source]¶
Bases:
HITLOperator
Human-in-the-loop Operator that is used to accept user input through TriggerForm.