Google cloud platform 无法使用包含在所有角色中的服务帐户从计算引擎访问bigquery

Google cloud platform 无法使用包含在所有角色中的服务帐户从计算引擎访问bigquery,google-cloud-platform,google-bigquery,google-compute-engine,Google Cloud Platform,Google Bigquery,Google Compute Engine,起初,我试图使用bigquery客户端运行python脚本,但遇到以下错误: 403 GET https://bigquery.googleapis.com/bigquery/v2/projects/**/datasets/newdata/tables/rentaldata: Request had insufficient authentication scopes 然后我尝试运行bq客户端: bq query --service_account ****-compute@develop

起初,我试图使用bigquery客户端运行python脚本,但遇到以下错误:

403 GET https://bigquery.googleapis.com/bigquery/v2/projects/**/datasets/newdata/tables/rentaldata: Request had insufficient authentication scopes
然后我尝试运行bq客户端:

 bq query  --service_account ****-compute@developer.gserviceaccount.com --nouse_legacy_sql 'select geopoint from `**.newdata.rentaldata`  limit 10'
得到这个:

Waiting on bqjob_rce6575eeefae333_0000016f48c66575_1 ... (0s) Current status: UNKNOWNBigQuery error in query operation: Insufficient Permission
服务帐户是bigquery的所有可能角色,也是项目的所有者(用于测试),有什么想法吗


bigquery的API处于活动状态。

服务帐户以前是否已被删除并使用相同的帐户名重新创建

根据,如果使用相同的名称删除并重新创建服务帐户,则可能会出现意外结果。相反,应使用新的帐户名


如果无法使用不同的服务帐户名称,请尝试按照同一篇文章中的步骤正确重新创建服务帐户。

最可能的原因是GCE实例没有BigQuery API权限。如果是这样,您可以停止它,编辑作用域并重新启动它。