airflow.example_dags.example_dynamic_task_mapping_with_no_taskflow_operators
Example DAG demonstrating the usage of dynamic task mapping with non-TaskFlow operators.
Attributes
Classes
A custom operator that adds one to the input. |
|
A custom operator that sums the input. |
Module Contents
- class airflow.example_dags.example_dynamic_task_mapping_with_no_taskflow_operators.AddOneOperator(value, **kwargs)[source]
Bases:
airflow.sdk.BaseOperatorA custom operator that adds one to the input.
- value[source]
- execute(context)[source]
Derive when creating an operator.
The main method to execute the task. Context is the same dictionary used as when rendering jinja templates.
Refer to get_template_context for more context.
- class airflow.example_dags.example_dynamic_task_mapping_with_no_taskflow_operators.SumItOperator(values, **kwargs)[source]
Bases:
airflow.sdk.BaseOperatorA custom operator that sums the input.
- template_fields = ('values',)[source]
- values[source]
- execute(context)[source]
Derive when creating an operator.
The main method to execute the task. Context is the same dictionary used as when rendering jinja templates.
Refer to get_template_context for more context.
- airflow.example_dags.example_dynamic_task_mapping_with_no_taskflow_operators.add_one_task[source]