authentication - 使用来自 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: 用户没有权限查询表
解决方案
我看到您已经提供了所有必需的角色;bigquery.dataOwner 和 bigquery.admin,如此处所述,但看起来您还必须授予服务帐户对数据集的访问权限。
推荐阅读
- python - 通过 Python 脚本自动更新 GitHub 存储库上的本地 CSV
- laravel - 在特定日期时间发送 webhook laravel 8
- java - 如何读取 txt 文件并将其输入到对象数组中
- windows - 使用 PowerShell 在 Windows 中更改字体设置
- ubuntu - 当我指定它使用 587 时,Postfix 正在使用端口 25
- python - 二维循环在 python 中不能按预期工作
- c++ - 当使用虚拟继承时,为什么类的大小会以某种不一致(模式化)的方式增加?
- django-rest-framework - DRF 将 2 个字段序列化为数组
- bash - 如何在bash中附加输出?
- r - 在R中读取带有双双引号的文件