airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AIRFLOW-882) Code example in docs has unnecessary DAG>>Operator assignment
Date Sat, 18 Feb 2017 16:11:44 GMT

    [ https://issues.apache.org/jira/browse/AIRFLOW-882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15873230#comment-15873230
] 

ASF subversion and git services commented on AIRFLOW-882:
---------------------------------------------------------

Commit baa4cd680655802bf48f472b36cb5f89a3b2e075 in incubator-airflow's branch refs/heads/master
from [~dxhuang]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-airflow.git;h=baa4cd6 ]

[AIRFLOW-882] Remove unnecessary dag>>op assignment in docs

Closes #2088 from dhuang/AIRFLOW-882


> Code example in docs has unnecessary DAG>>Operator assignment
> -------------------------------------------------------------
>
>                 Key: AIRFLOW-882
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-882
>             Project: Apache Airflow
>          Issue Type: Improvement
>          Components: docs
>            Reporter: Daniel Huang
>            Assignee: Daniel Huang
>            Priority: Trivial
>             Fix For: 1.8.1
>
>
> The docs currently say:
> {code}
> We can put this all together to build a simple pipeline:
> with DAG('my_dag', start_date=datetime(2016, 1, 1)) as dag:
>     (
>         dag
>         >> DummyOperator(task_id='dummy_1')
>         >> BashOperator(
>             task_id='bash_1',
>             bash_command='echo "HELLO!"')
>         >> PythonOperator(
>             task_id='python_1',
>             python_callable=lambda: print("GOODBYE!"))
>     )
> {code}
> But the {{dag >> ...}} is unnecessary because the operators are already initialized
with the proper DAG (https://github.com/apache/incubator-airflow/blob/fb0c5775cda4f84c07d8d5c0e6277fc387c172e6/airflow/models.py#L1699).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message