google-bigquery - 大查询 : Set expirationTime on a destinationTable

标签 google-bigquery

我正在运行 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/

相关文章:

google-bigquery - 如何将从json字符串字段中提取的数组转换为bigquery重复字段?

google-bigquery - Bigquery 如果字段存在

sql - 将时间戳舍入到一刻钟

user-interface - Big Query 如何在新 UI 中共享数据集

c# - 从 C# 更新 BigQuery 数据集访问

python - 如何从 Google Dataflow 中的 PCollection 中获取元素列表并在管道中使用它来循环写入转换?

mysql - 谷歌大查询

google-bigquery - 在 Big Query Web 界面上使用表装饰器

google-bigquery - "Error: Field ' [已编辑].field_id ' not found on either side of the JOIN",Google BigQuery

google-bigquery - 如何在 Google BigQuery 中执行三元运算?