Skip to content

Commit f329a4a

Browse files
committed
Don't set location attribute on CopyJobConfig
As far as I can tell, this has never been a valid config value here. But prior to the merging of [this PR][1] in v2.7.0, invalid attributes were silently ignored. [1]: googleapis/python-bigquery#446
1 parent 4843548 commit f329a4a

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

openprescribing/gcutils/bigquery.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,13 +382,11 @@ def delete_all_rows(self, **options):
382382
self.run_job("query", args, options, default_options)
383383

384384
def copy_to_new_dataset(self, new_dataset_key, **options):
385-
default_options = {"location": settings.BQ_LOCATION}
386-
387385
dataset_ref = self.gcbq_client.dataset(DATASETS[new_dataset_key])
388386
new_table_ref = dataset_ref.table(self.table_id)
389387

390388
args = [self.gcbq_table_ref, new_table_ref]
391-
self.run_job("copy_table", args, options, default_options)
389+
self.run_job("copy_table", args, options, default_options={})
392390

393391
def move_to_new_dataset(self, new_dataset_id):
394392
self.copy_to_new_dataset(new_dataset_id)

0 commit comments

Comments
 (0)