You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/01/25 11:39:51 UTC

[GitHub] [airflow] VBhojawala opened a new pull request #13890: added template_fields to support upstream task ordering by xcom

VBhojawala opened a new pull request #13890:
URL: https://github.com/apache/airflow/pull/13890


   added template_fields to support upstream task ordering by xcom .
   
   ``` python
   from airflow.models import DAG
   from airflow.providers.postgres.operators.postgres import PostgresOperator
   import os
   
   from airflow.utils.dates import days_ago
   
   default_args = {'start_date': days_ago(1)}
   
   dag_name = os.path.splitext(os.path.basename(__file__))[0]
   
   with DAG(dag_name, default_args=default_args) as dag:
   
       @dag.task
       def some_py_task() -> str:
           return some_str
   
       some_str = some_py_task()
   
       some_pg_task = PostgresOperator(task_id='some_pg_task', 
                        sql='select * from %s',
                        parameters=[some_str],
                        postgres_conn_id='postgres_bob')
   ```
   
   ![pgtask](https://user-images.githubusercontent.com/11897651/105701011-afa72300-5f2f-11eb-9ce6-5b7a1f62ba26.png)
   
   
   closes : #13823
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] VBhojawala closed pull request #13890: added parameters to template_fields to support upstream task ordering by xcom

Posted by GitBox <gi...@apache.org>.
VBhojawala closed pull request #13890:
URL: https://github.com/apache/airflow/pull/13890


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] VBhojawala closed pull request #13890: added parameters to template_fields to support upstream task ordering by xcom

Posted by GitBox <gi...@apache.org>.
VBhojawala closed pull request #13890:
URL: https://github.com/apache/airflow/pull/13890


   


----------------------------------------------------------------
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:
users@infra.apache.org