Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error processing job: Project has not enabled BigQuery

When doing a query using SDK's CLI like this: bq query "select * from [project]:[dataset].[table]"

Response is: BigQuery error in query operation: Error processing job '[project-id]:[job_id]': The project [project_name] has not enabled BigQuery.

Also when trying calling the BQ API in an application (e.g. inside an Apache Beam job), the response is the same (with error-code: 400, reason: invalid)

The BQ API is enabled in my console and the dataset is present (removing the dataset results in a different error message)

This sounds really like a dumb question – but I asked this on the Cloud Platform's community Slack but no suggestions on this there either.

like image 250
flowjow Avatar asked Jan 03 '17 17:01

flowjow


People also ask

How do you handle errors in BigQuery?

BigQuery treats ERROR in the same way as any expression that may result in an error: there is no special guarantee of evaluation order. BigQuery infers the return type in context. In the following example, the query returns an error message if the value of the row does not match one of two defined values.

Is BigQuery free for students?

BigQuery sandbox provides you with up to 1 terabyte per month of query capacity and 10GB of free storage.


2 Answers

  • First, as mentioned in early comments and answers, ensure that you have enabled the BigQuery API.

  • If you still get the same error message, you are most likely using the project name where you should be using the project id.

    The project id is the project name followed by a number, and you should be able to find it using the Console.

  • If you are sure you have the API enabled and the id and the name sorted correctly, try checking the Google Cloud Status Dashboard for any ongoing BigQuery outages.

like image 70
user513951 Avatar answered Sep 26 '22 06:09

user513951


Double check that you have enabled the BigQuery API via the console.

https://console.cloud.google.com/apis/api/bigquery-json.googleapis.com/overview?project=<your-project-id>&duration=PT1H

like image 28
Graham Polley Avatar answered Sep 23 '22 06:09

Graham Polley