【发布时间】:2021-12-08 18:40:59
【问题描述】:
我正在尝试从云函数运行查询,我读到我可以调用计划查询(按需),我正在运行下面的代码,但我收到“未找到请求的实体”。错误信息。
def runQuery(transferid):
#Source Name = 'projects/413410600298/locations/southamerica-east1/transferConfigs/61ae683c-0000-2bc6-bdb5-089e083412ac'
print('transferid is')
print(transferid)
client = bigquery_datatransfer_v1.DataTransferServiceClient()
projectid = '413410600298' # Enter your projectID here
parent = client.project_transfer_config_path(projectid, transferid)
print('parent is')
print(parent)
start_time = bigquery_datatransfer_v1.types.Timestamp(seconds=int(time.time() + 10))
response = client.start_manual_transfer_runs(parent, requested_run_time=start_time)
print(response)
【问题讨论】:
-
您是否尝试过使用 projectID 而不是项目编号?
标签: python google-bigquery google-cloud-functions