project2
(
[email protected]
)。 我授予以下角色:
to管理
服务帐户用户to
[email protected]
target数据集(
project1
[email protected]
bigquery Resource查看器to组织(因为查询使用[email protected]
[email protected]
(该项目中的目标数据集)时,我运行以下内容。
我还尝试使用Terraform实现同样的问题,并使用相同的错误消息。
test_dataset
我得到以下输出:[email protected]
错误是一个谎言,因为project1
具有服务帐户用户在
[email protected]
region-us.INFORMATION_SCHEMA.JOBS_BY_ORGANIZATION
许可。
我在这里错过了什么? GCP支持使我发疯,根本没有帮助。(已更改了服务帐户,数据集和项目名称)
project1
约束(组织策略)是(默认情况下),这使我无法将服务帐户从
gcloud config set auth/impersonate_service_account [email protected]
bq mk \
--transfer_config \
--target_dataset=test_dataset \
--display_name='test bq scheduled query' \
--params='{"destination_table_template":"test_jobs", "write_disposition":"WRITE_APPEND", "query":"SELECT job_id FROM `region-us.INFORMATION_SCHEMA.JOBS_BY_ORGANIZATION` WHERE DATE_TRUNC(creation_time, DAY) = '2025-01-22'"}' \
--data_source=scheduled_query \
[email protected]
Updated property [auth/impersonate_service_account].
WARNING: This command is using service account impersonation. All API
calls will be executed as [[email protected]].
BigQuery error in mk operation:
Requesting user [email protected] does not have
iam.serviceAccounts.actAs permission to act as service account
[email protected]
的资源。I将约束设置为
[email protected]
中的,我能够成功执行命令。
错误消息非常误导,日志也没有暗示限制。