owlphi opened a new issue #12439: URL: https://github.com/apache/airflow/issues/12439
# Version: Airflow: apache-airflow-backport-providers-google==2020.11.13 ##Problem The operator gcs to bigquery fails because it calls the method download with positional parameters in the wrong order. It calls in this way `gcs_hook.download(self.bucket, self.schema_object)`. See more in the [line](https://github.com/apache/airflow/blob/master/airflow/providers/google/cloud/transfers/gcs_to_bigquery.py#L267) The signature for the download is `gcs_hook.download(self, object_name, bucket_name)`. See more in the [line ](https://github.com/apache/airflow/blob/master/airflow/providers/google/cloud/hooks/gcs.py#L259-L261) ## Solution a) Change the operator so it calls the method download with the keyword parameters rather than positional b) Change the order of the parameters. c) Change the signature of download to be `def download(self, bucket_name, object_name, filename)` rather than `def dowload(self, object_name, bucket_name, filename I would prefer the option c) because the method upload start with bucket_name see [line]( https://github.com/apache/airflow/blob/master/airflow/providers/google/cloud/hooks/gcs.py#L353-L361) and a most of the method in the gcs hook start with bucket name. Also in Airflow 1.10.12 the method download starts with bucket_name and it would make a bit more compatible when using positional parameters ---------------------------------------------------------------- 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]
