【发布时间】:2021-04-27 17:32:27
【问题描述】:
我正在尝试执行以下功能。但是,我收到一个错误:
GoogleJsonResponseException:对 bigquery.jobs.query 的 API 调用失败并出现错误:VPC 服务控制:组织政策禁止请求。 vpcServiceControlsUniqueIdentifier:09RldtnW9WG7f6KXB0Mnq6Sdp9a9PNeHnH5do8kyQJWFebex6fz65w。
我可以访问项目,它不存在任何禁止的东西。
我需要插入一个授权令牌吗?我该怎么做?
function runQuery() {
// Replace this value with the project ID listed in the Google
// Cloud Platform project.
var projectId = 'vf-grp-ngbi-prd-svcs-01';
var request = {
useQueryCache: false,
allowLargeResults: true,
useLegacySql: false,
query: " SELECT DISTINCT ct.cust_type_loc_1_lvl_1_name FROM `vf-pt-datahub.vfpt_dh_lake_edw_integrated_s.d_customer_type` ct WHERE end_dttm is not null"
};
var queryResults = BigQuery.Jobs.query(request, projectId)
return queryResults;
}
【问题讨论】:
标签: google-apps-script google-api google-bigquery google-oauth