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 2020/05/02 16:36:15 UTC

[GitHub] [airflow] kaxil commented on a change in pull request #8678: Updated docs so demo code runs

kaxil commented on a change in pull request #8678:
URL: https://github.com/apache/airflow/pull/8678#discussion_r418979077



##########
File path: docs/howto/custom-operator.rst
##########
@@ -171,7 +171,7 @@ You can use the template as follows:
 .. code:: python
 
         with dag:
-            hello_task = HelloOperator(task_id='task_id_1', dag=dag, name='{{ task_id }}')
+            hello_task = HelloOperator(task_id='task_id_1', dag=dag, name='{{ task_instance.task_id }}')
 
 In this example, Jinja looks for the ``name`` parameter and substitutes ``{{ task_id }}`` with

Review comment:
       ```suggestion
   In this example, Jinja looks for the ``name`` parameter and substitutes ``{{ task_instance.task_id }}`` with
   ```




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