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 2021/06/14 08:04:46 UTC

[GitHub] [airflow] mmenarguezpear commented on a change in pull request #16216: fix: AwsGlueJobOperator change order of args for load_file

mmenarguezpear commented on a change in pull request #16216:
URL: https://github.com/apache/airflow/pull/16216#discussion_r650430347



##########
File path: airflow/providers/amazon/aws/operators/glue.py
##########
@@ -101,7 +101,11 @@ def execute(self, context):
         if self.script_location and not self.script_location.startswith(self.s3_protocol):
             s3_hook = S3Hook(aws_conn_id=self.aws_conn_id)
             script_name = os.path.basename(self.script_location)
-            s3_hook.load_file(self.script_location, self.s3_bucket, self.s3_artifacts_prefix + script_name)
+            s3_hook.load_file(
+                filename=self.script_location,
+                key=self.s3_artifacts_prefix + script_name,
+                bucket_name=self.s3_bucket,

Review comment:
       Thanks for fixing this. would it be possible to also add an argument to replace if the file exists, which is the `replace` operator?

##########
File path: airflow/providers/amazon/aws/operators/glue.py
##########
@@ -101,7 +101,11 @@ def execute(self, context):
         if self.script_location and not self.script_location.startswith(self.s3_protocol):
             s3_hook = S3Hook(aws_conn_id=self.aws_conn_id)
             script_name = os.path.basename(self.script_location)
-            s3_hook.load_file(self.script_location, self.s3_bucket, self.s3_artifacts_prefix + script_name)
+            s3_hook.load_file(
+                filename=self.script_location,
+                key=self.s3_artifacts_prefix + script_name,
+                bucket_name=self.s3_bucket,

Review comment:
       Thanks for fixing this. would it be possible to also add an argument to replace if the file exists, which is the `replace` argument?




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