错误处理作业:项目尚未启用BigQuery [英] Error processing job: Project has not enabled BigQuery
问题描述
使用SDK的CLI进行查询时,如下所示:
bq query "select * from [project]:[dataset].[table]"
When doing a query using SDK's CLI like this:
bq query "select * from [project]:[dataset].[table]"
响应为:
BigQuery error in query operation: Error processing job '[project-id]:[job_id]': The project [project_name] has not enabled BigQuery.
Response is:
BigQuery error in query operation: Error processing job '[project-id]:[job_id]': The project [project_name] has not enabled BigQuery.
另外,当尝试在应用程序中(例如,在Apache Beam作业内部)调用BQ API时,响应是相同的(错误代码:400,原因:无效)
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)
我的控制台中启用了BQ API,并且存在数据集(删除数据集会导致不同的错误消息)
The BQ API is enabled in my console and the dataset is present (removing the dataset results in a different error message)
这听起来确实像是一个愚蠢的问题-但我在Cloud Platform的社区Slack上问了这个问题,但那里也没有任何建议.
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.
推荐答案
-
首先,如早期评论和答案所述,请确保您具有如果仍然收到相同的错误消息,则很可能使用项目名称,而应该使用项目ID .
If you still get the same error message, you are most likely using the project name where you should be using the project id.
项目ID是项目名称,后跟数字,您应该可以使用控制台找到它. .
The project id is the project name followed by a number, and you should be able to find it using the Console.
如果您确定已启用API,并且ID和名称正确排序,请尝试检查 Google Cloud Status Dashboard ,以解决任何正在进行的BigQuery中断.
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.
这篇关于错误处理作业:项目尚未启用BigQuery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!