Bowrna commented on code in PR #25711:
URL: https://github.com/apache/airflow/pull/25711#discussion_r964572995


##########
docs/apache-airflow/concepts/operators.rst:
##########
@@ -127,12 +132,12 @@ Deep nested fields can also be substituted, as long as 
all intermediate fields a
         # [additional code here...]
 
 
-    t = PythonOperator(
-        task_id="transform_data",
-        python_callable=transform_data,
-        op_args=[MyDataTransformer(MyDataReader("/tmp/{{ ds }}/my_file"))],
-        dag=dag,
-    )
+    @task(task_id="transform_data")
+    def transform_data(data_transformer):
+        pass
+
+
+    t = transform_data([MyDataTransformer(MyDataReader("/tmp/{{ ds 
}}/my_file"))])

Review Comment:
   @uranusjr Also do we have to leave a note on `@task` decorator does not 
render the templates part?



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