ephraimbuddy commented on issue #17686:
URL: https://github.com/apache/airflow/issues/17686#issuecomment-931729032


   Another way that will also work:
   
   ```python
   
   @dag(default_args=default_args,
         schedule_interval=None,
           start_date=datetime(2021, 8, 1),
          dagrun_timeout=timedelta(hours=4),
          max_active_runs=1)
   def xcomm_taskflow_dag():
       @task()
       def set_date():
           date ="1-2-21"
           return date
       @task()
       def xcomm_task2(date):
           print(f"xcomm_task2:{date}")
   
       @task()
       def xcomm_task3(**kwargs):
           date=kwargs['ti'].xcom_pull(task_ids="set_date")
           print(f"xcomm_task3:{date}")
       
       xcomm_task2(set_date()) >> xcomm_task3()
   
   xcomm_taskflow_dag=xcomm_taskflow_dag()
   ```
   I think the documentation need to be improved


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to