kaxil commented on a change in pull request #6564: [AIRFLOW-5911] Simplify 
lineage API and improve robustness
URL: https://github.com/apache/airflow/pull/6564#discussion_r350388451
 
 

 ##########
 File path: docs/lineage.rst
 ##########
 @@ -50,40 +51,43 @@ works.
 
     f_final = File("/tmp/final")
     run_this_last = DummyOperator(task_id='run_this_last', dag=dag,
-        inlets={"auto": True},
-        outlets={"datasets": [f_final,]})
+        inlets=AUTO,
+        outlets=f_final)
 
     f_in = File("/tmp/whole_directory/")
     outlets = []
     for file in FILE_CATEGORIES:
         f_out = File("/tmp/{}/{{{{ execution_date }}}}".format(file))
         outlets.append(f_out)
+
     run_this = BashOperator(
         task_id='run_me_first', bash_command='echo 1', dag=dag,
-        inlets={"datasets": [f_in,]},
-        outlets={"datasets": outlets}
-        )
+        inlets=f_in,
+        outlets=outlets
+    )
     run_this.set_downstream(run_this_last)
 
 
 Tasks take the parameters ``inlets`` and ``outlets``.
 
 Inlets can be manually defined by the following options:
 
-- by a list of dataset ``{"datasets": [dataset1, dataset2]}``
+- by a list of airflow.lineage.entities.Dataset or a subclass
 
-- can be configured to look for outlets from upstream tasks ``{"task_ids": 
["task_id1", "task_id2"]}``
+- can be configured to look for outlets from upstream tasks
 
-- can be configured to pick up outlets from direct upstream tasks ``{"auto": 
True}``
+- can be configured to pick up outlets from direct upstream tasks 'AUTO'
 
 - a combination of them
 
-Outlets are defined as list of dataset ``{"datasets": [dataset1, dataset2]}``. 
Any fields for the dataset are templated with
-the context when the task is being executed.
+Outlets are defined as list of datasets ``[dataset1, dataset2]``.
+
+All fields for datasets are templated with the context when the task is being 
executed. They will be templated during
+execution of the originating task and willnot be re-templated if picked up 
downstream.
 
 .. note:: Operators can add inlets and outlets automatically if the operator 
supports it.
 
-In the example DAG task ``run_me_first`` is a BashOperator that takes 3 
inlets: ``CAT1``, ``CAT2``, ``CAT3``, that are
+In the example DAG task ``run_this``(task_id ``run_me_first``) is a 
BashOperator that takes 3 inlets: ``CAT1``, ``CAT2``, ``CAT3``, that are
 
 Review comment:
   ```suggestion
   In the example DAG task ``run_this``(task_id=``run_me_first``) is a 
BashOperator that takes 3 inlets: ``CAT1``, ``CAT2``, ``CAT3``, that are
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to