I鈥檓 trying to run a Query trough the public Data in BigQuery using Java and Eclipse.
When I run my code, I get:
HTTP ERROR 500
Problem accessing /Getbigquery. Reason:
Server Error
Caused by:
com.google.cloud.bigquery.BigQueryException: Access Denied: Project bigquery-public-data: The user [email protected] does not have bigquery.jobs.create permission in project bigquery-public-data.
I the IAM my Mail Address has the Owner Role for BigQuery.
What I鈥檓 worried about is my BigQuery Console. The Public Data is not listed in my Project but separately and I can鈥檛 click on "copy table" to copy it to my Project because it says: "Required parameter is missing".
Isn鈥檛 it possible to query the public Dataset with Java from Eclipse or is there something else I must think of?
This is the key part of the error: The user [email protected] does not have bigquery.jobs.create permission in project bigquery-public-data.
You will not be able to run a create query on the project bigquery-public-data. The user at [email protected] will have the Owner Role for BigQuery in your project, but not the public bigquery-public-data project. Try changing the project id set in your code to your own project - you should then be able to run the create query.
Thanks again!
I took the name public data a little bit to literally.
I ran the query over my own data and everything worked fine.
No worries! I'll close this out now.
A bit of necromancing here: I just encountered the very same issue, not when issuing any form of CREATE statement; rather just SELECTing data from a public dataset - the problem appears to have been that I had not yet selected a Project when attempting to execute the query. As soon as I did, the error went away. Google could do a lot better job catching that edge case and instructing the user accordingly.
Most helpful comment
A bit of necromancing here: I just encountered the very same issue, not when issuing any form of CREATE statement; rather just SELECTing data from a public dataset - the problem appears to have been that I had not yet selected a Project when attempting to execute the query. As soon as I did, the error went away. Google could do a lot better job catching that edge case and instructing the user accordingly.