2
votes

I have shared a dataset to All Authenticated Users here:

https://bigquery.cloud.google.com/table/master-smithy-633:nyc_taxi.total_amount_month

I can access it from a different account through Web UI. But when I run Javascript OAuth to access the dataset, I get the following error:

Object {code: 403, message: "Access Denied: Job master-smithy-633:job_PcyI97Mklw8mbJQUWGhgCxRRKTQ: RUN_QUERY_JOB", data: Array[1], error: Object}

Here's the code that access the dataset. You can clone it to see the error:

https://vida.io/documents/icwvp4qcCbEkYW2ve

How do I enable querying of the above shared dataset in different Google account?

1

1 Answers

2
votes

The issue isn't that you don't have access to the data, the issue is that user making the request doesn't have access to run the query job in the project.

For billing and accounting purposes, all jobs (including queries) must be attributed to a Cloud project. The project permissions set who is allowed to run jobs in that project (since the project is responsible for billing). This is true even when you don't have billing enabled, since there is a quota for unbilled query usage that gets charged to the project.

So you tried to run a job in the project master-smithy-c33, which the user making the request didn't have rights to. You can set project rights via the google developer console (https://console.developers.google.com/). Or you can run in a different project that you have rights to run jobs in.