简体   繁体   English

我的服务帐户无法访问 BigQuery 数据,即使它有足够的权限

[英]My service account is not able to access BigQuery Data even if it have sufficient permission

I want to query data in BigQuery by using BigQuery API. These are what I've done.我想通过 BigQuery API 查询 BigQuery 中的数据。这些是我所做的。

  1. Create service account from "API Services" menu screenshot从“API 服务”菜单屏幕截图创建服务帐户
  2. I gave "BigQuery Data Editor" and "BigQuery User" permission to it screenshot我授予“BigQuery Data Editor”和“BigQuery User”权限截图
  3. Added key to this service account screenshot添加密钥到此服务帐户屏幕截图
  4. Try to retrieve data from BigQuery table on that project with the service account I made.尝试使用我创建的服务帐户从该项目的 BigQuery 表中检索数据。 But it fails with the error message below.但它失败并显示以下错误消息。

Access Denied: Table [project ID]-[table name]: User does not have bigquery.tables.get permission for table [project ID]-[table name].访问被拒绝:表 [项目 ID]-[表名称]:用户没有表 [项目 ID]-[表名称] 的 bigquery.tables.get 权限。

This is very weird because on BigQuery predefined IAM roles in Google document, "bigquery.tables.get" permission is included in "BigQuery Data Editor".这很奇怪,因为在 Google 文档中的BigQuery 预定义 IAM 角色上,“BigQuery 数据编辑器”中包含“bigquery.tables.get”权限。
screenshot截屏

I double checked that the service account have "BigQuery Data Editor" and "BigQuery User" permission from IAM & Admin menu.我仔细检查了服务帐户是否具有来自 IAM 和管理菜单的“BigQuery 数据编辑器”和“BigQuery 用户”权限。
screenshot截屏
I try this process many times to confirm that I don't make a mistake, but the result won't changed.我多次尝试这个过程以确认我没有出错,但结果不会改变。 What can be the reason for this problem?这个问题的原因是什么? Any comment will be appreciated.任何评论将不胜感激。

ps I use Software named DataBricks, data analytics tool provided by microsoft, by following this step . ps 我按照这个步骤使用了微软提供的数据分析工具DataBricks软件。 FIrst I doubted the configuration on DataBricks, But as I succeeded to retrieve the data with another BigQuery account, I think the problem exist on this BigQuery account.起初我怀疑DataBricks上的配置,但是当我成功地使用另一个BigQuery帐户检索数据时,我认为问题存在于这个BigQuery帐户上。

Possibly you're not running with the credentials you think?可能您没有使用您认为的凭据运行? Can you run a query from your databricks tool to verify?你能从你的数据块工具运行查询来验证吗? Something like SELECT SESSION_USER() as whoami should confirm things.SELECT SESSION_USER() as whoami应该确认事情。

The other most likely thing that could cause this error is that the tool is trying to use a different project ID than you're expecting.另一个最有可能导致此错误的原因是该工具正在尝试使用与您预期不同的项目 ID。 Does databricks have a configuration option for defining the default project ID to use? databricks 是否有用于定义要使用的默认项目 ID 的配置选项?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 “错误:禁止”即使服务帐户具有 function 权限访问 - "Error: Forbidden" even though service account has function permission access 使用 Cloud Functions 中的服务帐户将数据从 GCS 上传到 Bigquery - Upload data from GCS to Bigquery using service account in Cloud Functions 将数据上传到 BigQuery 的 Google Cloud Function 的服务帐户角色 - Service account role for a Google Cloud Function that uploads data to BigQuery 使用服务帐户凭据连接到 BigQuery? - Connect to BigQuery with Service Account Credentials? GCP 限制服务帐户有条件访问单个实例 - GCP limit service account to have conditional access to a single instance 我获得存储权限的服务帐户没有对 Google Cloud Storage 存储桶的 storage.objects.list 访问权限 - My service account which was given storage permissions does not have storage.objects.list access to the Google Cloud Storage bucket BigQuery:访问被拒绝:用户没有查询表的权限......也许它在美国位置不存在 - BigQuery: Access Denied: User does not have permission to query table... perhaps it does not exist in location US GCP API 云功能网关默认服务帐户身份验证:“您的客户端无权访问请求的 URL” - GCP API Gateway to Cloud Functions default service account authentication: "Your client does not have permission to the requested URL"" 未知的 BigQuery Google Ads 数据传输服务错误:非经理帐户不存在(或帐户未激活),因此不会导入数据 - Unknown BigQuery Google Ads Data Transfer Service error: Non-manager account doesn't exist (or account is not active), so data will not be imported 是否可以将 bigquery 编辑器 UI 作为服务帐户运行? - Is it possible to run the bigquery editor UI as a service account?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM