From 3988306bd2cc7743d24e24d753730ba04462f018 Mon Sep 17 00:00:00 2001 From: Avishai Carmel Date: Thu, 16 Jun 2022 21:05:20 +0300 Subject: [PATCH] fix: allow `to_gbq` to run without `bigquery.tables.create` permission. (#539) --- pandas_gbq/load.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandas_gbq/load.py b/pandas_gbq/load.py index 2fcf2610..10328069 100644 --- a/pandas_gbq/load.py +++ b/pandas_gbq/load.py @@ -119,6 +119,7 @@ def load_parquet( ): job_config = bigquery.LoadJobConfig() job_config.write_disposition = "WRITE_APPEND" + job_config.create_disposition = "CREATE_NEVER" job_config.source_format = "PARQUET" if schema is not None: @@ -148,6 +149,7 @@ def load_csv( ): job_config = bigquery.LoadJobConfig() job_config.write_disposition = "WRITE_APPEND" + job_config.create_disposition = "CREATE_NEVER" job_config.source_format = "CSV" job_config.allow_quoted_newlines = True