bigQueryR
bigQueryR copied to clipboard
bqr_get_job only works for datasets in US or EU location
Hi,
When uploading data to BQ with the bqr_upload_data() function to a dataset not located in the US or EU, the function returns an error even though the upload is successful. See the example below when uploading to the bigQueryR_test dataset, located in 'europe-west3'.
I've traced the issue back to the bqr_get_job() function. Currently, it does not add a location query parameter to the API call, which is required for non-US/EU locations. (https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/get)
I'd be to happy to add this param to the function if you agree.
Thanks! Yes looks like the bqr_get_job() needs to either parse out from the job object the region and/or allow a region parameter. I think the code was made before there were sub-regions available.