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.
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.
BigQuery sandbox provides you with up to 1 terabyte per month of query capacity and 10GB of free storage.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With