You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2021/09/08 10:39:07 UTC

[airflow] branch main updated: Update non-working example in documentation (#18067)

This is an automated email from the ASF dual-hosted git repository.

kaxilnaik pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new cc0e740  Update non-working example in documentation (#18067)
cc0e740 is described below

commit cc0e740aca7071f4100bec80dc5b979ee2674735
Author: Frank Breetz <fr...@gmail.com>
AuthorDate: Wed Sep 8 06:38:53 2021 -0400

    Update non-working example in documentation (#18067)
    
    
    Chain function cannot accept a list, but the example provided supplies with a list. Supplied example did not create chain dependencies as expected
    Replaced non-working example with working example, but does not use the chain function. I do not think you are able to use chain function dynamically.
---
 docs/apache-airflow/concepts/dags.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/apache-airflow/concepts/dags.rst b/docs/apache-airflow/concepts/dags.rst
index 6133a47..74ccebe 100644
--- a/docs/apache-airflow/concepts/dags.rst
+++ b/docs/apache-airflow/concepts/dags.rst
@@ -87,7 +87,7 @@ And if you want to chain together dependencies, you can use ``chain``::
     chain(op1, op2, op3, op4)
 
     # You can also do it dynamically
-    chain([DummyOperator(task_id='op' + i) for i in range(1, 6)])
+    chain(*[DummyOperator(task_id='op' + i) for i in range(1, 6)])
 
 Chain can also do *pairwise* dependencies for lists the same size (this is different to the *cross dependencies* done by ``cross_downstream``!)::