You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m 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 MyAdress@gmail.com 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’m worried about is my BigQuery Console. The Public Data is not listed in my Project but separately and I can’t click on "copy table" to copy it to my Project because it says: "Required parameter is missing".
Isn’t 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 MyAdress@gmail.com 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 MyAdress@gmail.com 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.
Reacted by Brychu, Joao P C Bertoldo, Manas Kulkarni and Lucas Gonthier
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.
Reacted by theoptips, Jay Stevens, neeel.eth, Davis Clark and lucky
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.
Same here, trying to do a SELECT and getting the exact same error
I'm still a bit confused, if the SQL query is SELECT * FROM bigquery-public-data.hacker_news.full then how would this be changed in order to avoid this error?
I just now tried running your example query: SELECT * FROM bigquery-public-data.hacker_news.full
If a project was not selected from the top menu bar I get the following error:
Unexpected error
Request ID: 14848219036247285360
I don't see any 500 HTTP errors though
As soon as I select a project I can run the query(disappointingly slow at 49 sec, but still - it runs)
Thanks for the quick reply! What did you mean by select the project? If you mean in the BigQuery console, I am using the new interface and I have the project bigquery-public-data pinned. Even if I select my own project and then run that query I don't get an error, but maybe I am misunderstanding what you meant.
My problem is slightly different to the original one posted here (5 years ago - wow!) but it could be a similar issue, I am trying to query bigquery-public-data using a service account through an application called airflow. When I query my own tables with the service account it works but when I try to query say bigquery-public-data.hacker_news.full it says Access Denied: Project bigquery-public-data. I thought that everyone should have access to bigquery-public-data so I'm a bit confused.
I think I might have figured out my issue and it doesn't have to do with what I thought after all. I was trying to create a new table using data in a bigquery public table which apparently you can't do (I get the error Access Denied). Will have to find out if there are any workarounds or if it is just not possible. Thanks again for your last reply though!
Activity
michaelbausor commentedon Aug 24, 2017
This is the key part of the error:
The user MyAdress@gmail.com does not have bigquery.jobs.create permission in project bigquery-public-data.You will not be able to run a
createquery on the projectbigquery-public-data. The user atMyAdress@gmail.comwill have the Owner Role for BigQuery in your project, but not the publicbigquery-public-dataproject. Try changing the project id set in your code to your own project - you should then be able to run the create query.Electricks94 commentedon Aug 24, 2017
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.
michaelbausor commentedon Aug 24, 2017
No worries! I'll close this out now.
oaustegard commentedon Mar 25, 2020
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.
NelsonGaldeman commentedon Nov 12, 2021
Same here, trying to do a SELECT and getting the exact same error
LucyAFH commentedon Jan 19, 2022
I'm still a bit confused, if the SQL query is
SELECT * FROM bigquery-public-data.hacker_news.fullthen how would this be changed in order to avoid this error?oaustegard commentedon Jan 19, 2022
I just now tried running your example query:
SELECT * FROM bigquery-public-data.hacker_news.fullIf a project was not selected from the top menu bar I get the following error:
I don't see any 500 HTTP errors though
As soon as I select a project I can run the query(disappointingly slow at 49 sec, but still - it runs)
LucyAFH commentedon Jan 19, 2022
Thanks for the quick reply! What did you mean by select the project? If you mean in the BigQuery console, I am using the new interface and I have the project bigquery-public-data pinned. Even if I select my own project and then run that query I don't get an error, but maybe I am misunderstanding what you meant.
My problem is slightly different to the original one posted here (5 years ago - wow!) but it could be a similar issue, I am trying to query bigquery-public-data using a service account through an application called airflow. When I query my own tables with the service account it works but when I try to query say bigquery-public-data.hacker_news.full it says Access Denied: Project bigquery-public-data. I thought that everyone should have access to bigquery-public-data so I'm a bit confused.
LucyAFH commentedon Jan 19, 2022
I think I might have figured out my issue and it doesn't have to do with what I thought after all. I was trying to create a new table using data in a bigquery public table which apparently you can't do (I get the error Access Denied). Will have to find out if there are any workarounds or if it is just not possible. Thanks again for your last reply though!
chore: Remove dependency list completeness check. (#2374)
chore(main): release 2.35.2-SNAPSHOT (googleapis#2374)
chore(deps): update dependency com.google.cloud:google-cloud-pubsub t…
chore(deps): update dependency com.google.cloud:google-cloud-pubsub t…
ci: use CLOUD_JAVA_BOT_GITHUB_TOKEN (#2374)
fix: allow factory to export to different projects (googleapis#2374)
chore(main): release 2.49.0 (googleapis#2431)