turbaszek commented on a change in pull request #12159:
URL: https://github.com/apache/airflow/pull/12159#discussion_r519229524



##########
File path: docs/concepts.rst
##########
@@ -1017,6 +1017,32 @@ This animated gif shows the UI interactions. TaskGroups 
are expanded or collapse
 
 .. image:: img/task_group.gif
 
+@taskgroup decorator
+--------------------
+
+TaskGroup can be created using @taskgroup decorator, it takes one mandatory 
argument 'group_id' which is same as constructor of TaskGroup class. It works 
exactly same as creating TaskGroup using context manager 'with 
TaskGroup('groupid') as section:'.
+
+.. code-block:: python
+
+  @task
+  def task_1(value):
+      return f'[ Task1 {value} ]'
+
+
+  @task
+  def task_2(value):
+      print( f'[ Task2 {value} ]')
+
+
+  @taskgroup(group_id='section_1')
+  def section_1(value):
+      return task_2(task_1(value))
+

Review comment:
       I'm not sure if we need two examples. If we decide to keep both the it 
would be nice to add some text between them.




----------------------------------------------------------------
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:
[email protected]


Reply via email to