ashb 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_r346247319
##########
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 dataset
-- 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 dataset ``[dataset1, dataset2]}``.
Review comment:
```suggestion
Outlets are defined as list of datasets ``[dataset1, dataset2]``.
```
----------------------------------------------------------------
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