You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/02/18 16:11:44 UTC

[jira] [Commented] (AIRFLOW-882) Code example in docs has unnecessary DAG>>Operator assignment

    [ 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)