bigQueryR icon indicating copy to clipboard operation
bigQueryR copied to clipboard

bqr_get_job only works for datasets in US or EU location

Open ekocsis3 opened this issue 4 years ago • 1 comments

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.

Screenshot 2021-04-26 at 13 59 23

ekocsis3 avatar Apr 26 '21 12:04 ekocsis3

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.

MarkEdmondson1234 avatar Apr 26 '21 14:04 MarkEdmondson1234