Daniel Huang created AIRFLOW-882: ------------------------------------ Summary: 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
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)