我正在运行 query job在 BigQuery 中的大型数据集上。作业结果存储在 destinationTable 中.我希望表格在1 天 或1 小时 内过期(历史数据与今天的数据)。 是否可以选择在每个表上设置 expirationTime?
我知道我可以设置 defaultExpirationTime在整个数据集上,但由于我有不同的到期时间,这不是一个理想的解决方案。
最佳答案
检查 expirationTime表的属性
expirationTime long [Optional] The time when this table expires, in milliseconds since
the epoch. If not present, the table will persist indefinitely.
Expired tables will be deleted and their storage reclaimed.
您需要使用 tables.patch 进行设置创建或更新表后的 API(取决于您的逻辑)
关于google-bigquery - 大查询 : Set expirationTime on a destinationTable,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40312474/