airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [airflow] baolsen commented on a change in pull request #6773: [AIRFLOW-6038] AWS DataSync example_dags added
Date Thu, 12 Dec 2019 06:05:59 GMT
baolsen commented on a change in pull request #6773: [AIRFLOW-6038] AWS DataSync example_dags
added
URL: https://github.com/apache/airflow/pull/6773#discussion_r356971393
 
 

 ##########
 File path: airflow/providers/amazon/aws/operators/datasync.py
 ##########
 @@ -27,25 +25,45 @@
 from airflow.utils.decorators import apply_defaults
 
 
-class AWSDataSyncCreateTaskOperator(BaseOperator):
-    r"""Create an AWS DataSync Task.
+# pylint: disable=too-many-instance-attributes, too-many-arguments
+class AWSDataSyncOperator(BaseOperator):
+    r"""Find, Create, Update, Execute and Delete AWS DataSync Tasks.
+
+    If ``do_xcom_push`` is True, then the TaskArn and TaskExecutionArn which
+    were executed will be pushed to an XCom.
 
-    If there are existing Locations which match the specified
-    source and destination URIs then these will be used for the Task.
-    Otherwise, new Locations can be created automatically,
-    depending on input parameters.
+    .. seealso::
+        For more information on how to use this operator, take a look at the guide:
+        :ref:`howto/operator:AWSDataSyncOperator`
 
-    If ``do_xcom_push`` is True, the TaskArn which is created
-    will be pushed to an XCom.
+    .. note:: There may be 0, 1, or many existing DataSync Tasks. The default
+        behavior is to create a new Task if there are 0, or execute the Task
+        if there was 1 Task, or fail if there were many Tasks.
 
     :param str aws_conn_id: AWS connection to use.
-    :param str source_location_uri: Source location URI.
+    :param int wait_for_task_execution: Time to wait between two
+        consecutive calls to check TaskExecution status.
+    :param str task_arn: AWS DataSync TaskArn to use. If None, then this operator will
+        attempt to either search for an existing Task or create a new Task.
+    :param str source_location_uri: Source location URI to search for. All DataSync
+        Tasks with a LocationArn with this URI will be considered.
         Example: ``smb://server/subdir``
-    :param str destination_location_uri: Destination location URI.
+    :param str destination_location_uri: Destination location URI to search for.
+        All DataSync Tasks with a LocationArn with this URI will be considered.
         Example: ``s3://airflow_bucket/stuff``
-    :param bool case_sensitive_location_search: Whether or not to do a
+    :param bool location_search_case_sensitive: Whether or not to do a
 
 Review comment:
   Happy with that suggestion, I will make it default as it is more intuitive. 
   I will leave the option in the datasync_hook constructor, in case the user wants to change
this default behavior. They can inherit and override the Operator methods if they want.

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


With regards,
Apache Git Services

Mime
View raw message