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 2022/07/13 00:33:03 UTC

[GitHub] [airflow] jwitz commented on a diff in pull request #25012: Update tutorial docs to include a definition of operators

jwitz commented on code in PR #25012:
URL: https://github.com/apache/airflow/pull/25012#discussion_r919542777


##########
docs/apache-airflow/tutorial.rst:
##########
@@ -102,11 +102,28 @@ define a ``schedule_interval`` of 1 day for the DAG.
     :start-after: [START instantiate_dag]
     :end-before: [END instantiate_dag]
 
+Operators
+---------
+
+An operator defines a unit of work for Airflow to complete. They are the most basic building blocks of DAGs.
+
+All operators inherit from the BaseOperator, which includes all of the required arguments for
+running work in Airflow. From here, each operator includes unique arguments for
+the type of work it's completing. Some of the most popular operators are the PythonOperator, the BashOperator, and the
+KubernetesPodOperator.
+
+Airflow completes work based on the arguments you pass to your operators. In this tutorial, we
+use the BashOperator to run a few bash scripts.
+
 Tasks
 -----
-Tasks are generated when instantiating operator objects. An object
-instantiated from an operator is called a task. The first argument
-``task_id`` acts as a unique identifier for the task.
+
+To use an operator in a DAG, you have to instantiate it as a task. Tasks
+determine how to execute your operators' work within the context of a DAG.

Review Comment:
   ```suggestion
   determine how to execute your operator's work within the context of a DAG.
   ```



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org