airflow.models.expandinput

Module Contents

Classes

MappedArgument

Stand-in stub for task-group-mapping arguments.

DictOfListsExpandInput

Storage type of a mapped operator's mapped kwargs.

ListOfDictsExpandInput

Storage type of a mapped operator's mapped kwargs.

Functions

is_mappable(v)

get_map_type_key(expand_input)

create_expand_input(kind, value)

Attributes

ExpandInput

OperatorExpandArgument

OperatorExpandKwargsArgument

EXPAND_INPUT_EMPTY

airflow.models.expandinput.ExpandInput[source]
airflow.models.expandinput.OperatorExpandArgument[source]
airflow.models.expandinput.OperatorExpandKwargsArgument[source]
class airflow.models.expandinput.MappedArgument[source]

Bases: airflow.utils.mixins.ResolveMixin

Stand-in stub for task-group-mapping arguments.

This is very similar to an XComArg, but resolved differently. Declared here (instead of in the task group module) to avoid import cycles.

abstract get_task_map_length(run_id, *, session)[source]
iter_references()[source]

Find underlying XCom references this contains.

This is used by the DAG parser to recursively find task dependencies.

resolve(context, *, session=NEW_SESSION)[source]

Resolve this value for runtime.

airflow.models.expandinput.is_mappable(v)[source]
exception airflow.models.expandinput.NotFullyPopulated(missing)[source]

Bases: RuntimeError

Raise when get_map_lengths cannot populate all mapping metadata.

This is generally due to not all upstream tasks have finished when the function is called.

__str__()[source]

Return str(self).

class airflow.models.expandinput.DictOfListsExpandInput[source]

Bases: NamedTuple

Storage type of a mapped operator’s mapped kwargs.

This is created from expand(**kwargs).

value: dict[str, OperatorExpandArgument][source]
get_parse_time_mapped_ti_count()[source]
get_total_map_length(run_id, *, session)[source]
iter_references()[source]
resolve(context, session)[source]
class airflow.models.expandinput.ListOfDictsExpandInput[source]

Bases: NamedTuple

Storage type of a mapped operator’s mapped kwargs.

This is created from expand_kwargs(xcom_arg).

value: OperatorExpandKwargsArgument[source]
get_parse_time_mapped_ti_count()[source]
get_total_map_length(run_id, *, session)[source]
iter_references()[source]
resolve(context, session)[source]
airflow.models.expandinput.EXPAND_INPUT_EMPTY[source]
airflow.models.expandinput.get_map_type_key(expand_input)[source]
airflow.models.expandinput.create_expand_input(kind, value)[source]

Was this entry helpful?