Skip to content

Commit

Permalink
Simple example calling 'output' on MappedOperator
Browse files Browse the repository at this point in the history
  • Loading branch information
uranusjr committed Sep 1, 2022
1 parent e44689c commit d34c83a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions docs/apache-airflow/concepts/dynamic-task-mapping.rst
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,14 @@ If you want to map over the result of a classic operator, you should explicitly

.. code-block:: python
task = MyOperator(task_id="source")
# Create a list of data inputs.
extract = ExtractOperator(task_id="extract")
downstream = MyOperator2.partial(task_id="consumer").expand(input=task.output)
# Expand the operator to transform each input.
transform = TransformOperator.partial(task_id="transform").expand(input=extract.output)
# Collect the transformed inputs, expand the operator to load each one of them to the target.
load = LoadOperator.partial(task_id="load").expand(input=transform.output)
Mixing TaskFlow and classic operators
Expand Down

0 comments on commit d34c83a

Please sign in to comment.