airflow.example_dags.example_dynamic_task_mapping_with_no_taskflow_operators

Example DAG demonstrating the usage of dynamic task mapping with non-TaskFlow operators.

Module Contents

Classes

AddOneOperator

A custom operator that adds one to the input.

SumItOperator

A custom operator that sums the input.

Attributes

add_one_task

class airflow.example_dags.example_dynamic_task_mapping_with_no_taskflow_operators.AddOneOperator(value, **kwargs)[source]

Bases: airflow.models.baseoperator.BaseOperator

A custom operator that adds one to the input.

execute(context)[source]

This is the main method to derive when creating an operator.

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.models.baseoperator.BaseOperator

A custom operator that sums the input.

template_fields = ('values',)[source]
execute(context)[source]

This is the main method to derive when creating an operator.

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]

Was this entry helpful?