This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/master by this push:
     new 8d09506  Fix download method in GCSToBigQueryOperator (#12442)
8d09506 is described below

commit 8d09506464c8480fa42e8bfe6a36c6f631cd23f6
Author: Tomek Urbaszek <[email protected]>
AuthorDate: Wed Nov 18 12:25:06 2020 +0100

    Fix download method in GCSToBigQueryOperator (#12442)
    
    closes: #12439
---
 airflow/providers/google/cloud/transfers/gcs_to_bigquery.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/airflow/providers/google/cloud/transfers/gcs_to_bigquery.py 
b/airflow/providers/google/cloud/transfers/gcs_to_bigquery.py
index 52a53b7..8eec62d 100644
--- a/airflow/providers/google/cloud/transfers/gcs_to_bigquery.py
+++ b/airflow/providers/google/cloud/transfers/gcs_to_bigquery.py
@@ -264,7 +264,11 @@ class GCSToBigQueryOperator(BaseOperator):
                     delegate_to=self.delegate_to,
                     impersonation_chain=self.impersonation_chain,
                 )
-                schema_fields = json.loads(gcs_hook.download(self.bucket, 
self.schema_object).decode("utf-8"))
+                blob = gcs_hook.download(
+                    bucket_name=self.bucket,
+                    object_name=self.schema_object,
+                )
+                schema_fields = json.loads(blob.decode("utf-8"))
             elif self.schema_object is None and self.autodetect is False:
                 raise AirflowException(
                     'At least one of `schema_fields`, `schema_object`, or 
`autodetect` must be passed.'

Reply via email to