kaxil commented on a change in pull request #5145: [AIRFLOW-4379] Remove
duplicate code & Add validation in gcs_to_gcs.py
URL: https://github.com/apache/airflow/pull/5145#discussion_r277262452
##########
File path: airflow/contrib/operators/gcs_to_gcs.py
##########
@@ -143,51 +143,50 @@ def execute(self, context):
google_cloud_storage_conn_id=self.google_cloud_storage_conn_id,
delegate_to=self.delegate_to
)
- log_message = 'Executing copy of gs://{0}/{1} to gs://{2}/{3}'
+
+ if self.destination_bucket is None:
+ self.log.warning(
+ 'destination_bucket is None. Defaulting it to source_bucket
(%s)',
+ self.source_bucket)
+ self.destination_bucket = self.source_bucket
if self.wildcard in self.source_object:
+
+ if self.source_object.count(self.wildcard) > 1:
Review comment:
Google uses the same for using GCS Url in Bigquery where they just support
asterisk.
https://cloud.google.com/bigquery/docs/loading-data-cloud-storage#load-wildcards
----------------------------------------------------------------
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]
With regards,
Apache Git Services