【发布时间】:2020-11-07 03:53:14
【问题描述】:
我有一个脚本可以从 Google Apps 脚本项目中创建新的 Google BigQuery 表。 当我使用默认到期时间运行它时,它运行良好。 但现在我想将过期时间设置为 2 小时(7200000 毫秒)
function createNewTable(tableId){
var table = {
expirationTime: "7200000",
tableReference: {
projectId: projectId,
datasetId: datasetId,
tableId: tableId
}
}
table = BigQuery.Tables.insert(table, projectId, datasetId);
console.info('Table created: %s', table.id);
}
它不起作用,因为出现错误API call to bigquery.tables.insert failed with error: Expiration time must be at least 1 seconds in the future。
我错在哪里以及如何解决?
【问题讨论】:
-
如果你发送
7200000而不是"7200000"会发生什么?
标签: google-apps-script google-bigquery