【发布时间】:2021-07-13 10:46:59
【问题描述】:
我想要一份写入单个 BigQuery 表的作业。我认为 IAM 权限很简单,将BigQuery Jobs User 角色授予相应表上的服务帐户,但我收到了错误。
Access Denied: Project <your-project>: User does not have bigquery.jobs.create permission in project <your-project>
当您只想授予对单个数据集中单个表的访问权限时,是否有办法避免授予服务帐户对整个项目的访问权限?如何在 GCP BigQuery 中应用最小权限原则?
查询代码:
const bigquery = new BigQuery({projectId});
await bigquery
.dataset(datasetId)
.table(tableId, {location: DATASET_LOCATION})
.load(fileRef);
【问题讨论】:
标签: google-cloud-platform google-bigquery