首页 > 解决方案 > 使用来自 Jenkins 的 python sdk 执行 BigQuery

问题描述

我有一个使用云服务帐户成功执行 bigquery 的 python 程序。当我尝试使用 Jenkins 安排 python 程序时,我看到以下错误 gcloud user has bigquery editor, dataowner and admin permission to table, and dataset.

日志: gcloud auth activate-service-account abc --key-file=**** 已激活服务帐户凭据:abc273721.iam.gserviceaccount.com] gcloud config set project p1 更新了属性 p1。 403 Access Denied: Table XYZ: 用户没有权限查询表

标签: authenticationjenkinsgoogle-bigquerygcloud

解决方案


我看到您已经提供了所有必需的角色;bigquery.dataOwner 和 bigquery.admin,如此处所述,但看起来您还必须授予服务帐户对数据集的访问权限


推荐阅读